This commit is contained in:
gongxh
2022-05-19 12:55:26 +08:00
parent 1043fe18be
commit c738aeab37
5 changed files with 1047 additions and 984 deletions

View File

@@ -50,14 +50,31 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonButton3 = new Krypton.Toolkit.KryptonButton(); this.kryptonButton3 = new Krypton.Toolkit.KryptonButton();
this.knud_WorkedFullPalletNum = new Krypton.Toolkit.KryptonTextBox(); this.knud_WorkedFullPalletNum = new Krypton.Toolkit.KryptonTextBox();
this.kryptonGroupBox7 = new Krypton.Toolkit.KryptonGroupBox(); this.kryptonGroupBox7 = new Krypton.Toolkit.KryptonGroupBox();
this.circleButton1 = new CleanMachineHMI.CircleButton();
this.kryptonLabel12 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel12 = new Krypton.Toolkit.KryptonLabel();
this.kryptonLabel11 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel11 = new Krypton.Toolkit.KryptonLabel();
this.cbt_fpalletmod = new CleanMachineHMI.CircleButton();
this.cbt_staticbar = new CleanMachineHMI.CircleButton();
this.swtbtn_fullPalletMod = new CleanMachineHMI.LSwitchButton();
this.swtbtn_staticBar = new CleanMachineHMI.LSwitchButton();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.kryptonLabel6 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel6 = new Krypton.Toolkit.KryptonLabel();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.swtbtn_nozzle1 = new CleanMachineHMI.LSwitchButton();
this.cbt_RunStatusTran = new CleanMachineHMI.CircleButton();
this.cbt_NozzleStatusTran = new CleanMachineHMI.CircleButton();
this.cbt_ResetSys = new CleanMachineHMI.CircleButton();
this.kryptonLabel7 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel7 = new Krypton.Toolkit.KryptonLabel();
this.cbt_StopTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush3 = new CleanMachineHMI.LSwitchButton();
this.cbt_StartTran = new CleanMachineHMI.CircleButton();
this.cbt_Brush3StatusTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush1 = new CleanMachineHMI.LSwitchButton();
this.kryptonLabel8 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel8 = new Krypton.Toolkit.KryptonLabel();
this.cbt_Brush1StatusTran = new CleanMachineHMI.CircleButton();
this.kryptonLabel9 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel9 = new Krypton.Toolkit.KryptonLabel();
this.swtbtn_brush2 = new CleanMachineHMI.LSwitchButton();
this.cbt_Brush2StatusTran = new CleanMachineHMI.CircleButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kryptonGroupBox1 = new Krypton.Toolkit.KryptonGroupBox(); this.kryptonGroupBox1 = new Krypton.Toolkit.KryptonGroupBox();
this.kryptonLabel13 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel13 = new Krypton.Toolkit.KryptonLabel();
@@ -187,23 +204,6 @@ namespace CleanMachineHMI.FrmUserControl
this.btnIO = new Krypton.Toolkit.KryptonButton(); this.btnIO = new Krypton.Toolkit.KryptonButton();
this.btnManual = new Krypton.Toolkit.KryptonButton(); this.btnManual = new Krypton.Toolkit.KryptonButton();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.circleButton1 = new CleanMachineHMI.CircleButton();
this.cbt_fpalletmod = new CleanMachineHMI.CircleButton();
this.cbt_staticbar = new CleanMachineHMI.CircleButton();
this.swtbtn_fullPalletMod = new CleanMachineHMI.LSwitchButton();
this.swtbtn_staticBar = new CleanMachineHMI.LSwitchButton();
this.swtbtn_nozzle1 = new CleanMachineHMI.LSwitchButton();
this.cbt_RunStatusTran = new CleanMachineHMI.CircleButton();
this.cbt_NozzleStatusTran = new CleanMachineHMI.CircleButton();
this.cbt_ResetSys = new CleanMachineHMI.CircleButton();
this.cbt_StopTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush3 = new CleanMachineHMI.LSwitchButton();
this.cbt_StartTran = new CleanMachineHMI.CircleButton();
this.cbt_Brush3StatusTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush1 = new CleanMachineHMI.LSwitchButton();
this.cbt_Brush1StatusTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush2 = new CleanMachineHMI.LSwitchButton();
this.cbt_Brush2StatusTran = new CleanMachineHMI.CircleButton();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8.Panel)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8.Panel)).BeginInit();
this.kryptonGroupBox8.Panel.SuspendLayout(); this.kryptonGroupBox8.Panel.SuspendLayout();
@@ -529,6 +529,21 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonGroupBox7.TabIndex = 5; this.kryptonGroupBox7.TabIndex = 5;
this.kryptonGroupBox7.Values.Heading = ""; this.kryptonGroupBox7.Values.Heading = "";
// //
// circleButton1
//
this.circleButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.circleButton1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.circleButton1.ForeColor = System.Drawing.Color.White;
this.circleButton1.Location = new System.Drawing.Point(68, 331);
this.circleButton1.Name = "circleButton1";
this.circleButton1.Size = new System.Drawing.Size(60, 60);
this.circleButton1.TabIndex = 53;
this.circleButton1.Text = "Auto Stop";
this.circleButton1.UseVisualStyleBackColor = false;
this.circleButton1.Visible = false;
this.circleButton1.Click += new System.EventHandler(this.circleButton1_Click);
this.circleButton1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.circleButton1_KeyUp);
//
// kryptonLabel12 // kryptonLabel12
// //
this.kryptonLabel12.Location = new System.Drawing.Point(21, 302); this.kryptonLabel12.Location = new System.Drawing.Point(21, 302);
@@ -546,6 +561,62 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonLabel11.TabIndex = 50; this.kryptonLabel11.TabIndex = 50;
this.kryptonLabel11.Values.Text = "静电棒"; this.kryptonLabel11.Values.Text = "静电棒";
// //
// cbt_fpalletmod
//
this.cbt_fpalletmod.BackColor = System.Drawing.Color.Gray;
this.cbt_fpalletmod.Location = new System.Drawing.Point(203, 300);
this.cbt_fpalletmod.Name = "cbt_fpalletmod";
this.cbt_fpalletmod.Size = new System.Drawing.Size(30, 30);
this.cbt_fpalletmod.TabIndex = 49;
this.cbt_fpalletmod.UseVisualStyleBackColor = false;
this.cbt_fpalletmod.Visible = false;
//
// cbt_staticbar
//
this.cbt_staticbar.BackColor = System.Drawing.Color.Gray;
this.cbt_staticbar.Location = new System.Drawing.Point(203, 241);
this.cbt_staticbar.Name = "cbt_staticbar";
this.cbt_staticbar.Size = new System.Drawing.Size(30, 30);
this.cbt_staticbar.TabIndex = 48;
this.cbt_staticbar.UseVisualStyleBackColor = false;
//
// swtbtn_fullPalletMod
//
this.swtbtn_fullPalletMod.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_fullPalletMod.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_fullPalletMod.L_BarHight = 24;
this.swtbtn_fullPalletMod.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_fullPalletMod.L_DotColor = System.Drawing.Color.White;
this.swtbtn_fullPalletMod.L_DotHight = 20;
this.swtbtn_fullPalletMod.L_IsOpen = false;
this.swtbtn_fullPalletMod.L_Margin = 2;
this.swtbtn_fullPalletMod.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_fullPalletMod.Location = new System.Drawing.Point(106, 300);
this.swtbtn_fullPalletMod.Name = "swtbtn_fullPalletMod";
this.swtbtn_fullPalletMod.Size = new System.Drawing.Size(58, 25);
this.swtbtn_fullPalletMod.TabIndex = 47;
this.swtbtn_fullPalletMod.Text = "lSwitchButton4";
this.swtbtn_fullPalletMod.Visible = false;
this.swtbtn_fullPalletMod.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_fullPalletMod_LSwitched);
//
// swtbtn_staticBar
//
this.swtbtn_staticBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_staticBar.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_staticBar.L_BarHight = 24;
this.swtbtn_staticBar.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_staticBar.L_DotColor = System.Drawing.Color.White;
this.swtbtn_staticBar.L_DotHight = 20;
this.swtbtn_staticBar.L_IsOpen = false;
this.swtbtn_staticBar.L_Margin = 2;
this.swtbtn_staticBar.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_staticBar.Location = new System.Drawing.Point(105, 241);
this.swtbtn_staticBar.Name = "swtbtn_staticBar";
this.swtbtn_staticBar.Size = new System.Drawing.Size(58, 25);
this.swtbtn_staticBar.TabIndex = 46;
this.swtbtn_staticBar.Text = "lSwitchButton4";
this.swtbtn_staticBar.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_staticBar_LSwitched);
//
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
@@ -579,6 +650,58 @@ namespace CleanMachineHMI.FrmUserControl
this.label1.TabIndex = 8; this.label1.TabIndex = 8;
this.label1.Text = "系统运行"; this.label1.Text = "系统运行";
// //
// swtbtn_nozzle1
//
this.swtbtn_nozzle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_nozzle1.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_nozzle1.L_BarHight = 24;
this.swtbtn_nozzle1.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_nozzle1.L_DotColor = System.Drawing.Color.White;
this.swtbtn_nozzle1.L_DotHight = 20;
this.swtbtn_nozzle1.L_IsOpen = false;
this.swtbtn_nozzle1.L_Margin = 2;
this.swtbtn_nozzle1.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_nozzle1.Location = new System.Drawing.Point(106, 271);
this.swtbtn_nozzle1.Name = "swtbtn_nozzle1";
this.swtbtn_nozzle1.Size = new System.Drawing.Size(58, 25);
this.swtbtn_nozzle1.TabIndex = 43;
this.swtbtn_nozzle1.Text = "lSwitchButton4";
this.swtbtn_nozzle1.Visible = false;
this.swtbtn_nozzle1.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_nozzle1_LSwitched);
//
// cbt_RunStatusTran
//
this.cbt_RunStatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_RunStatusTran.Location = new System.Drawing.Point(203, 5);
this.cbt_RunStatusTran.Name = "cbt_RunStatusTran";
this.cbt_RunStatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_RunStatusTran.TabIndex = 7;
this.cbt_RunStatusTran.UseVisualStyleBackColor = false;
//
// cbt_NozzleStatusTran
//
this.cbt_NozzleStatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_NozzleStatusTran.Location = new System.Drawing.Point(203, 272);
this.cbt_NozzleStatusTran.Name = "cbt_NozzleStatusTran";
this.cbt_NozzleStatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_NozzleStatusTran.TabIndex = 42;
this.cbt_NozzleStatusTran.UseVisualStyleBackColor = false;
this.cbt_NozzleStatusTran.Visible = false;
//
// cbt_ResetSys
//
this.cbt_ResetSys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(153)))), ((int)(((byte)(0)))));
this.cbt_ResetSys.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_ResetSys.ForeColor = System.Drawing.Color.White;
this.cbt_ResetSys.Location = new System.Drawing.Point(162, 41);
this.cbt_ResetSys.Name = "cbt_ResetSys";
this.cbt_ResetSys.Size = new System.Drawing.Size(60, 60);
this.cbt_ResetSys.TabIndex = 5;
this.cbt_ResetSys.Text = "RESET";
this.cbt_ResetSys.UseVisualStyleBackColor = false;
this.cbt_ResetSys.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseDown);
this.cbt_ResetSys.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseUp);
//
// kryptonLabel7 // kryptonLabel7
// //
this.kryptonLabel7.Location = new System.Drawing.Point(20, 213); this.kryptonLabel7.Location = new System.Drawing.Point(20, 213);
@@ -587,6 +710,80 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonLabel7.TabIndex = 41; this.kryptonLabel7.TabIndex = 41;
this.kryptonLabel7.Values.Text = "毛刷3"; this.kryptonLabel7.Values.Text = "毛刷3";
// //
// cbt_StopTran
//
this.cbt_StopTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.cbt_StopTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_StopTran.ForeColor = System.Drawing.Color.White;
this.cbt_StopTran.Location = new System.Drawing.Point(96, 41);
this.cbt_StopTran.Name = "cbt_StopTran";
this.cbt_StopTran.Size = new System.Drawing.Size(60, 60);
this.cbt_StopTran.TabIndex = 5;
this.cbt_StopTran.Text = "STOP";
this.cbt_StopTran.UseVisualStyleBackColor = false;
this.cbt_StopTran.Click += new System.EventHandler(this.cbt_StopTran_Click);
this.cbt_StopTran.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_StopTran_MouseDown);
this.cbt_StopTran.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_StopTran_MouseUp);
//
// swtbtn_brush3
//
this.swtbtn_brush3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush3.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush3.L_BarHight = 24;
this.swtbtn_brush3.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush3.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush3.L_DotHight = 20;
this.swtbtn_brush3.L_IsOpen = false;
this.swtbtn_brush3.L_Margin = 2;
this.swtbtn_brush3.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush3.Location = new System.Drawing.Point(105, 211);
this.swtbtn_brush3.Name = "swtbtn_brush3";
this.swtbtn_brush3.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush3.TabIndex = 40;
this.swtbtn_brush3.Text = "lSwitchButton3";
this.swtbtn_brush3.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush3_LSwitched);
//
// cbt_StartTran
//
this.cbt_StartTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(190)))), ((int)(((byte)(107)))));
this.cbt_StartTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_StartTran.Location = new System.Drawing.Point(30, 41);
this.cbt_StartTran.Name = "cbt_StartTran";
this.cbt_StartTran.Size = new System.Drawing.Size(60, 60);
this.cbt_StartTran.TabIndex = 5;
this.cbt_StartTran.Text = "START";
this.cbt_StartTran.UseVisualStyleBackColor = false;
this.cbt_StartTran.Click += new System.EventHandler(this.cbt_StartTran_Click);
this.cbt_StartTran.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_StartTran_MouseDown);
this.cbt_StartTran.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_StartTran_MouseUp);
//
// cbt_Brush3StatusTran
//
this.cbt_Brush3StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush3StatusTran.Location = new System.Drawing.Point(203, 210);
this.cbt_Brush3StatusTran.Name = "cbt_Brush3StatusTran";
this.cbt_Brush3StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush3StatusTran.TabIndex = 39;
this.cbt_Brush3StatusTran.UseVisualStyleBackColor = false;
//
// swtbtn_brush1
//
this.swtbtn_brush1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush1.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush1.L_BarHight = 24;
this.swtbtn_brush1.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush1.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush1.L_DotHight = 20;
this.swtbtn_brush1.L_IsOpen = false;
this.swtbtn_brush1.L_Margin = 2;
this.swtbtn_brush1.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush1.Location = new System.Drawing.Point(105, 153);
this.swtbtn_brush1.Name = "swtbtn_brush1";
this.swtbtn_brush1.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush1.TabIndex = 35;
this.swtbtn_brush1.Text = "lSwitchButton1";
this.swtbtn_brush1.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush1_LSwitched);
//
// kryptonLabel8 // kryptonLabel8
// //
this.kryptonLabel8.Location = new System.Drawing.Point(20, 184); this.kryptonLabel8.Location = new System.Drawing.Point(20, 184);
@@ -595,6 +792,15 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonLabel8.TabIndex = 38; this.kryptonLabel8.TabIndex = 38;
this.kryptonLabel8.Values.Text = "毛刷2"; this.kryptonLabel8.Values.Text = "毛刷2";
// //
// cbt_Brush1StatusTran
//
this.cbt_Brush1StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush1StatusTran.Location = new System.Drawing.Point(203, 150);
this.cbt_Brush1StatusTran.Name = "cbt_Brush1StatusTran";
this.cbt_Brush1StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush1StatusTran.TabIndex = 33;
this.cbt_Brush1StatusTran.UseVisualStyleBackColor = false;
//
// kryptonLabel9 // kryptonLabel9
// //
this.kryptonLabel9.Location = new System.Drawing.Point(20, 155); this.kryptonLabel9.Location = new System.Drawing.Point(20, 155);
@@ -603,6 +809,33 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonLabel9.TabIndex = 34; this.kryptonLabel9.TabIndex = 34;
this.kryptonLabel9.Values.Text = "毛刷1"; this.kryptonLabel9.Values.Text = "毛刷1";
// //
// swtbtn_brush2
//
this.swtbtn_brush2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush2.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush2.L_BarHight = 24;
this.swtbtn_brush2.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush2.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush2.L_DotHight = 20;
this.swtbtn_brush2.L_IsOpen = false;
this.swtbtn_brush2.L_Margin = 2;
this.swtbtn_brush2.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush2.Location = new System.Drawing.Point(105, 182);
this.swtbtn_brush2.Name = "swtbtn_brush2";
this.swtbtn_brush2.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush2.TabIndex = 37;
this.swtbtn_brush2.Text = "lSwitchButton2";
this.swtbtn_brush2.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush2_LSwitched);
//
// cbt_Brush2StatusTran
//
this.cbt_Brush2StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush2StatusTran.Location = new System.Drawing.Point(203, 180);
this.cbt_Brush2StatusTran.Name = "cbt_Brush2StatusTran";
this.cbt_Brush2StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush2StatusTran.TabIndex = 36;
this.cbt_Brush2StatusTran.UseVisualStyleBackColor = false;
//
// tableLayoutPanel2 // tableLayoutPanel2
// //
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent; this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
@@ -810,6 +1043,7 @@ namespace CleanMachineHMI.FrmUserControl
this.ktb_ShiftCount.Size = new System.Drawing.Size(71, 23); this.ktb_ShiftCount.Size = new System.Drawing.Size(71, 23);
this.ktb_ShiftCount.TabIndex = 1; this.ktb_ShiftCount.TabIndex = 1;
this.ktb_ShiftCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.ktb_ShiftCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.ktb_ShiftCount.Visible = false;
// //
// ktb_FinishedPalletNum // ktb_FinishedPalletNum
// //
@@ -839,6 +1073,7 @@ namespace CleanMachineHMI.FrmUserControl
this.kryptonLabel16.Size = new System.Drawing.Size(76, 20); this.kryptonLabel16.Size = new System.Drawing.Size(76, 20);
this.kryptonLabel16.TabIndex = 0; this.kryptonLabel16.TabIndex = 0;
this.kryptonLabel16.Values.Text = "Shift Count"; this.kryptonLabel16.Values.Text = "Shift Count";
this.kryptonLabel16.Visible = false;
// //
// kryptonLabel15 // kryptonLabel15
// //
@@ -2563,239 +2798,6 @@ namespace CleanMachineHMI.FrmUserControl
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
// //
// circleButton1
//
this.circleButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.circleButton1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.circleButton1.ForeColor = System.Drawing.Color.White;
this.circleButton1.Location = new System.Drawing.Point(68, 331);
this.circleButton1.Name = "circleButton1";
this.circleButton1.Size = new System.Drawing.Size(60, 60);
this.circleButton1.TabIndex = 53;
this.circleButton1.Text = "Auto Stop";
this.circleButton1.UseVisualStyleBackColor = false;
this.circleButton1.Visible = false;
this.circleButton1.Click += new System.EventHandler(this.circleButton1_Click);
this.circleButton1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.circleButton1_KeyUp);
//
// cbt_fpalletmod
//
this.cbt_fpalletmod.BackColor = System.Drawing.Color.Gray;
this.cbt_fpalletmod.Location = new System.Drawing.Point(203, 300);
this.cbt_fpalletmod.Name = "cbt_fpalletmod";
this.cbt_fpalletmod.Size = new System.Drawing.Size(30, 30);
this.cbt_fpalletmod.TabIndex = 49;
this.cbt_fpalletmod.UseVisualStyleBackColor = false;
this.cbt_fpalletmod.Visible = false;
//
// cbt_staticbar
//
this.cbt_staticbar.BackColor = System.Drawing.Color.Gray;
this.cbt_staticbar.Location = new System.Drawing.Point(203, 241);
this.cbt_staticbar.Name = "cbt_staticbar";
this.cbt_staticbar.Size = new System.Drawing.Size(30, 30);
this.cbt_staticbar.TabIndex = 48;
this.cbt_staticbar.UseVisualStyleBackColor = false;
//
// swtbtn_fullPalletMod
//
this.swtbtn_fullPalletMod.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_fullPalletMod.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_fullPalletMod.L_BarHight = 24;
this.swtbtn_fullPalletMod.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_fullPalletMod.L_DotColor = System.Drawing.Color.White;
this.swtbtn_fullPalletMod.L_DotHight = 20;
this.swtbtn_fullPalletMod.L_IsOpen = false;
this.swtbtn_fullPalletMod.L_Margin = 2;
this.swtbtn_fullPalletMod.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_fullPalletMod.Location = new System.Drawing.Point(106, 300);
this.swtbtn_fullPalletMod.Name = "swtbtn_fullPalletMod";
this.swtbtn_fullPalletMod.Size = new System.Drawing.Size(58, 25);
this.swtbtn_fullPalletMod.TabIndex = 47;
this.swtbtn_fullPalletMod.Text = "lSwitchButton4";
this.swtbtn_fullPalletMod.Visible = false;
this.swtbtn_fullPalletMod.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_fullPalletMod_LSwitched);
//
// swtbtn_staticBar
//
this.swtbtn_staticBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_staticBar.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_staticBar.L_BarHight = 24;
this.swtbtn_staticBar.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_staticBar.L_DotColor = System.Drawing.Color.White;
this.swtbtn_staticBar.L_DotHight = 20;
this.swtbtn_staticBar.L_IsOpen = false;
this.swtbtn_staticBar.L_Margin = 2;
this.swtbtn_staticBar.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_staticBar.Location = new System.Drawing.Point(105, 241);
this.swtbtn_staticBar.Name = "swtbtn_staticBar";
this.swtbtn_staticBar.Size = new System.Drawing.Size(58, 25);
this.swtbtn_staticBar.TabIndex = 46;
this.swtbtn_staticBar.Text = "lSwitchButton4";
this.swtbtn_staticBar.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_staticBar_LSwitched);
//
// swtbtn_nozzle1
//
this.swtbtn_nozzle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_nozzle1.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_nozzle1.L_BarHight = 24;
this.swtbtn_nozzle1.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_nozzle1.L_DotColor = System.Drawing.Color.White;
this.swtbtn_nozzle1.L_DotHight = 20;
this.swtbtn_nozzle1.L_IsOpen = false;
this.swtbtn_nozzle1.L_Margin = 2;
this.swtbtn_nozzle1.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_nozzle1.Location = new System.Drawing.Point(106, 271);
this.swtbtn_nozzle1.Name = "swtbtn_nozzle1";
this.swtbtn_nozzle1.Size = new System.Drawing.Size(58, 25);
this.swtbtn_nozzle1.TabIndex = 43;
this.swtbtn_nozzle1.Text = "lSwitchButton4";
this.swtbtn_nozzle1.Visible = false;
this.swtbtn_nozzle1.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_nozzle1_LSwitched);
//
// cbt_RunStatusTran
//
this.cbt_RunStatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_RunStatusTran.Location = new System.Drawing.Point(203, 5);
this.cbt_RunStatusTran.Name = "cbt_RunStatusTran";
this.cbt_RunStatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_RunStatusTran.TabIndex = 7;
this.cbt_RunStatusTran.UseVisualStyleBackColor = false;
//
// cbt_NozzleStatusTran
//
this.cbt_NozzleStatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_NozzleStatusTran.Location = new System.Drawing.Point(203, 272);
this.cbt_NozzleStatusTran.Name = "cbt_NozzleStatusTran";
this.cbt_NozzleStatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_NozzleStatusTran.TabIndex = 42;
this.cbt_NozzleStatusTran.UseVisualStyleBackColor = false;
this.cbt_NozzleStatusTran.Visible = false;
//
// cbt_ResetSys
//
this.cbt_ResetSys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(153)))), ((int)(((byte)(0)))));
this.cbt_ResetSys.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_ResetSys.ForeColor = System.Drawing.Color.White;
this.cbt_ResetSys.Location = new System.Drawing.Point(182, 41);
this.cbt_ResetSys.Name = "cbt_ResetSys";
this.cbt_ResetSys.Size = new System.Drawing.Size(60, 60);
this.cbt_ResetSys.TabIndex = 5;
this.cbt_ResetSys.Text = "RESET";
this.cbt_ResetSys.UseVisualStyleBackColor = false;
this.cbt_ResetSys.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseDown);
this.cbt_ResetSys.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseUp);
//
// cbt_StopTran
//
this.cbt_StopTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.cbt_StopTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_StopTran.ForeColor = System.Drawing.Color.White;
this.cbt_StopTran.Location = new System.Drawing.Point(96, 41);
this.cbt_StopTran.Name = "cbt_StopTran";
this.cbt_StopTran.Size = new System.Drawing.Size(60, 60);
this.cbt_StopTran.TabIndex = 5;
this.cbt_StopTran.Text = "STOP";
this.cbt_StopTran.UseVisualStyleBackColor = false;
this.cbt_StopTran.Click += new System.EventHandler(this.cbt_StopTran_Click);
this.cbt_StopTran.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_StopTran_MouseDown);
this.cbt_StopTran.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_StopTran_MouseUp);
//
// swtbtn_brush3
//
this.swtbtn_brush3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush3.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush3.L_BarHight = 24;
this.swtbtn_brush3.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush3.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush3.L_DotHight = 20;
this.swtbtn_brush3.L_IsOpen = false;
this.swtbtn_brush3.L_Margin = 2;
this.swtbtn_brush3.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush3.Location = new System.Drawing.Point(105, 211);
this.swtbtn_brush3.Name = "swtbtn_brush3";
this.swtbtn_brush3.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush3.TabIndex = 40;
this.swtbtn_brush3.Text = "lSwitchButton3";
this.swtbtn_brush3.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush3_LSwitched);
//
// cbt_StartTran
//
this.cbt_StartTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(190)))), ((int)(((byte)(107)))));
this.cbt_StartTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_StartTran.Location = new System.Drawing.Point(9, 41);
this.cbt_StartTran.Name = "cbt_StartTran";
this.cbt_StartTran.Size = new System.Drawing.Size(60, 60);
this.cbt_StartTran.TabIndex = 5;
this.cbt_StartTran.Text = "START";
this.cbt_StartTran.UseVisualStyleBackColor = false;
this.cbt_StartTran.Click += new System.EventHandler(this.cbt_StartTran_Click);
this.cbt_StartTran.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_StartTran_MouseDown);
this.cbt_StartTran.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_StartTran_MouseUp);
//
// cbt_Brush3StatusTran
//
this.cbt_Brush3StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush3StatusTran.Location = new System.Drawing.Point(203, 210);
this.cbt_Brush3StatusTran.Name = "cbt_Brush3StatusTran";
this.cbt_Brush3StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush3StatusTran.TabIndex = 39;
this.cbt_Brush3StatusTran.UseVisualStyleBackColor = false;
//
// swtbtn_brush1
//
this.swtbtn_brush1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush1.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush1.L_BarHight = 24;
this.swtbtn_brush1.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush1.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush1.L_DotHight = 20;
this.swtbtn_brush1.L_IsOpen = false;
this.swtbtn_brush1.L_Margin = 2;
this.swtbtn_brush1.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush1.Location = new System.Drawing.Point(105, 153);
this.swtbtn_brush1.Name = "swtbtn_brush1";
this.swtbtn_brush1.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush1.TabIndex = 35;
this.swtbtn_brush1.Text = "lSwitchButton1";
this.swtbtn_brush1.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush1_LSwitched);
//
// cbt_Brush1StatusTran
//
this.cbt_Brush1StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush1StatusTran.Location = new System.Drawing.Point(203, 150);
this.cbt_Brush1StatusTran.Name = "cbt_Brush1StatusTran";
this.cbt_Brush1StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush1StatusTran.TabIndex = 33;
this.cbt_Brush1StatusTran.UseVisualStyleBackColor = false;
//
// swtbtn_brush2
//
this.swtbtn_brush2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush2.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush2.L_BarHight = 24;
this.swtbtn_brush2.L_CloseColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
this.swtbtn_brush2.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush2.L_DotHight = 20;
this.swtbtn_brush2.L_IsOpen = false;
this.swtbtn_brush2.L_Margin = 2;
this.swtbtn_brush2.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush2.Location = new System.Drawing.Point(105, 182);
this.swtbtn_brush2.Name = "swtbtn_brush2";
this.swtbtn_brush2.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush2.TabIndex = 37;
this.swtbtn_brush2.Text = "lSwitchButton2";
this.swtbtn_brush2.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush2_LSwitched);
//
// cbt_Brush2StatusTran
//
this.cbt_Brush2StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush2StatusTran.Location = new System.Drawing.Point(203, 180);
this.cbt_Brush2StatusTran.Name = "cbt_Brush2StatusTran";
this.cbt_Brush2StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush2StatusTran.TabIndex = 36;
this.cbt_Brush2StatusTran.UseVisualStyleBackColor = false;
//
// frmMainDetailNew // frmMainDetailNew
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@@ -244,15 +244,7 @@ namespace CleanMachineHMI
} }
} }
// 定义一个委托类型的事件 // 定义一个委托类型的事件
public static event EventHandler<EventArgs> OnShowMainFrmAlarmMsg;
public static bool eventAlarmLock = false;
public static void ShowMainFrmAlarmMsg(object sender, EventArgs e)
{
if (!eventAlarmLock)
{
OnShowMainFrmAlarmMsg?.Invoke(sender, e);
}
}
public static frmPopupWarningMsg PopupWarningMsgForm { get; set; } public static frmPopupWarningMsg PopupWarningMsgForm { get; set; }
//定义一个委托类型的事件 //定义一个委托类型的事件
public static event EventHandler<EventArgs> OnSyncFinishPalletData; public static event EventHandler<EventArgs> OnSyncFinishPalletData;

