feat(legacy): add shell-independent module page compatibility
This commit is contained in:
@@ -356,12 +356,12 @@ namespace Lskj.Main.Model
|
||||
dllName = MainImpl.GetDefaultValue(dllName);
|
||||
if (SystemInfo.Instance.SoftOpenMode || SingleOpenMode)
|
||||
{
|
||||
foreach (XtraTabPage tablepage in TabMain.TabPages)
|
||||
foreach (XtraTabPage tablepage in ERPInfo.Instance.ModulePages)
|
||||
{
|
||||
if (tablepage.Text == menuName)
|
||||
{
|
||||
MessageUtil.Show("已设置不能打开多个相同模块!");
|
||||
TabMain.SelectedTabPage = tablepage;
|
||||
ERPInfo.Instance.SelectModulePage(tablepage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -414,8 +414,8 @@ namespace Lskj.Main.Model
|
||||
tp.Dock = DockStyle.Fill;
|
||||
module.Tag = guid;
|
||||
module.ModuleInPtr = exeMainHandle;
|
||||
TabMain.TabPages.Add(tp);
|
||||
TabMain.SelectedTabPage = tp;
|
||||
ERPInfo.Instance.AddModulePage(tp);
|
||||
ERPInfo.Instance.SelectModulePage(tp);
|
||||
ModuleForms.Add(guid, module);
|
||||
}
|
||||
else//直接打开exe模块
|
||||
@@ -688,8 +688,8 @@ namespace Lskj.Main.Model
|
||||
//}
|
||||
}
|
||||
|
||||
TabMain.TabPages.Add(tp);
|
||||
TabMain.SelectedTabPage = tp;
|
||||
ERPInfo.Instance.AddModulePage(tp);
|
||||
ERPInfo.Instance.SelectModulePage(tp);
|
||||
ModuleForms.Add(guid, module);
|
||||
|
||||
//LastModuleForm.Add(module);
|
||||
@@ -720,10 +720,7 @@ namespace Lskj.Main.Model
|
||||
if (tabPage != null)
|
||||
{
|
||||
StaticControl.DogVerifyModuleForms.Remove(tabPage);
|
||||
if (TabMain != null && TabMain.TabPages.Contains(tabPage))
|
||||
{
|
||||
TabMain.TabPages.Remove(tabPage);
|
||||
}
|
||||
ERPInfo.Instance.RemoveModulePage(tabPage);
|
||||
}
|
||||
|
||||
if (form != null && !form.IsDisposed)
|
||||
|
||||
Reference in New Issue
Block a user