修改
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
<!--<add key="GlobalPaletteMode" value="Professionaloffice2003"/>-->
|
||||
<add key="LanguageCode" value="zh-CN"/>
|
||||
<add key="LanguageCode" value="en-US"/>
|
||||
<!--SQLite数据库连接字符串-->
|
||||
<!--<add key="LeadSQLite" value="Data Source=|DataDirectory|\\clearMac.db;Pooling=true;FailIfMissing=false"/>-->
|
||||
<add key="LeadSQLite" value="Data Source=DataBase/clearMac.db"/>
|
||||
|
||||
Binary file not shown.
@@ -109,7 +109,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void RefreshPlcData(bool isContainHisData)
|
||||
{
|
||||
List<WarningLog> tmpWarningLogList = new List<WarningLog>();
|
||||
tmpWarningLogList.AddRange(Global.CmWarningLogMd_List);
|
||||
tmpWarningLogList.AddRange(PlcOperationHelper.Instance.CmWarningLogMd_List.Values);
|
||||
if (isContainHisData)
|
||||
{
|
||||
string sql = $@"SELECT * FROM CM_WARNING_LOG";
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace CleanMachineHMI
|
||||
|
||||
public static List<Warning> BasWarningMd_List { get; set; }
|
||||
|
||||
public static List<WarningLog> CmWarningLogMd_List { get; set; }
|
||||
// public static Dictionary<string, WarningLog> CmWarningLogMd_List { get; set; } = new Dictionary<string, WarningLog>();
|
||||
|
||||
public static List<WarningLog> CmWarningLogMd_List_1 { get; set; }
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
51
CleanMachineHMI/frmMainNew.Designer.cs
generated
51
CleanMachineHMI/frmMainNew.Designer.cs
generated
@@ -45,6 +45,7 @@
|
||||
this.MainDetail = new Krypton.Navigator.KryptonPage();
|
||||
this.kryptonManager = new Krypton.Toolkit.KryptonManager(this.components);
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.buttonSpecAny1 = new Krypton.Toolkit.ButtonSpecAny();
|
||||
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
|
||||
this.kryptonGroupBox1.Panel.SuspendLayout();
|
||||
@@ -59,7 +60,10 @@
|
||||
// kryptonGroupBox1
|
||||
//
|
||||
this.kryptonGroupBox1.CaptionOverlap = 0D;
|
||||
this.kryptonGroupBox1.CaptionStyle = Krypton.Toolkit.LabelStyle.GroupBoxCaption;
|
||||
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.kryptonGroupBox1.GroupBackStyle = Krypton.Toolkit.PaletteBackStyle.ControlGroupBox;
|
||||
this.kryptonGroupBox1.GroupBorderStyle = Krypton.Toolkit.PaletteBorderStyle.ControlGroupBox;
|
||||
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
|
||||
//
|
||||
@@ -135,6 +139,8 @@
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(107, 45);
|
||||
this.btnExit.StateCommon.Content.ShortText.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnExit.StateCommon.Content.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.btnExit.StateCommon.Content.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.btnExit.TabIndex = 13;
|
||||
this.btnExit.Values.Text = "返回";
|
||||
this.btnExit.Visible = false;
|
||||
@@ -148,16 +154,21 @@
|
||||
this.lbSysAlreadyRunning.Name = "lbSysAlreadyRunning";
|
||||
this.lbSysAlreadyRunning.Size = new System.Drawing.Size(112, 20);
|
||||
this.lbSysAlreadyRunning.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lbSysAlreadyRunning.StateCommon.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.lbSysAlreadyRunning.StateCommon.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.lbSysAlreadyRunning.TabIndex = 8;
|
||||
this.lbSysAlreadyRunning.Values.Text = "系统运行时间:";
|
||||
//
|
||||
// label3Professional
|
||||
//
|
||||
this.label3Professional.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3Professional.LabelStyle = Krypton.Toolkit.LabelStyle.NormalPanel;
|
||||
this.label3Professional.Location = new System.Drawing.Point(885, 23);
|
||||
this.label3Professional.Name = "label3Professional";
|
||||
this.label3Professional.Size = new System.Drawing.Size(112, 22);
|
||||
this.label3Professional.StateCommon.ShortText.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3Professional.StateCommon.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.label3Professional.StateCommon.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.label3Professional.TabIndex = 7;
|
||||
this.label3Professional.Values.Image = global::CleanMachineHMI.Properties.Resources.conn;
|
||||
this.label3Professional.Values.Text = "通讯已连接";
|
||||
@@ -170,63 +181,91 @@
|
||||
this.lbSysTime.Name = "lbSysTime";
|
||||
this.lbSysTime.Size = new System.Drawing.Size(83, 20);
|
||||
this.lbSysTime.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lbSysTime.StateCommon.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.lbSysTime.StateCommon.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.lbSysTime.TabIndex = 4;
|
||||
this.lbSysTime.Values.Text = "系统时间:";
|
||||
//
|
||||
// kryptonLabel1
|
||||
//
|
||||
this.kryptonLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.kryptonLabel1.LabelStyle = Krypton.Toolkit.LabelStyle.NormalPanel;
|
||||
this.kryptonLabel1.Location = new System.Drawing.Point(829, 47);
|
||||
this.kryptonLabel1.Name = "kryptonLabel1";
|
||||
this.kryptonLabel1.PaletteMode = Krypton.Toolkit.PaletteMode.ProfessionalSystem;
|
||||
this.kryptonLabel1.Size = new System.Drawing.Size(82, 23);
|
||||
this.kryptonLabel1.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.kryptonLabel1.StateCommon.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.kryptonLabel1.StateCommon.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.kryptonLabel1.StateNormal.Image.Effect = Krypton.Toolkit.PaletteImageEffect.Inherit;
|
||||
this.kryptonLabel1.StateNormal.Image.ImageH = Krypton.Toolkit.PaletteRelativeAlign.Far;
|
||||
this.kryptonLabel1.StateNormal.LongText.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.kryptonLabel1.StateNormal.LongText.Color2 = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.kryptonLabel1.StateNormal.LongText.ColorAngle = 45F;
|
||||
this.kryptonLabel1.StateNormal.LongText.ColorStyle = Krypton.Toolkit.PaletteColorStyle.Sigma;
|
||||
this.kryptonLabel1.StateNormal.LongText.Font = new System.Drawing.Font("Verdana", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.kryptonLabel1.StateNormal.LongText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.kryptonLabel1.StateNormal.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Center;
|
||||
this.kryptonLabel1.StateNormal.LongText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.kryptonLabel1.StateNormal.ShortText.Color1 = System.Drawing.Color.Blue;
|
||||
this.kryptonLabel1.StateNormal.ShortText.Color2 = System.Drawing.Color.MidnightBlue;
|
||||
this.kryptonLabel1.StateNormal.ShortText.ColorAngle = 45F;
|
||||
this.kryptonLabel1.StateNormal.ShortText.ColorStyle = Krypton.Toolkit.PaletteColorStyle.Sigma;
|
||||
this.kryptonLabel1.StateNormal.ShortText.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.kryptonLabel1.StateNormal.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.kryptonLabel1.StateNormal.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.kryptonLabel1.TabIndex = 3;
|
||||
this.kryptonLabel1.Values.Text = "0 Minutes";
|
||||
//
|
||||
// lbNow
|
||||
//
|
||||
this.lbNow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbNow.LabelStyle = Krypton.Toolkit.LabelStyle.NormalPanel;
|
||||
this.lbNow.Location = new System.Drawing.Point(804, 1);
|
||||
this.lbNow.Name = "lbNow";
|
||||
this.lbNow.PaletteMode = Krypton.Toolkit.PaletteMode.ProfessionalSystem;
|
||||
this.lbNow.Size = new System.Drawing.Size(171, 23);
|
||||
this.lbNow.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lbNow.StateCommon.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.lbNow.StateCommon.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.lbNow.StateNormal.Image.Effect = Krypton.Toolkit.PaletteImageEffect.Inherit;
|
||||
this.lbNow.StateNormal.Image.ImageH = Krypton.Toolkit.PaletteRelativeAlign.Far;
|
||||
this.lbNow.StateNormal.LongText.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.lbNow.StateNormal.LongText.Color2 = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.lbNow.StateNormal.LongText.ColorAngle = 45F;
|
||||
this.lbNow.StateNormal.LongText.ColorStyle = Krypton.Toolkit.PaletteColorStyle.Sigma;
|
||||
this.lbNow.StateNormal.LongText.Font = new System.Drawing.Font("Verdana", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbNow.StateNormal.LongText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.lbNow.StateNormal.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Center;
|
||||
this.lbNow.StateNormal.LongText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.lbNow.StateNormal.ShortText.Color1 = System.Drawing.Color.Blue;
|
||||
this.lbNow.StateNormal.ShortText.Color2 = System.Drawing.Color.MidnightBlue;
|
||||
this.lbNow.StateNormal.ShortText.ColorAngle = 45F;
|
||||
this.lbNow.StateNormal.ShortText.ColorStyle = Krypton.Toolkit.PaletteColorStyle.Sigma;
|
||||
this.lbNow.StateNormal.ShortText.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbNow.StateNormal.ShortText.ImageStyle = Krypton.Toolkit.PaletteImageStyle.Inherit;
|
||||
this.lbNow.StateNormal.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
|
||||
this.lbNow.StateNormal.ShortText.Trim = Krypton.Toolkit.PaletteTextTrim.Inherit;
|
||||
this.lbNow.TabIndex = 3;
|
||||
this.lbNow.Values.Text = "2020-02-02 22:00:00\r\n";
|
||||
//
|
||||
// kryptonNavigator1
|
||||
//
|
||||
this.kryptonNavigator1.Button.ButtonDisplayLogic = Krypton.Navigator.ButtonDisplayLogic.ContextNextPrevious;
|
||||
this.kryptonNavigator1.Button.CloseButtonAction = Krypton.Navigator.CloseButtonAction.RemovePageAndDispose;
|
||||
this.kryptonNavigator1.Button.CloseButtonDisplay = Krypton.Navigator.ButtonDisplay.Hide;
|
||||
this.kryptonNavigator1.Button.ContextButtonAction = Krypton.Navigator.ContextButtonAction.SelectPage;
|
||||
this.kryptonNavigator1.Button.ContextButtonDisplay = Krypton.Navigator.ButtonDisplay.Logic;
|
||||
this.kryptonNavigator1.Button.ContextMenuMapImage = Krypton.Navigator.MapKryptonPageImage.Small;
|
||||
this.kryptonNavigator1.Button.ContextMenuMapText = Krypton.Navigator.MapKryptonPageText.TextTitle;
|
||||
this.kryptonNavigator1.Button.NextButtonAction = Krypton.Navigator.DirectionButtonAction.ModeAppropriateAction;
|
||||
this.kryptonNavigator1.Button.NextButtonDisplay = Krypton.Navigator.ButtonDisplay.Logic;
|
||||
this.kryptonNavigator1.Button.PreviousButtonAction = Krypton.Navigator.DirectionButtonAction.ModeAppropriateAction;
|
||||
this.kryptonNavigator1.Button.PreviousButtonDisplay = Krypton.Navigator.ButtonDisplay.Logic;
|
||||
this.kryptonNavigator1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.kryptonNavigator1.Location = new System.Drawing.Point(0, 79);
|
||||
this.kryptonNavigator1.Name = "kryptonNavigator1";
|
||||
this.kryptonNavigator1.NavigatorMode = Krypton.Navigator.NavigatorMode.BarTabGroup;
|
||||
this.kryptonNavigator1.Pages.AddRange(new Krypton.Navigator.KryptonPage[] {
|
||||
this.MainDetail});
|
||||
this.kryptonNavigator1.SelectedIndex = 0;
|
||||
@@ -237,11 +276,13 @@
|
||||
// MainDetail
|
||||
//
|
||||
this.MainDetail.AutoHiddenSlideSize = new System.Drawing.Size(200, 200);
|
||||
this.MainDetail.ButtonSpecs.AddRange(new Krypton.Toolkit.ButtonSpecAny[] {
|
||||
((Krypton.Toolkit.ButtonSpecAny)(this.buttonSpecAny1))});
|
||||
this.MainDetail.Flags = 65534;
|
||||
this.MainDetail.LastVisibleSet = true;
|
||||
this.MainDetail.MinimumSize = new System.Drawing.Size(50, 50);
|
||||
this.MainDetail.Name = "MainDetail";
|
||||
this.MainDetail.Size = new System.Drawing.Size(1006, 623);
|
||||
this.MainDetail.Size = new System.Drawing.Size(1006, 615);
|
||||
this.MainDetail.Text = "MainDetail";
|
||||
this.MainDetail.ToolTipTitle = "Page ToolTip";
|
||||
this.MainDetail.UniqueName = "0E1DA5225D8D4CFC70A2EFA8667116CC";
|
||||
@@ -255,6 +296,13 @@
|
||||
this.timer.Interval = 1000;
|
||||
this.timer.Tick += new System.EventHandler(this.timer_Tick);
|
||||
//
|
||||
// buttonSpecAny1
|
||||
//
|
||||
this.buttonSpecAny1.Enabled = Krypton.Toolkit.ButtonEnabled.False;
|
||||
this.buttonSpecAny1.Style = Krypton.Toolkit.PaletteButtonStyle.FormClose;
|
||||
this.buttonSpecAny1.Type = Krypton.Toolkit.PaletteButtonSpecStyle.FormClose;
|
||||
this.buttonSpecAny1.UniqueName = "b98969b28fc84ecca8db41d2f99b165b";
|
||||
//
|
||||
// frmMainNew
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -300,5 +348,6 @@
|
||||
private Krypton.Navigator.KryptonNavigator kryptonNavigator1;
|
||||
private Krypton.Navigator.KryptonPage MainDetail;
|
||||
public Krypton.Toolkit.KryptonLabel kryptonLabel1;
|
||||
private Krypton.Toolkit.ButtonSpecAny buttonSpecAny1;
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ namespace CleanMachineHMI
|
||||
private void ShowPicAlarm()
|
||||
{
|
||||
|
||||
ptb_Alarm.Visible = Global.CmWarningLogMd_List.Count > 0;
|
||||
ptb_Alarm.Visible = PlcOperationHelper.Instance.CmWarningLogMd_List.Count > 0;
|
||||
|
||||
//Invoke(new Action(() =>
|
||||
//{
|
||||
@@ -416,34 +416,34 @@ namespace CleanMachineHMI
|
||||
// }
|
||||
//}
|
||||
Global.BasWarningMd_List = new CleanMachine.BLL.BAS.WarningBLL().GetList("").ToList();
|
||||
Global.CmWarningLogMd_List = new List<WarningLog>();
|
||||
string sql1 = $@"SELECT * FROM CM_WARNING_LOG WHERE WARING_STATUS = 0 AND WARNING_HANDLE_RESULT =0";
|
||||
DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0];
|
||||
if (dt1 != null && dt1.Rows.Count > 0)
|
||||
{
|
||||
//Global.CmWarningLogMd_List = new Dictionary<string, WarningLog>();
|
||||
//string sql1 = $@"SELECT * FROM CM_WARNING_LOG WHERE WARING_STATUS = 0 AND WARNING_HANDLE_RESULT =0";
|
||||
//DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0];
|
||||
//if (dt1 != null && dt1.Rows.Count > 0)
|
||||
//{
|
||||
|
||||
foreach (DataRow item in dt1.Rows)
|
||||
{
|
||||
Global.CmWarningLogMd_List.Add(new WarningLog
|
||||
{
|
||||
WarningCode = item["WARNING_CODE"].ToString(),
|
||||
WarningName = item["WARNING_NAME"].ToString(),
|
||||
WarningType = item["WARNING_TYPE"].ToString(),
|
||||
WarningMessage = item["WARNING_MESSAGE"].ToString(),
|
||||
WarningTime = Convert.ToDateTime(item["WARNING_TIME"]),
|
||||
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
|
||||
WaringStatus = 0,
|
||||
WarningHandleResult = 0,
|
||||
CreateBy = Convert.ToInt32(item["CREATE_BY"]),
|
||||
CreateTime = Convert.ToDateTime(item["CREATE_TIME"]),
|
||||
UpdateBy = Convert.ToInt32(item["UPDATE_BY"]),
|
||||
UpdateTime = Convert.ToDateTime(item["UPDATE_TIME"]),
|
||||
DataVersion = Convert.ToInt32(item["DATA_VERSION"]),
|
||||
});
|
||||
}
|
||||
string sql2 = $@"DELETE FROM CM_WARNING_LOG WHERE WARING_STATUS = 0 AND WARNING_HANDLE_RESULT =0";
|
||||
LeadDbHelperSQLite.Execute(sql2);
|
||||
}
|
||||
// foreach (DataRow item in dt1.Rows)
|
||||
// {
|
||||
// Global.CmWarningLogMd_List.Add(,new WarningLog
|
||||
// {
|
||||
// WarningCode = item["WARNING_CODE"].ToString(),
|
||||
// WarningName = item["WARNING_NAME"].ToString(),
|
||||
// WarningType = item["WARNING_TYPE"].ToString(),
|
||||
// WarningMessage = item["WARNING_MESSAGE"].ToString(),
|
||||
// WarningTime = Convert.ToDateTime(item["WARNING_TIME"]),
|
||||
// PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
|
||||
// WaringStatus = 0,
|
||||
// WarningHandleResult = 0,
|
||||
// CreateBy = Convert.ToInt32(item["CREATE_BY"]),
|
||||
// CreateTime = Convert.ToDateTime(item["CREATE_TIME"]),
|
||||
// UpdateBy = Convert.ToInt32(item["UPDATE_BY"]),
|
||||
// UpdateTime = Convert.ToDateTime(item["UPDATE_TIME"]),
|
||||
// DataVersion = Convert.ToInt32(item["DATA_VERSION"]),
|
||||
// });
|
||||
// }
|
||||
// string sql2 = $@"DELETE FROM CM_WARNING_LOG WHERE WARING_STATUS = 0 AND WARNING_HANDLE_RESULT =0";
|
||||
// LeadDbHelperSQLite.Execute(sql2);
|
||||
//}
|
||||
}
|
||||
//private void SetPlcItem(List<PlcItem> PlcItemMdList, DataRow item)
|
||||
//{
|
||||
@@ -825,86 +825,86 @@ namespace CleanMachineHMI
|
||||
timer.Enabled = false;
|
||||
Global.SysThIsRunFlag = false;
|
||||
PlcOperationHelper.Instance.eventAlarmLock = true;
|
||||
if (Global.CmWarningLogMd_List.Count > 0)
|
||||
{
|
||||
foreach (WarningLog item in Global.CmWarningLogMd_List)
|
||||
{
|
||||
if (item.WaringStatus == 0 && item.WarningHandleResult == 0)
|
||||
{
|
||||
string sql1 = $@"
|
||||
INSERT INTO CM_WARNING_LOG (
|
||||
WARNING_CODE,
|
||||
WARNING_NAME,
|
||||
WARNING_TYPE,
|
||||
WARNING_MESSAGE,
|
||||
WARNING_TIME,
|
||||
PLC_ITEM_CODE,
|
||||
WARING_STATUS,
|
||||
WARNING_HANDLE_RESULT,
|
||||
CREATE_BY,
|
||||
CREATE_TIME,
|
||||
UPDATE_BY,
|
||||
UPDATE_TIME,
|
||||
DATA_VERSION
|
||||
)
|
||||
VALUES (
|
||||
'{item.WarningCode}',
|
||||
'{item.WarningName}',
|
||||
'{item.WarningType}',
|
||||
'{item.WarningMessage}',
|
||||
'{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.PlcItemCode}',
|
||||
'{item.WaringStatus}',
|
||||
'{item.WarningHandleResult}',
|
||||
'{item.CreateBy}',
|
||||
'{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.UpdateBy}',
|
||||
'{item.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.DataVersion}'
|
||||
);
|
||||
";
|
||||
LeadDbHelperSQLite.Execute(sql1);
|
||||
}
|
||||
else
|
||||
{
|
||||
string sql1 = $@"
|
||||
INSERT INTO CM_WARNING_LOG (
|
||||
WARNING_CODE,
|
||||
WARNING_NAME,
|
||||
WARNING_TYPE,
|
||||
WARNING_MESSAGE,
|
||||
WARNING_TIME,
|
||||
PLC_ITEM_CODE,
|
||||
WARING_STATUS,
|
||||
WARNING_HANDLE_RESULT,
|
||||
WARNING_HANDLE_TIME,
|
||||
CREATE_BY,
|
||||
CREATE_TIME,
|
||||
UPDATE_BY,
|
||||
UPDATE_TIME,
|
||||
DATA_VERSION
|
||||
)
|
||||
VALUES (
|
||||
'{item.WarningCode}',
|
||||
'{item.WarningName}',
|
||||
'{item.WarningType}',
|
||||
'{item.WarningMessage}',
|
||||
'{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.PlcItemCode}',
|
||||
'{item.WaringStatus}',
|
||||
'{item.WarningHandleResult}',
|
||||
'{item.WarningHandleTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.CreateBy}',
|
||||
'{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.UpdateBy}',
|
||||
'{item.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
'{item.DataVersion}'
|
||||
);
|
||||
";
|
||||
LeadDbHelperSQLite.Execute(sql1);
|
||||
}
|
||||
}
|
||||
}
|
||||
//if (Global.CmWarningLogMd_List.Count > 0)
|
||||
//{
|
||||
// foreach (WarningLog item in Global.CmWarningLogMd_List.Values)
|
||||
// {
|
||||
// if (item.WaringStatus == 0 && item.WarningHandleResult == 0)
|
||||
// {
|
||||
// string sql1 = $@"
|
||||
// INSERT INTO CM_WARNING_LOG (
|
||||
// WARNING_CODE,
|
||||
// WARNING_NAME,
|
||||
// WARNING_TYPE,
|
||||
// WARNING_MESSAGE,
|
||||
// WARNING_TIME,
|
||||
// PLC_ITEM_CODE,
|
||||
// WARING_STATUS,
|
||||
// WARNING_HANDLE_RESULT,
|
||||
// CREATE_BY,
|
||||
// CREATE_TIME,
|
||||
// UPDATE_BY,
|
||||
// UPDATE_TIME,
|
||||
// DATA_VERSION
|
||||
// )
|
||||
// VALUES (
|
||||
// '{item.WarningCode}',
|
||||
// '{item.WarningName}',
|
||||
// '{item.WarningType}',
|
||||
// '{item.WarningMessage}',
|
||||
// '{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.PlcItemCode}',
|
||||
// '{item.WaringStatus}',
|
||||
// '{item.WarningHandleResult}',
|
||||
// '{item.CreateBy}',
|
||||
// '{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.UpdateBy}',
|
||||
// '{item.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.DataVersion}'
|
||||
// );
|
||||
// ";
|
||||
// LeadDbHelperSQLite.Execute(sql1);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// string sql1 = $@"
|
||||
// INSERT INTO CM_WARNING_LOG (
|
||||
// WARNING_CODE,
|
||||
// WARNING_NAME,
|
||||
// WARNING_TYPE,
|
||||
// WARNING_MESSAGE,
|
||||
// WARNING_TIME,
|
||||
// PLC_ITEM_CODE,
|
||||
// WARING_STATUS,
|
||||
// WARNING_HANDLE_RESULT,
|
||||
// WARNING_HANDLE_TIME,
|
||||
// CREATE_BY,
|
||||
// CREATE_TIME,
|
||||
// UPDATE_BY,
|
||||
// UPDATE_TIME,
|
||||
// DATA_VERSION
|
||||
// )
|
||||
// VALUES (
|
||||
// '{item.WarningCode}',
|
||||
// '{item.WarningName}',
|
||||
// '{item.WarningType}',
|
||||
// '{item.WarningMessage}',
|
||||
// '{item.WarningTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.PlcItemCode}',
|
||||
// '{item.WaringStatus}',
|
||||
// '{item.WarningHandleResult}',
|
||||
// '{item.WarningHandleTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.CreateBy}',
|
||||
// '{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.UpdateBy}',
|
||||
// '{item.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss")}',
|
||||
// '{item.DataVersion}'
|
||||
// );
|
||||
// ";
|
||||
// LeadDbHelperSQLite.Execute(sql1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
await Task.Delay(300);
|
||||
|
||||
if (isPlcConnStatus)
|
||||
|
||||
Reference in New Issue
Block a user