修改项目结构

This commit is contained in:
gongxh
2021-12-26 21:30:02 +08:00
parent b06189cb49
commit d39ac43a08
106 changed files with 3392 additions and 3083 deletions

View File

@@ -2,8 +2,8 @@
using CleanMachineHMI.frmChild;
using CleanMachineHMI.FrmUserControl;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Navigator;
using ComponentFactory.Krypton.Toolkit;
using Krypton.Navigator;
using Krypton.Toolkit;
using LeadDataBaseUtility;
using NX_LogUtility;
using System;
@@ -431,7 +431,7 @@ namespace CleanMachineHMI
while (GlobalHelper.SysThIsRunFlag)
{
PlcOperationHelper.Instance.RefreshPlcItem_M();
Thread.Sleep(50);
Thread.Sleep(100);
}
}
private void RefreshPlcItem_D()
@@ -440,7 +440,7 @@ namespace CleanMachineHMI
{
PlcOperationHelper.Instance.RefreshPlcItem_D();
ShowWarningMsg();
Thread.Sleep(50);
Thread.Sleep(100);
}
}
private void RefreshPlcItem_X()
@@ -448,7 +448,7 @@ namespace CleanMachineHMI
while (GlobalHelper.SysThIsRunFlag)
{
PlcOperationHelper.Instance.RefreshPlcItem_X();
Thread.Sleep(5);
Thread.Sleep(100);
}
}
private void RefreshPlcItem_Y()
@@ -456,7 +456,7 @@ namespace CleanMachineHMI
while (GlobalHelper.SysThIsRunFlag)
{
PlcOperationHelper.Instance.RefreshPlcItem_Y();
Thread.Sleep(5);
Thread.Sleep(100);
}
}
private void MainThRunFunc()
@@ -482,24 +482,24 @@ namespace CleanMachineHMI
int CountNumMsg = Convert.ToInt32(dt_CurrPalletCountNumMsg.Rows[0][0]);
if (CountNumMsg == 0 || ScrapNumMsg == 0)
{
Invoke(new Action(() => { label1.Visible = false; }));
BeginInvoke(new Action(() => { label1.Visible = false; }));
}
else
{
int scrapRate = Convert.ToInt32(Math.Round(decimal.Parse(((decimal)ScrapNumMsg / (decimal)CountNumMsg).ToString("0.000")), 2) * 100);
if (scrapRate >= 10)
{
Invoke(new Action(() => { label1.Visible = false; }));
BeginInvoke(new Action(() => { label1.Visible = false; }));
}
else
{
Invoke(new Action(() => { label1.Visible = false; }));
BeginInvoke(new Action(() => { label1.Visible = false; }));
}
}
}
else
{
Invoke(new Action(() => { label1.Visible = false; }));
BeginInvoke(new Action(() => { label1.Visible = false; }));
}
}
@@ -525,16 +525,16 @@ namespace CleanMachineHMI
if (sysRuningTimeLen < maintainItemTime)
{
//pictureBox1.Visible = false;
Invoke(new Action(() => { pictureBox1.Visible = false; }));
BeginInvoke(new Action(() => { pictureBox1.Visible = false; }));
}
else if (sysRuningTimeLen >= maintainItemTime && sysRuningTimeLen < maintainAlarmTime)
{
//pictureBox1.Visible = true;
Invoke(new Action(() => { pictureBox1.Visible = true; }));
BeginInvoke(new Action(() => { pictureBox1.Visible = true; }));
}
else if (sysRuningTimeLen >= maintainAlarmTime && sysRuningTimeLen < maintainQuitTime)
{
Invoke(new Action(() =>
BeginInvoke(new Action(() =>
{
pictureBox1.Visible = true;
if (!sysAlarmFrmShowFlag)
@@ -550,7 +550,7 @@ namespace CleanMachineHMI
}
else if (sysRuningTimeLen >= maintainQuitTime)
{
Invoke(new Action(() =>
BeginInvoke(new Action(() =>
{
pictureBox1.Visible = true;
string sql = "SELECT 1 FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
@@ -580,7 +580,7 @@ namespace CleanMachineHMI
}
string sqlUpdateRunTimeLen = $@"UPDATE SYS_PARAMETER set PARAMETER_VALUE = '{sysRuningTimeLen}' WHERE PARAMETER_CODE = 'SysRuningTimeLen'";
LeadDbHelperSQLite.ExecuteSql(sqlUpdateRunTimeLen);
Invoke(new Action(() =>
BeginInvoke(new Action(() =>
{
kryptonLabel1.Text = sysRuningTimeLen + " Minutes";
}));
@@ -589,7 +589,7 @@ namespace CleanMachineHMI
else
{
timerRunNUm++;
Invoke(new Action(() =>
BeginInvoke(new Action(() =>
{
kryptonLabel1.Text = sysRuningTimeLen + " Minutes";
}));
@@ -598,7 +598,7 @@ namespace CleanMachineHMI
}
else
{
Invoke(new Action(() =>
BeginInvoke(new Action(() =>
{
pictureBox1.Visible = true;
}));