feat(legacy): add shell-independent module page compatibility

This commit is contained in:
2026-08-28 11:56:48 +08:00
parent 8472004711
commit 1c59fda8b8
8 changed files with 387 additions and 21 deletions
@@ -61,6 +61,17 @@ namespace Lskj.Main.Hosting
Manager.ExternalMainShell = externalMainShell;
try
{
// A standalone Ls_ERP process must always start in the
// original WinForms page mode. Clear any stale host
// references before FrmMain is created so Manager.OpenModule
// cannot accidentally route pages to a previous WPF shell
// when the legacy runtime is reused in-process.
if (externalMainShell == null)
{
ERPInfo.Instance.ModulePageHost = null;
ERPInfo.Instance.PageControl = null;
Manager.TabMain = null;
}
Program.InitializeMainProcess();
_mainProcessInitialized = true;
}