This commit is contained in:
gongxh
2022-05-19 13:16:37 +08:00
parent 972124f446
commit f5190d70ce
2 changed files with 17 additions and 9 deletions

View File

@@ -97,10 +97,12 @@ namespace CleanMachineHMI
// GlobalHelper.RoleMenuPermission = LeadDbHelperSQLite.Query(sql).Tables[0]; // GlobalHelper.RoleMenuPermission = LeadDbHelperSQLite.Query(sql).Tables[0];
Global.RoleMenuPermission = new CleanMachine.BLL.SYS.RoleMenuPermissionBLL().GetList(_user.RoleId).ToList(); Global.RoleMenuPermission = new CleanMachine.BLL.SYS.RoleMenuPermissionBLL().GetList(_user.RoleId).ToList();
if (Global.MainFormNew == null)
{
Global.MainFormNew = new frmMainNew(); Global.MainFormNew = new frmMainNew();
}
Global.MainFormNew.Show(); Global.MainFormNew.Show();
} }
else else
{ {

View File

@@ -172,8 +172,11 @@ namespace CleanMachineHMI
private void frmMainNew_Load(object sender, EventArgs e) private void frmMainNew_Load(object sender, EventArgs e)
{ {
#if RELEASE
try try
{ {
#endif
this.SetFormControlText(); this.SetFormControlText();
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage); SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
@@ -309,11 +312,14 @@ namespace CleanMachineHMI
RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag); RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag);
timer.Enabled = true; timer.Enabled = true;
InitControl(); InitControl();
#if RELEASE
} }
catch (Exception ex) catch (Exception ex)
{ {
KryptonMessageBox.Show(ex.Message); KryptonMessageBox.Show(ex.Message);
} }
#endif
} }
private void ClearMaintainingFlag() private void ClearMaintainingFlag()
{ {