View File

@@ -162,6 +162,9 @@ namespace CleanMachineHMI
// public System.Threading.AutoResetEvent thEvent = new System.Threading.AutoResetEvent(false); // public System.Threading.AutoResetEvent thEvent = new System.Threading.AutoResetEvent(false);
private void RefreshPlcItem() private void RefreshPlcItem()
{ {
Stopwatch stopWatch = new Stopwatch(); Stopwatch stopWatch = new Stopwatch();
@@ -465,28 +468,40 @@ namespace CleanMachineHMI
} }
string priStr = "D"; string priStr = "D";
int index = 10; int index = 10;
bool alarmChange = false;
Global.CmWarningLogMd_List.Clear(); Global.CmWarningLogMd_List.Clear();
for (var i = 0; i < 9; i++) for (var i = 0; i < 9; i++)
{ {
var plcitem = $"{priStr}{index + i}"; var plcitem = $"{priStr}{index + i}";
if (lastAlarm[i] != tmpReadAlarmBytArr_D[i])
{
if (tmpReadAlarmBytArr_D[i] != 0) if (tmpReadAlarmBytArr_D[i] != 0)
{ {
var wanglist = Global.CheckWarng(tmpReadAlarmBytArr_D[i], plcitem); var wanglist = Global.CheckWarng(tmpReadAlarmBytArr_D[i], plcitem);
Global.CmWarningLogMd_List.AddRange(wanglist); Global.CmWarningLogMd_List.AddRange(wanglist);
}
lastAlarm[i] = tmpReadAlarmBytArr_D[i];
alarmChange = true;
} }
}
}
if (Global.CmWarningLogMd_List.Count() > 0) if (alarmChange)
{ {
Global.ShowMainFrmAlarmMsg(true, EventArgs.Empty); ShowMainFrmAlarmMsg();
}
else
{
Global.ShowMainFrmAlarmMsg(false, EventArgs.Empty);
} }
//if (Global.CmWarningLogMd_List.Count() > 0)
//{
// ShowMainFrmAlarmMsg(true, EventArgs.Empty);
//}
//else
//{
// ShowMainFrmAlarmMsg(false, EventArgs.Empty);
//}
// HandleWaringLog(tmpReadAlarmBytArr_D); // HandleWaringLog(tmpReadAlarmBytArr_D);
} }
@@ -499,11 +514,40 @@ namespace CleanMachineHMI
#endif #endif
} }
ushort[] lastAlarm = new ushort[9] { 0, 0, 0, 0, 0, 0, 0, 0, 0, };
public delegate void AlarmChange();
public event AlarmChange OnShowMainFrmAlarmMsg;
public void DoShowAlarm(object param)
{
if (!eventAlarmLock)
{
OnShowMainFrmAlarmMsg?.Invoke();
}
}
public bool eventAlarmLock = false;
public void ShowMainFrmAlarmMsg()
{
if (_synchronization != null)
{
_synchronization.Post(DoShowAlarm, null);
}
}
//报警信息记录 //报警信息记录
private void HandleWaringLog(ushort[] tmpReadAlarmBytArr_D) private void HandleWaringLog(ushort[] tmpReadAlarmBytArr_D)
{ {
@@ -826,12 +870,12 @@ namespace CleanMachineHMI
if (Global.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WaringStatus == 0).Count > 0) if (Global.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WaringStatus == 0).Count > 0)
{ {
//frmMainNew.Show_ptb_Alarm(true); //frmMainNew.Show_ptb_Alarm(true);
Global.ShowMainFrmAlarmMsg(true, EventArgs.Empty); ShowMainFrmAlarmMsg();
} }
else else
{ {
//frmMainNew.Show_ptb_Alarm(false); //frmMainNew.Show_ptb_Alarm(false);
Global.ShowMainFrmAlarmMsg(false, EventArgs.Empty); ShowMainFrmAlarmMsg();
} }
#if RELEASE #if RELEASE
} }
@@ -1231,7 +1275,7 @@ namespace CleanMachineHMI
if (DateTime.Now > HeartbeatTime.AddSeconds(5))//心跳超时 if (DateTime.Now > HeartbeatTime.AddSeconds(5))//心跳超时
{ {
isConn = false; IsConn = false;
//报警处理。 //报警处理。
frmMainNew.Show_Plc_Alarm("PLC heartbeat data is abnormal, PLC loses connection!"); frmMainNew.Show_Plc_Alarm("PLC heartbeat data is abnormal, PLC loses connection!");
if (ReConnNum % 5 == 0) if (ReConnNum % 5 == 0)

View File

@@ -31,6 +31,7 @@ namespace CleanMachineHMI
private void btnExit_Click(object sender, EventArgs e) private void btnExit_Click(object sender, EventArgs e)
{ {
Application.Exit(); Application.Exit();
} }

View File

@@ -304,7 +304,7 @@ namespace CleanMachineHMI
MothedShowMessage = new dlgShowMessage(Test); MothedShowMessage = new dlgShowMessage(Test);
RefreshFrmHost = new dlgRefreshFrmHost(ShowWorkingPalletFullNumAlarm); RefreshFrmHost = new dlgRefreshFrmHost(ShowWorkingPalletFullNumAlarm);
//Show_ptb_Alarm = new dlgShow_ptb_Alarm(ShowPicAlarm); //Show_ptb_Alarm = new dlgShow_ptb_Alarm(ShowPicAlarm);
Global.OnShowMainFrmAlarmMsg += ShowPicAlarm; PlcOperationHelper.Instance.OnShowMainFrmAlarmMsg += ShowPicAlarm;
Show_Plc_Alarm = new dlgShow_Plc_Alarm(ShowPlcAlarm); Show_Plc_Alarm = new dlgShow_Plc_Alarm(ShowPlcAlarm);
RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag); RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag);
timer.Enabled = true; timer.Enabled = true;
@@ -368,17 +368,20 @@ namespace CleanMachineHMI
label3Professional.Text = msg; label3Professional.Text = msg;
})); }));
} }
private void ShowPicAlarm(object isShowFlag, EventArgs e) private void ShowPicAlarm()
{ {
Invoke(new Action(() =>
{ ptb_Alarm.Visible = Global.CmWarningLogMd_List.Count > 0;
ptb_Alarm.Visible = (bool)isShowFlag;
KryptonPage tmpPage = kryptonNavigator1.Pages.FirstOrDefault(x => x.Name == EnumFormType.PlcAlarmLog.ToString()); //Invoke(new Action(() =>
if (tmpPage != null && (bool)isShowFlag) //{
{ // ptb_Alarm.Visible = (bool)isShowFlag;
frmPlcAlarmLog.RefreshFrmHost(false); // KryptonPage tmpPage = kryptonNavigator1.Pages.FirstOrDefault(x => x.Name == EnumFormType.PlcAlarmLog.ToString());
} // if (tmpPage != null && (bool)isShowFlag)
})); // {
// frmPlcAlarmLog.RefreshFrmHost(false);
// }
//}));
} }
private void InitWarningMsg() private void InitWarningMsg()
{ {
@@ -555,7 +558,8 @@ namespace CleanMachineHMI
//var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList(""); //var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList("");
//int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue); //int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue);
//int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue); //int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue);
bool lastShowscrapRate = false;
int showdMinit = 0;
while (Global.SysThIsRunFlag) while (Global.SysThIsRunFlag)
{ {
#if !DEBUG #if !DEBUG
@@ -566,6 +570,7 @@ namespace CleanMachineHMI
//当前托报废率超过10%,则提示 //当前托报废率超过10%,则提示
string sql_CurrPalletmsg = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0"; string sql_CurrPalletmsg = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
DataTable dt_CurrPalletmsg = LeadDbHelperSQLite.Query(sql_CurrPalletmsg).Tables[0]; DataTable dt_CurrPalletmsg = LeadDbHelperSQLite.Query(sql_CurrPalletmsg).Tables[0];
bool showscrapRate = false;
if (dt_CurrPalletmsg != null && dt_CurrPalletmsg.Rows.Count > 0) if (dt_CurrPalletmsg != null && dt_CurrPalletmsg.Rows.Count > 0)
{ {
string palletCodeMsg = dt_CurrPalletmsg.Rows[0]["WORKING_PALLET_CODE"].ToString(); string palletCodeMsg = dt_CurrPalletmsg.Rows[0]["WORKING_PALLET_CODE"].ToString();
@@ -600,6 +605,7 @@ namespace CleanMachineHMI
} }
} }
int Minutes = 0;
if (Global.UserInfo != null) if (Global.UserInfo != null)
{ {
@@ -610,16 +616,22 @@ namespace CleanMachineHMI
new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName); new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName);
int Minutes = (SysRunTime - CleanMachineHMI.Global.MaintainTime) / 60; Minutes = (SysRunTime - CleanMachineHMI.Global.MaintainTime) / 60;
if (showdMinit != Minutes)
{
showdMinit = Minutes;
BeginInvoke(new Action(() => BeginInvoke(new Action(() =>
{ {
kryptonLabel1.Text = Minutes + " Minutes"; kryptonLabel1.Text = Minutes + " Minutes";
pictureBox1.Visible = Minutes >= Global.MaintainAlarmTime; pictureBox1.Visible = Minutes >= Global.MaintainAlarmTime;
})); }));
} }
}
} }
@@ -786,9 +798,21 @@ namespace CleanMachineHMI
{ {
Task.Run(async delegate Task.Run(async delegate
{ {
if (Global.UserInfo != null)
{
int SysRunTime = (int)PlcOperationHelper.Instance.ReadPlcItem("SysRuningTime", PlcItemTypeDesc.D);
if (SysRunTime != 0)
{
new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName);
}
}
timer.Enabled = false; timer.Enabled = false;
Global.SysThIsRunFlag = false; Global.SysThIsRunFlag = false;
Global.eventAlarmLock = true; PlcOperationHelper.Instance.eventAlarmLock = true;
if (Global.CmWarningLogMd_List.Count > 0) if (Global.CmWarningLogMd_List.Count > 0)
{ {
foreach (WarningLog item in Global.CmWarningLogMd_List) foreach (WarningLog item in Global.CmWarningLogMd_List)