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];
Global.RoleMenuPermission = new CleanMachine.BLL.SYS.RoleMenuPermissionBLL().GetList(_user.RoleId).ToList();
Global.MainFormNew = new frmMainNew();
if (Global.MainFormNew == null)
{
Global.MainFormNew = new frmMainNew();
}
Global.MainFormNew.Show();
}
else
{

View File

@@ -172,8 +172,11 @@ namespace CleanMachineHMI
private void frmMainNew_Load(object sender, EventArgs e)
{
#if RELEASE
try
{
#endif
this.SetFormControlText();
SwitchFrmMenu = new dlgSwitchFrmMenu(AddFrmMenuPage);
@@ -309,11 +312,14 @@ namespace CleanMachineHMI
RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag);
timer.Enabled = true;
InitControl();
#if RELEASE
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
#endif
}
private void ClearMaintainingFlag()
{
@@ -518,7 +524,7 @@ namespace CleanMachineHMI
#region 线程执行函数
#region 线程执行函数
private void RefreshPlcItem_M()
{
while (Global.SysThIsRunFlag)
@@ -572,7 +578,7 @@ namespace CleanMachineHMI
try
{
#endif
#region 定时器运行函数
#region 定时器运行函数
//当前托报废率超过10%,则提示
string sql_CurrPalletmsg = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
DataTable dt_CurrPalletmsg = LeadDbHelperSQLite.Query(sql_CurrPalletmsg).Tables[0];
@@ -750,16 +756,16 @@ namespace CleanMachineHMI
//}
#region 定期清理历史业务数据 -- 数据保存2个月
#region 定期清理历史业务数据 -- 数据保存2个月
//string sqlZbkWorkingPallet = $@"DELETE FROM ZBK_WORKING_PALLET WHERE julianday('now') - julianday(UPDATE_TIME) > 30";
//string sqlZbkWorkingPalletDtl = $@"DELETE FROM ZBK_WORKING_PALLET_DTL WHERE julianday('now') - julianday(UPDATE_TIME) > 30";
//LeadDbHelperSQLite.Execute(sqlZbkWorkingPallet);
//LeadDbHelperSQLite.Execute(sqlZbkWorkingPalletDtl);
#endregion
#endregion
// PlcOperationHelper.Instance.HeartbeatDetection();
ShowWarningMsg();
#endregion
#endregion
#if RELEASE
}
@@ -771,7 +777,7 @@ namespace CleanMachineHMI
Thread.Sleep(500);
}
}
#endregion
#endregion
private void Test()
{