diff --git a/CleanMachine.BLL/SYS/ParameterBLL.cs b/CleanMachine.BLL/SYS/ParameterBLL.cs index 7adade3..9a185c9 100644 --- a/CleanMachine.BLL/SYS/ParameterBLL.cs +++ b/CleanMachine.BLL/SYS/ParameterBLL.cs @@ -9,83 +9,93 @@ using CleanMachine.DAL.SYS; namespace CleanMachine.BLL.SYS { - /// + /// /// /// - public class ParameterBLL - { - - public ParameterBLL() - { - - } - #region 一般方法 - /// + public class ParameterBLL + { + + public ParameterBLL() + { + + } + #region 一般方法 + /// /// 存在 /// - public bool Exists(int ParameterId) + public bool Exists(int ParameterId) { return new ParameterDAL().Exists(ParameterId); } - + /// /// 添加一个数据 /// public bool Add(CleanMachine.Model.SYS.Parameter model) { - return new ParameterDAL().Add(model); + return new ParameterDAL().Add(model); } - + /// /// 更新一个数据 /// public bool Update(CleanMachine.Model.SYS.Parameter model) { - return new ParameterDAL().Update(model); + return new ParameterDAL().Update(model); } - - + + /// /// 删除一个数据 /// - public bool Delete(string strWhere, object Params = null) + public bool Delete(string strWhere, object Params = null) { - return new ParameterDAL().Delete(strWhere,Params); + return new ParameterDAL().Delete(strWhere, Params); } - + /// /// 删除一个数据 /// - public bool Delete(int ParameterId) + public bool Delete(int ParameterId) { - return new ParameterDAL().Delete(ParameterId); + return new ParameterDAL().Delete(ParameterId); } - + /// /// 获得数据列表 /// public IEnumerable GetList(string strWhere, object Params = null) { - return new ParameterDAL().GetList(strWhere,Params); + return new ParameterDAL().GetList(strWhere, Params); } - - /// - /// 获取一个对象 - /// - public CleanMachine.Model.SYS.Parameter GetModel(int ParameterId) - { - return new ParameterDAL().GetModel(ParameterId); - } - #endregion - - - - /// - /// 查询数据 - /// - // public IEnumerable GetModelList(RuleGroup rule) - // { - // return new ParameterDAL().GetModelList(rule); - // } - } + + /// + /// 获取一个对象 + /// + public CleanMachine.Model.SYS.Parameter GetModel(int ParameterId) + { + return new ParameterDAL().GetModel(ParameterId); + } + #endregion + + + public bool RestMaintainTime(int Time) + { + + return new ParameterDAL().Update("MaintainTime", Time.ToString()); + + + } + + + + + /// + /// 查询数据 + /// + // public IEnumerable GetModelList(RuleGroup rule) + // { + // return new ParameterDAL().GetModelList(rule); + // } + } } diff --git a/CleanMachine.DAL/SYS/ParameterDAL.cs b/CleanMachine.DAL/SYS/ParameterDAL.cs index 30f1a5d..1180d96 100644 --- a/CleanMachine.DAL/SYS/ParameterDAL.cs +++ b/CleanMachine.DAL/SYS/ParameterDAL.cs @@ -10,40 +10,40 @@ using LeadDataBaseUtility; namespace CleanMachine.DAL.SYS { - /// + /// /// /// - public class ParameterDAL - { - - - - public ParameterDAL() - { - - } - #region 一般方法 - /// + public class ParameterDAL + { + + + + public ParameterDAL() + { + + } + #region 一般方法 + /// /// 存在 /// - public bool Exists(int ParameterId) + public bool Exists(int ParameterId) { string strSql = @"SELECT count(1) from SYS_PARAMETER WHERE PARAMETER_ID=@ParameterId "; return LeadDbHelperSQLite.ExecuteScalar(strSql, new { ParameterId }) > 0; } - + /// /// 添加一个数据 /// public bool Add(CleanMachine.Model.SYS.Parameter model) { - string strSql = $@"INSERT INTO SYS_PARAMETER + string strSql = $@"INSERT INTO SYS_PARAMETER (PARAMETER_ID,PARAMETER_CODE,PARAMETER_NAME,PARAMETER_VALUE,PARAMETER_TYPE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5) values (@ParameterId,@ParameterCode,@ParameterName,@ParameterValue,@ParameterType,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) "; - return LeadDbHelperSQLite.Execute(strSql, model) > 0; + return LeadDbHelperSQLite.Execute(strSql, model) > 0; } - + /// /// 更新一个数据 /// @@ -54,29 +54,44 @@ namespace CleanMachine.DAL.SYS WHERE PARAMETER_ID=@ParameterId "; return LeadDbHelperSQLite.Execute(strSql, model) > 0; } - - + + + public bool Update(string ParameterCode, string Value) + { + string strSql = $@"UPDATE SYS_PARAMETER SET + PARAMETER_VALUE=@ParameterValue + WHERE PARAMETER_CODE=@ParameterCode "; + return LeadDbHelperSQLite.Execute(strSql, new + { + ParameterCode = ParameterCode, + ParameterValue = Value + }) > 0; + } + + + + /// /// 删除一个数据 /// - public bool Delete(string strWhere, object Params = null) + public bool Delete(string strWhere, object Params = null) { string strSql = $@"DELETE FROM SYS_PARAMETER "; - if (strWhere.Trim() != "") + if (strWhere.Trim() != "") { strSql += $" WHERE {strWhere}"; } return LeadDbHelperSQLite.Execute(strSql, Params) > 0; } - + /// /// 删除一个数据 /// - public bool Delete(int ParameterId) + public bool Delete(int ParameterId) { - return this.Delete("PARAMETER_ID=@ParameterId ", new { ParameterId }) ; + return this.Delete("PARAMETER_ID=@ParameterId ", new { ParameterId }); } - + /// /// 获得数据列表 /// @@ -89,24 +104,24 @@ namespace CleanMachine.DAL.SYS } return LeadDbHelperSQLite.Query(strSql, Params); } - - /// - /// 获取一个对象 - /// - public CleanMachine.Model.SYS.Parameter GetModel(int ParameterId) + + /// + /// 获取一个对象 + /// + public CleanMachine.Model.SYS.Parameter GetModel(int ParameterId) { return this.GetList("PARAMETER_ID=@ParameterId", new { ParameterId }).FirstOrDefault(); - } - #endregion - - - /// - /// 查询数据 - /// - // public IEnumerable GetModelList(RuleGroup rule) - // { - // var tuper = _dbhelper.BuildRuleGroupStr(rule); - // return this.GetList(tuper.where, tuper.Param); - // } - } + } + #endregion + + + /// + /// 查询数据 + /// + // public IEnumerable GetModelList(RuleGroup rule) + // { + // var tuper = _dbhelper.BuildRuleGroupStr(rule); + // return this.GetList(tuper.where, tuper.Param); + // } + } } diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs index 2c11aa9..01943ff 100644 --- a/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs +++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.Designer.cs @@ -93,12 +93,12 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonLabel5 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel4 = new Krypton.Toolkit.KryptonLabel(); this.label7 = new System.Windows.Forms.Label(); - this.kryptonButton1 = new Krypton.Toolkit.KryptonButton(); this.ktb_SaveIR = new Krypton.Toolkit.KryptonButton(); this.kryptonLabel3 = new Krypton.Toolkit.KryptonLabel(); this.ktb_IR = new Krypton.Toolkit.KryptonTextBox(); this.kryptonLabel1 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel2 = new Krypton.Toolkit.KryptonLabel(); + this.kryptonButton1 = new Krypton.Toolkit.KryptonButton(); this.kryptonGroupBox5 = new Krypton.Toolkit.KryptonGroupBox(); this.kryptonPanel24 = new Krypton.Toolkit.KryptonPanel(); this.kryptonWrapLabel13 = new Krypton.Toolkit.KryptonWrapLabel(); @@ -185,6 +185,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonPanel7 = new Krypton.Toolkit.KryptonPanel(); this.kryptonWrapLabel4 = new Krypton.Toolkit.KryptonWrapLabel(); this.panMenu = new Krypton.Toolkit.KryptonPanel(); + this.btnShiftCount = new Krypton.Toolkit.KryptonButton(); this.btnParamater = new Krypton.Toolkit.KryptonButton(); this.btnLogin = new Krypton.Toolkit.KryptonButton(); this.btnBase = new Krypton.Toolkit.KryptonButton(); @@ -194,7 +195,7 @@ namespace CleanMachineHMI.FrmUserControl this.btnPLCConfig = new Krypton.Toolkit.KryptonButton(); this.btnIO = new Krypton.Toolkit.KryptonButton(); this.btnManual = new Krypton.Toolkit.KryptonButton(); - this.btnShiftCount = new Krypton.Toolkit.KryptonButton(); + this.labelNextFullStop = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8.Panel)).BeginInit(); this.kryptonGroupBox8.Panel.SuspendLayout(); @@ -279,7 +280,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox8.CaptionOverlap = 0D; this.kryptonGroupBox8.CaptionStyle = Krypton.Toolkit.LabelStyle.TitleControl; this.kryptonGroupBox8.Dock = System.Windows.Forms.DockStyle.Fill; - this.kryptonGroupBox8.Location = new System.Drawing.Point(460, 3); + this.kryptonGroupBox8.Location = new System.Drawing.Point(459, 3); this.kryptonGroupBox8.Name = "kryptonGroupBox8"; // // kryptonGroupBox8.Panel @@ -289,14 +290,14 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox8.Panel.Controls.Add(this.kbtn_forceFinish); this.kryptonGroupBox8.Panel.Controls.Add(this.label4_SD); this.kryptonGroupBox8.Panel.Controls.Add(this.kryptonButton6); - this.kryptonGroupBox8.Size = new System.Drawing.Size(190, 401); + this.kryptonGroupBox8.Size = new System.Drawing.Size(189, 401); this.kryptonGroupBox8.TabIndex = 8; this.kryptonGroupBox8.Values.Heading = ""; // // kryptonButton7 // this.kryptonButton7.Anchor = System.Windows.Forms.AnchorStyles.None; - this.kryptonButton7.Location = new System.Drawing.Point(33, 268); + this.kryptonButton7.Location = new System.Drawing.Point(32, 268); this.kryptonButton7.Name = "kryptonButton7"; this.kryptonButton7.Size = new System.Drawing.Size(135, 52); this.kryptonButton7.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -319,7 +320,7 @@ namespace CleanMachineHMI.FrmUserControl // kbtn_forceFinish // this.kbtn_forceFinish.Anchor = System.Windows.Forms.AnchorStyles.None; - this.kbtn_forceFinish.Location = new System.Drawing.Point(33, 189); + this.kbtn_forceFinish.Location = new System.Drawing.Point(32, 189); this.kbtn_forceFinish.Name = "kbtn_forceFinish"; this.kbtn_forceFinish.Size = new System.Drawing.Size(135, 52); this.kbtn_forceFinish.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -342,7 +343,7 @@ namespace CleanMachineHMI.FrmUserControl // kryptonButton6 // this.kryptonButton6.Anchor = System.Windows.Forms.AnchorStyles.None; - this.kryptonButton6.Location = new System.Drawing.Point(33, 48); + this.kryptonButton6.Location = new System.Drawing.Point(32, 48); this.kryptonButton6.Name = "kryptonButton6"; this.kryptonButton6.Size = new System.Drawing.Size(135, 52); this.kryptonButton6.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -367,7 +368,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox9.Panel.Controls.Add(this.kryptonButton4); this.kryptonGroupBox9.Panel.Controls.Add(this.kryptonButton2); this.kryptonGroupBox9.Panel.Controls.Add(this.kryptonButton3); - this.kryptonGroupBox9.Size = new System.Drawing.Size(195, 401); + this.kryptonGroupBox9.Size = new System.Drawing.Size(194, 401); this.kryptonGroupBox9.TabIndex = 7; this.kryptonGroupBox9.Values.Heading = ""; // @@ -398,7 +399,7 @@ namespace CleanMachineHMI.FrmUserControl // kryptonButton5 // this.kryptonButton5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kryptonButton5.Location = new System.Drawing.Point(15, 265); + this.kryptonButton5.Location = new System.Drawing.Point(14, 265); this.kryptonButton5.Name = "kryptonButton5"; this.kryptonButton5.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.kryptonButton5.Size = new System.Drawing.Size(154, 47); @@ -412,7 +413,7 @@ namespace CleanMachineHMI.FrmUserControl // kryptonButton4 // this.kryptonButton4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kryptonButton4.Location = new System.Drawing.Point(15, 194); + this.kryptonButton4.Location = new System.Drawing.Point(14, 194); this.kryptonButton4.Name = "kryptonButton4"; this.kryptonButton4.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.kryptonButton4.Size = new System.Drawing.Size(154, 47); @@ -426,7 +427,7 @@ namespace CleanMachineHMI.FrmUserControl // kryptonButton2 // this.kryptonButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kryptonButton2.Location = new System.Drawing.Point(15, 99); + this.kryptonButton2.Location = new System.Drawing.Point(14, 99); this.kryptonButton2.Name = "kryptonButton2"; this.kryptonButton2.Size = new System.Drawing.Size(154, 35); this.kryptonButton2.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -438,7 +439,7 @@ namespace CleanMachineHMI.FrmUserControl // kryptonButton3 // this.kryptonButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kryptonButton3.Location = new System.Drawing.Point(15, 47); + this.kryptonButton3.Location = new System.Drawing.Point(14, 47); this.kryptonButton3.Name = "kryptonButton3"; this.kryptonButton3.Size = new System.Drawing.Size(154, 35); this.kryptonButton3.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -467,6 +468,7 @@ namespace CleanMachineHMI.FrmUserControl // // kryptonGroupBox7.Panel // + this.kryptonGroupBox7.Panel.Controls.Add(this.labelNextFullStop); this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel12); this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel11); this.kryptonGroupBox7.Panel.Controls.Add(this.cbt_fpalletmod); @@ -672,6 +674,7 @@ namespace CleanMachineHMI.FrmUserControl 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); // @@ -810,7 +813,7 @@ namespace CleanMachineHMI.FrmUserControl // this.kryptonGroupBox1.CaptionOverlap = 0D; this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.kryptonGroupBox1.Location = new System.Drawing.Point(656, 3); + this.kryptonGroupBox1.Location = new System.Drawing.Point(654, 3); this.kryptonGroupBox1.Name = "kryptonGroupBox1"; // // kryptonGroupBox1.Panel @@ -831,7 +834,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox1.Panel.Controls.Add(this.ktb_IR); this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonLabel1); this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonLabel2); - this.kryptonGroupBox1.Size = new System.Drawing.Size(403, 401); + this.kryptonGroupBox1.Size = new System.Drawing.Size(405, 401); this.kryptonGroupBox1.TabIndex = 9; this.kryptonGroupBox1.Values.Heading = ""; // @@ -861,7 +864,7 @@ namespace CleanMachineHMI.FrmUserControl this.kcmb_SheetType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.kcmb_SheetType.DropDownWidth = 211; this.kcmb_SheetType.IntegralHeight = false; - this.kcmb_SheetType.Location = new System.Drawing.Point(104, 3); + this.kcmb_SheetType.Location = new System.Drawing.Point(106, 3); this.kcmb_SheetType.Name = "kcmb_SheetType"; this.kcmb_SheetType.Size = new System.Drawing.Size(184, 21); this.kcmb_SheetType.StateCommon.ComboBox.Content.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -870,7 +873,7 @@ namespace CleanMachineHMI.FrmUserControl // kbtn_Scrap_1 // this.kbtn_Scrap_1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kbtn_Scrap_1.Location = new System.Drawing.Point(334, 323); + this.kbtn_Scrap_1.Location = new System.Drawing.Point(336, 323); this.kbtn_Scrap_1.Name = "kbtn_Scrap_1"; this.kbtn_Scrap_1.Size = new System.Drawing.Size(60, 60); this.kbtn_Scrap_1.StateCommon.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20))))); @@ -885,7 +888,7 @@ namespace CleanMachineHMI.FrmUserControl // kbtn_Scrap // this.kbtn_Scrap.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kbtn_Scrap.Location = new System.Drawing.Point(94, 323); + this.kbtn_Scrap.Location = new System.Drawing.Point(96, 323); this.kbtn_Scrap.Name = "kbtn_Scrap"; this.kbtn_Scrap.Size = new System.Drawing.Size(60, 60); this.kbtn_Scrap.StateCommon.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20))))); @@ -912,7 +915,7 @@ namespace CleanMachineHMI.FrmUserControl this.kdtp_RecordDate.CalendarTodayDate = new System.DateTime(2020, 10, 23, 0, 0, 0, 0); this.kdtp_RecordDate.CustomFormat = "yyyy-MM-dd HH:mm:ss"; this.kdtp_RecordDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.kdtp_RecordDate.Location = new System.Drawing.Point(104, 52); + this.kdtp_RecordDate.Location = new System.Drawing.Point(106, 52); this.kdtp_RecordDate.Name = "kdtp_RecordDate"; this.kdtp_RecordDate.ShowCheckBox = true; this.kdtp_RecordDate.Size = new System.Drawing.Size(184, 21); @@ -947,7 +950,7 @@ namespace CleanMachineHMI.FrmUserControl this.panel1.Controls.Add(this.ktb_CompleteNum); this.panel1.Controls.Add(this.kryptonLabel5); this.panel1.Controls.Add(this.kryptonLabel4); - this.panel1.Location = new System.Drawing.Point(65, 79); + this.panel1.Location = new System.Drawing.Point(67, 79); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(329, 190); this.panel1.TabIndex = 3; @@ -1088,23 +1091,11 @@ namespace CleanMachineHMI.FrmUserControl this.label7.TabIndex = 8; this.label7.Text = "Scrap Count"; // - // kryptonButton1 - // - this.kryptonButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.kryptonButton1.Location = new System.Drawing.Point(156, 160); - this.kryptonButton1.Name = "kryptonButton1"; - this.kryptonButton1.Size = new System.Drawing.Size(84, 25); - this.kryptonButton1.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonButton1.TabIndex = 2; - this.kryptonButton1.Values.Text = "ReEntry"; - this.kryptonButton1.Visible = false; - this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click); - // // ktb_SaveIR // this.ktb_SaveIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.ktb_SaveIR.AutoSize = true; - this.ktb_SaveIR.Location = new System.Drawing.Point(294, 3); + this.ktb_SaveIR.Location = new System.Drawing.Point(296, 3); this.ktb_SaveIR.Name = "ktb_SaveIR"; this.ktb_SaveIR.Size = new System.Drawing.Size(100, 70); this.ktb_SaveIR.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -1116,7 +1107,7 @@ namespace CleanMachineHMI.FrmUserControl // this.kryptonLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.kryptonLabel3.LabelStyle = Krypton.Toolkit.LabelStyle.BoldControl; - this.kryptonLabel3.Location = new System.Drawing.Point(16, 53); + this.kryptonLabel3.Location = new System.Drawing.Point(18, 53); this.kryptonLabel3.Name = "kryptonLabel3"; this.kryptonLabel3.Size = new System.Drawing.Size(82, 20); this.kryptonLabel3.TabIndex = 0; @@ -1125,7 +1116,7 @@ namespace CleanMachineHMI.FrmUserControl // ktb_IR // this.ktb_IR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ktb_IR.Location = new System.Drawing.Point(104, 27); + this.ktb_IR.Location = new System.Drawing.Point(106, 27); this.ktb_IR.Name = "ktb_IR"; this.ktb_IR.Size = new System.Drawing.Size(184, 23); this.ktb_IR.TabIndex = 1; @@ -1135,7 +1126,7 @@ namespace CleanMachineHMI.FrmUserControl // this.kryptonLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.kryptonLabel1.LabelStyle = Krypton.Toolkit.LabelStyle.BoldControl; - this.kryptonLabel1.Location = new System.Drawing.Point(65, 25); + this.kryptonLabel1.Location = new System.Drawing.Point(67, 25); this.kryptonLabel1.Name = "kryptonLabel1"; this.kryptonLabel1.Size = new System.Drawing.Size(33, 20); this.kryptonLabel1.TabIndex = 0; @@ -1145,12 +1136,24 @@ namespace CleanMachineHMI.FrmUserControl // this.kryptonLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.kryptonLabel2.LabelStyle = Krypton.Toolkit.LabelStyle.BoldControl; - this.kryptonLabel2.Location = new System.Drawing.Point(23, 4); + this.kryptonLabel2.Location = new System.Drawing.Point(25, 4); this.kryptonLabel2.Name = "kryptonLabel2"; this.kryptonLabel2.Size = new System.Drawing.Size(75, 20); this.kryptonLabel2.TabIndex = 0; this.kryptonLabel2.Values.Text = "Sheet Type"; // + // kryptonButton1 + // + this.kryptonButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.kryptonButton1.Location = new System.Drawing.Point(156, 160); + this.kryptonButton1.Name = "kryptonButton1"; + this.kryptonButton1.Size = new System.Drawing.Size(84, 25); + this.kryptonButton1.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.kryptonButton1.TabIndex = 2; + this.kryptonButton1.Values.Text = "ReEntry"; + this.kryptonButton1.Visible = false; + this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click); + // // kryptonGroupBox5 // this.kryptonGroupBox5.CaptionOverlap = 0D; @@ -1187,7 +1190,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel13.AutoSize = false; this.kryptonWrapLabel13.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel13.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel13.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel13.Name = "kryptonWrapLabel13"; @@ -1252,7 +1255,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel12.AutoSize = false; this.kryptonWrapLabel12.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel12.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel12.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel12.Name = "kryptonWrapLabel12"; @@ -1317,7 +1320,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel11.AutoSize = false; this.kryptonWrapLabel11.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel11.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel11.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel11.Name = "kryptonWrapLabel11"; @@ -1382,7 +1385,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel10.AutoSize = false; this.kryptonWrapLabel10.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel10.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel10.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel10.Name = "kryptonWrapLabel10"; @@ -1444,7 +1447,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel3.AutoSize = false; this.kryptonWrapLabel3.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel3.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel3.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel3.Name = "kryptonWrapLabel3"; @@ -1481,27 +1484,27 @@ namespace CleanMachineHMI.FrmUserControl this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 195F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 213F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(1062, 213); this.tableLayoutPanel1.TabIndex = 8; // @@ -1542,7 +1545,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel21.AutoSize = false; this.kryptonWrapLabel21.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel21.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel21.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel21.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel21.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel21.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel21.Name = "kryptonWrapLabel21"; @@ -1607,7 +1610,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel9.AutoSize = false; this.kryptonWrapLabel9.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel9.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel9.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel9.Name = "kryptonWrapLabel9"; @@ -1672,7 +1675,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel8.AutoSize = false; this.kryptonWrapLabel8.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel8.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel8.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel8.Name = "kryptonWrapLabel8"; @@ -1737,7 +1740,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel7.AutoSize = false; this.kryptonWrapLabel7.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel7.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel7.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel7.Name = "kryptonWrapLabel7"; @@ -1802,7 +1805,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel6.AutoSize = false; this.kryptonWrapLabel6.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel6.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel6.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel6.Name = "kryptonWrapLabel6"; @@ -1864,7 +1867,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel2.AutoSize = false; this.kryptonWrapLabel2.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel2.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel2.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel2.Name = "kryptonWrapLabel2"; @@ -1916,7 +1919,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel19.AutoSize = false; this.kryptonWrapLabel19.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel19.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel19.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel19.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel19.Name = "kryptonWrapLabel19"; @@ -1978,7 +1981,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel5.AutoSize = false; this.kryptonWrapLabel5.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel5.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel5.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel5.Name = "kryptonWrapLabel5"; @@ -2023,7 +2026,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel17.AutoSize = false; this.kryptonWrapLabel17.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel17.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel17.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel17.Name = "kryptonWrapLabel17"; @@ -2088,7 +2091,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel16.AutoSize = false; this.kryptonWrapLabel16.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel16.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel16.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel16.Name = "kryptonWrapLabel16"; @@ -2153,7 +2156,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel15.AutoSize = false; this.kryptonWrapLabel15.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel15.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel15.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel15.Name = "kryptonWrapLabel15"; @@ -2218,7 +2221,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel14.AutoSize = false; this.kryptonWrapLabel14.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel14.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel14.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel14.Name = "kryptonWrapLabel14"; @@ -2280,7 +2283,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonWrapLabel4.AutoSize = false; this.kryptonWrapLabel4.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonWrapLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.kryptonWrapLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91))))); + this.kryptonWrapLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(66)))), ((int)(((byte)(139))))); this.kryptonWrapLabel4.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; this.kryptonWrapLabel4.Location = new System.Drawing.Point(0, 0); this.kryptonWrapLabel4.Name = "kryptonWrapLabel4"; @@ -2307,6 +2310,45 @@ namespace CleanMachineHMI.FrmUserControl this.panMenu.Size = new System.Drawing.Size(1062, 59); this.panMenu.TabIndex = 7; // + // btnShiftCount + // + this.btnShiftCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnShiftCount.AutoSize = true; + this.btnShiftCount.Location = new System.Drawing.Point(818, 6); + this.btnShiftCount.Name = "btnShiftCount"; + this.btnShiftCount.OverrideDefault.Back.Color1 = System.Drawing.Color.WhiteSmoke; + this.btnShiftCount.OverrideDefault.Back.Color2 = System.Drawing.Color.LightSteelBlue; + this.btnShiftCount.Size = new System.Drawing.Size(102, 47); + this.btnShiftCount.StateCommon.Content.ShortText.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnShiftCount.StateNormal.Back.Color1 = System.Drawing.Color.WhiteSmoke; + this.btnShiftCount.StateNormal.Back.Color2 = System.Drawing.Color.LightSteelBlue; + this.btnShiftCount.StateNormal.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; + this.btnShiftCount.StateNormal.Border.Color1 = System.Drawing.Color.CornflowerBlue; + this.btnShiftCount.StateNormal.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) + | Krypton.Toolkit.PaletteDrawBorders.Left) + | Krypton.Toolkit.PaletteDrawBorders.Right))); + this.btnShiftCount.StateNormal.Border.Rounding = 3F; + this.btnShiftCount.StatePressed.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(240))))); + this.btnShiftCount.StatePressed.Back.Color2 = System.Drawing.Color.RoyalBlue; + this.btnShiftCount.StatePressed.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; + this.btnShiftCount.StatePressed.Border.Color1 = System.Drawing.Color.CornflowerBlue; + this.btnShiftCount.StatePressed.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) + | Krypton.Toolkit.PaletteDrawBorders.Left) + | Krypton.Toolkit.PaletteDrawBorders.Right))); + this.btnShiftCount.StatePressed.Border.Rounding = 3F; + this.btnShiftCount.StateTracking.Back.Color1 = System.Drawing.Color.WhiteSmoke; + this.btnShiftCount.StateTracking.Back.Color2 = System.Drawing.Color.CornflowerBlue; + this.btnShiftCount.StateTracking.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; + this.btnShiftCount.StateTracking.Border.Color1 = System.Drawing.Color.CornflowerBlue; + this.btnShiftCount.StateTracking.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) + | Krypton.Toolkit.PaletteDrawBorders.Left) + | Krypton.Toolkit.PaletteDrawBorders.Right))); + this.btnShiftCount.StateTracking.Border.Rounding = 3F; + this.btnShiftCount.TabIndex = 21; + this.btnShiftCount.Tag = "frmPrinterMain"; + this.btnShiftCount.Values.Text = "班次记录"; + this.btnShiftCount.Click += new System.EventHandler(this.btnShiftCount_Click); + // // btnParamater // this.btnParamater.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -2658,44 +2700,19 @@ namespace CleanMachineHMI.FrmUserControl this.btnManual.Values.Text = "手动控制"; this.btnManual.Click += new System.EventHandler(this.btnManual_Click); // - // btnShiftCount + // labelNextFullStop // - this.btnShiftCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnShiftCount.AutoSize = true; - this.btnShiftCount.Location = new System.Drawing.Point(818, 6); - this.btnShiftCount.Name = "btnShiftCount"; - this.btnShiftCount.OverrideDefault.Back.Color1 = System.Drawing.Color.WhiteSmoke; - this.btnShiftCount.OverrideDefault.Back.Color2 = System.Drawing.Color.LightSteelBlue; - this.btnShiftCount.Size = new System.Drawing.Size(102, 47); - this.btnShiftCount.StateCommon.Content.ShortText.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnShiftCount.StateNormal.Back.Color1 = System.Drawing.Color.WhiteSmoke; - this.btnShiftCount.StateNormal.Back.Color2 = System.Drawing.Color.LightSteelBlue; - this.btnShiftCount.StateNormal.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; - this.btnShiftCount.StateNormal.Border.Color1 = System.Drawing.Color.CornflowerBlue; - this.btnShiftCount.StateNormal.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) - | Krypton.Toolkit.PaletteDrawBorders.Left) - | Krypton.Toolkit.PaletteDrawBorders.Right))); - this.btnShiftCount.StateNormal.Border.Rounding = 3F; - this.btnShiftCount.StatePressed.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(240))))); - this.btnShiftCount.StatePressed.Back.Color2 = System.Drawing.Color.RoyalBlue; - this.btnShiftCount.StatePressed.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; - this.btnShiftCount.StatePressed.Border.Color1 = System.Drawing.Color.CornflowerBlue; - this.btnShiftCount.StatePressed.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) - | Krypton.Toolkit.PaletteDrawBorders.Left) - | Krypton.Toolkit.PaletteDrawBorders.Right))); - this.btnShiftCount.StatePressed.Border.Rounding = 3F; - this.btnShiftCount.StateTracking.Back.Color1 = System.Drawing.Color.WhiteSmoke; - this.btnShiftCount.StateTracking.Back.Color2 = System.Drawing.Color.CornflowerBlue; - this.btnShiftCount.StateTracking.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut; - this.btnShiftCount.StateTracking.Border.Color1 = System.Drawing.Color.CornflowerBlue; - this.btnShiftCount.StateTracking.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) - | Krypton.Toolkit.PaletteDrawBorders.Left) - | Krypton.Toolkit.PaletteDrawBorders.Right))); - this.btnShiftCount.StateTracking.Border.Rounding = 3F; - this.btnShiftCount.TabIndex = 21; - this.btnShiftCount.Tag = "frmPrinterMain"; - this.btnShiftCount.Values.Text = "班次记录"; - this.btnShiftCount.Click += new System.EventHandler(this.btnShiftCount_Click); + this.labelNextFullStop.AutoSize = true; + this.labelNextFullStop.BackColor = System.Drawing.Color.Transparent; + this.labelNextFullStop.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelNextFullStop.ForeColor = System.Drawing.Color.Red; + this.labelNextFullStop.Location = new System.Drawing.Point(17, 104); + this.labelNextFullStop.Name = "labelNextFullStop"; + this.labelNextFullStop.Size = new System.Drawing.Size(203, 16); + this.labelNextFullStop.TabIndex = 52; + this.labelNextFullStop.Text = "下次满料将停止,点击取消"; + this.labelNextFullStop.Visible = false; + this.labelNextFullStop.Click += new System.EventHandler(this.labelNextFullStop_Click); // // frmMainDetail // @@ -2962,5 +2979,6 @@ namespace CleanMachineHMI.FrmUserControl private Krypton.Toolkit.KryptonTextBox ktb_ShiftCount; private Krypton.Toolkit.KryptonLabel kryptonLabel16; private Krypton.Toolkit.KryptonButton btnShiftCount; + private System.Windows.Forms.Label labelNextFullStop; } } diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs index c9caab9..dbb9740 100644 --- a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs +++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs @@ -961,6 +961,9 @@ namespace CleanMachineHMI.FrmUserControl PrintPalletData(dt_workingIrMsg.Rows[0][0].ToString(), palletCodeMsg, false); LogHelper.WriteLog($"作业托盘:【{palletCodeMsg}】,计数满料业务正常处理完成,数据打印完成。", LogTypeEum.Run); + + + } else if (currentNum < countFullNum && isFinishWorkingPallet && isForceFullPallet && countFullNum > 0)//强制满料 { @@ -1415,6 +1418,33 @@ namespace CleanMachineHMI.FrmUserControl LogHelper.WriteLog($"作业IR:【{workingIrMsg}】已经结束,数据库信息重置完成。", LogTypeEum.Run); } + + if (this.NextFullStop) + { + this.NextFullStop = false; + // + + + if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M)) + && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M))) + { + if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M)) + { + //GlobalHelper.SysIsRunFlag = false; + LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run); + } + + Thread.Sleep(200); + + if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "False", PlcItemTypeDesc.M)) + { + } + } + + + } + + } private void PrintWorkedIrMsg(string workingIrCodeMsg) { @@ -2374,6 +2404,41 @@ namespace CleanMachineHMI.FrmUserControl } } + private bool _nextFullStop = false; + public bool NextFullStop + { + get + { + return _nextFullStop; + + } + set + { + _nextFullStop = value; + this.BeginInvoke(new Action(() => + { + + this.labelNextFullStop.Visible = value; + })); + + //if (value) + //{ + // + // thi + //} else + //{ + + //} + + } + + + } + + + + + //自动模式下停止 M202 按1 松0 别名 StopSys private void cbt_StopTran_MouseDown(object sender, MouseEventArgs e) { @@ -2390,13 +2455,28 @@ namespace CleanMachineHMI.FrmUserControl return; } - if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M)) && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M))) + + + + if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M)) + && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M))) { - if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M)) + if (KryptonMessageBox.Show("是否在下次满料时停止", "是否在下次满料时停止", MessageBoxButtons.YesNo) == DialogResult.Yes) { - //GlobalHelper.SysIsRunFlag = false; - LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run); + NextFullStop = true; } + else + { + + if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M)) + { + //GlobalHelper.SysIsRunFlag = false; + LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run); + } + + } + + } } catch (Exception) @@ -3305,7 +3385,7 @@ namespace CleanMachineHMI.FrmUserControl private void kbtn_forceFinish_Click_1(object sender, EventArgs e) { - kbtn_forceFinish.Enabled = false; + #if RELEASE @@ -3332,6 +3412,8 @@ namespace CleanMachineHMI.FrmUserControl return; } DialogResult dr = KryptonMessageBox.Show("Are you sure you want to force the end of the current IR assignment? \n If you continue to reset the current job information, you will need to enter new IR and sheet information.\n Please carefully operation!!!", "Prompt", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + + kbtn_forceFinish.Enabled = false; if (dr == DialogResult.Yes) { // @@ -3657,5 +3739,15 @@ namespace CleanMachineHMI.FrmUserControl { frmMainNew.SwitchFrmMenu(EnumFormType.ShiftCountRecord, false); } + + private void cbt_StopTran_Click(object sender, EventArgs e) + { + + } + + private void labelNextFullStop_Click(object sender, EventArgs e) + { + this.NextFullStop = false; + } } } diff --git a/CleanMachineHMI/FrmUserControl/frmParamater.Designer.cs b/CleanMachineHMI/FrmUserControl/frmParamater.Designer.cs index b416ee8..1bc086d 100644 --- a/CleanMachineHMI/FrmUserControl/frmParamater.Designer.cs +++ b/CleanMachineHMI/FrmUserControl/frmParamater.Designer.cs @@ -33,8 +33,8 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox3 = new Krypton.Toolkit.KryptonGroupBox(); this.kryptonDataGridView1 = new Krypton.Toolkit.KryptonDataGridView(); this.kryptonGroupBox4 = new Krypton.Toolkit.KryptonGroupBox(); - this.kryptonButton1 = new Krypton.Toolkit.KryptonButton(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.kryptonButton1 = new Krypton.Toolkit.KryptonButton(); this.kbt_Reset = new Krypton.Toolkit.KryptonButton(); this.kbt_Query = new Krypton.Toolkit.KryptonButton(); this.kbt_Edit = new Krypton.Toolkit.KryptonButton(); @@ -47,6 +47,7 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonLabel4 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel3 = new Krypton.Toolkit.KryptonLabel(); this.ktb_ParamaterName = new Krypton.Toolkit.KryptonTextBox(); + this.btnRestmaintenance = new Krypton.Toolkit.KryptonButton(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit(); this.kryptonPanel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit(); @@ -122,43 +123,45 @@ namespace CleanMachineHMI.FrmUserControl this.kryptonGroupBox4.TabIndex = 0; this.kryptonGroupBox4.Values.Heading = "查询操作:"; // - // kryptonButton1 - // - this.kryptonButton1.Location = new System.Drawing.Point(3, 3); - this.kryptonButton1.Name = "kryptonButton1"; - this.kryptonButton1.Size = new System.Drawing.Size(154, 35); - this.kryptonButton1.TabIndex = 7; - this.kryptonButton1.Values.Text = "出料运行方向切换"; - this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click); - // // tableLayoutPanel2 // this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent; - this.tableLayoutPanel2.ColumnCount = 4; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F)); + this.tableLayoutPanel2.ColumnCount = 5; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 146F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33112F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 155F)); + this.tableLayoutPanel2.Controls.Add(this.btnRestmaintenance, 0, 0); this.tableLayoutPanel2.Controls.Add(this.kryptonButton1, 0, 0); this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 3, 0); this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 2, 0); this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0); - this.tableLayoutPanel2.Location = new System.Drawing.Point(605, 78); + this.tableLayoutPanel2.Location = new System.Drawing.Point(380, 78); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 1; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(415, 41); + this.tableLayoutPanel2.Size = new System.Drawing.Size(640, 41); this.tableLayoutPanel2.TabIndex = 6; // + // kryptonButton1 + // + this.kryptonButton1.Location = new System.Drawing.Point(3, 3); + this.kryptonButton1.Name = "kryptonButton1"; + this.kryptonButton1.Size = new System.Drawing.Size(140, 35); + this.kryptonButton1.TabIndex = 7; + this.kryptonButton1.Values.Text = "出料运行方向切换"; + this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click); + // // kbt_Reset // this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.kbt_Reset.Location = new System.Drawing.Point(333, 3); + this.kbt_Reset.Location = new System.Drawing.Point(487, 3); this.kbt_Reset.Name = "kbt_Reset"; - this.kbt_Reset.Size = new System.Drawing.Size(79, 35); + this.kbt_Reset.Size = new System.Drawing.Size(150, 35); this.kbt_Reset.TabIndex = 0; this.kbt_Reset.Tag = "show"; this.kbt_Reset.Values.Text = "重置条件"; @@ -169,9 +172,9 @@ namespace CleanMachineHMI.FrmUserControl this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.kbt_Query.Location = new System.Drawing.Point(248, 3); + this.kbt_Query.Location = new System.Drawing.Point(375, 3); this.kbt_Query.Name = "kbt_Query"; - this.kbt_Query.Size = new System.Drawing.Size(79, 35); + this.kbt_Query.Size = new System.Drawing.Size(106, 35); this.kbt_Query.TabIndex = 0; this.kbt_Query.Tag = "show"; this.kbt_Query.Values.Text = "查询"; @@ -182,9 +185,9 @@ namespace CleanMachineHMI.FrmUserControl this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.kbt_Edit.Location = new System.Drawing.Point(163, 3); + this.kbt_Edit.Location = new System.Drawing.Point(262, 3); this.kbt_Edit.Name = "kbt_Edit"; - this.kbt_Edit.Size = new System.Drawing.Size(79, 35); + this.kbt_Edit.Size = new System.Drawing.Size(107, 35); this.kbt_Edit.TabIndex = 0; this.kbt_Edit.Values.Text = "编辑"; this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click); @@ -288,6 +291,15 @@ namespace CleanMachineHMI.FrmUserControl this.ktb_ParamaterName.Size = new System.Drawing.Size(246, 23); this.ktb_ParamaterName.TabIndex = 5; // + // btnRestmaintenance + // + this.btnRestmaintenance.Location = new System.Drawing.Point(149, 3); + this.btnRestmaintenance.Name = "btnRestmaintenance"; + this.btnRestmaintenance.Size = new System.Drawing.Size(107, 35); + this.btnRestmaintenance.TabIndex = 8; + this.btnRestmaintenance.Values.Text = "重置维修时间"; + this.btnRestmaintenance.Click += new System.EventHandler(this.btnRestmaintenance_Click); + // // frmParamater // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -335,5 +347,6 @@ namespace CleanMachineHMI.FrmUserControl private Krypton.Toolkit.KryptonLabel kryptonLabel3; private Krypton.Toolkit.KryptonTextBox ktb_ParamaterName; private Krypton.Toolkit.KryptonButton kryptonButton1; + private Krypton.Toolkit.KryptonButton btnRestmaintenance; } } diff --git a/CleanMachineHMI/FrmUserControl/frmParamater.cs b/CleanMachineHMI/FrmUserControl/frmParamater.cs index 3e62ca2..8370215 100644 --- a/CleanMachineHMI/FrmUserControl/frmParamater.cs +++ b/CleanMachineHMI/FrmUserControl/frmParamater.cs @@ -1,4 +1,5 @@ -using CleanMachineHMI.Domain.Enums; +using CleanMachine.Model.BAS; +using CleanMachineHMI.Domain.Enums; using CleanMachineHMI.frmChild; using CleanMachineHMI.Utils; using Krypton.Toolkit; @@ -89,7 +90,7 @@ namespace CleanMachineHMI.FrmUserControl { if (item.Tag == null) { - item.Enabled = Global.CheckRole(this.Name, item.Name); + //item.Enabled = Global.CheckRole(this.Name, item.Name); //DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'"); //DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'"); //if (drs1.Length > 0) @@ -157,5 +158,14 @@ namespace CleanMachineHMI.FrmUserControl frmSwitchRunDirection frm = new frmSwitchRunDirection(); frm.ShowDialog(); } + + private void btnRestmaintenance_Click(object sender, EventArgs e) + { + int SysRunTime = (int)PlcOperationHelper.Instance.ReadPlcItem("SysRuningTime", PlcItemTypeDesc.D); + new CleanMachine.BLL.SYS.ParameterBLL().RestMaintainTime(SysRunTime); + Global.LoadParameters(); + + // PlcOperationHelper.Instance.WritePlcItem("SysRuningTime", "0", CleanMachine.Model.BAS.PlcItemTypeDesc.D); + } } } diff --git a/CleanMachineHMI/Utils/GlobalHelper.cs b/CleanMachineHMI/Utils/GlobalHelper.cs index e9ab112..238db16 100644 --- a/CleanMachineHMI/Utils/GlobalHelper.cs +++ b/CleanMachineHMI/Utils/GlobalHelper.cs @@ -81,6 +81,48 @@ namespace CleanMachineHMI + public static IEnumerable Parameters; + + public static void LoadParameters() + { + + Parameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList(""); + } + + + public static int MaintainAlarmTime + { + get + { + if (Parameters==null) + { + LoadParameters(); + } + return int.Parse(Parameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue); + } + } + + + public static int MaintainTime + { + get + { + if (Parameters == null) + { + LoadParameters(); + } + return int.Parse(Parameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue); + } + } + + + + //int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue); + //int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue); + + + + /// /// 角色菜单权限数据 /// diff --git a/CleanMachineHMI/Utils/PlcOperationHelper.cs b/CleanMachineHMI/Utils/PlcOperationHelper.cs index 6e4cbda..a5d10f4 100644 --- a/CleanMachineHMI/Utils/PlcOperationHelper.cs +++ b/CleanMachineHMI/Utils/PlcOperationHelper.cs @@ -402,21 +402,21 @@ namespace CleanMachineHMI // ushort[] tmp_1 = new ushort[] { readBytArr_D[plcItemDeviationAddress], readBytArr_D[plcItemDeviationAddress + 1] }; #region 方法一 :Short数组转换为int数据 20201014 孙亚龙 - ////低位 short 的字节数组。 - //byte[] tmpByt_1 = BitConverter.GetBytes(readBytArr_D[plcItemDeviationAddress]); - ////高位 short 的字节数组。 - //byte[] tmpByt_2 = BitConverter.GetBytes(readBytArr_D[plcItemDeviationAddress + 1]); - ////组合为int32的字节数组。 - // byte[] tmpByt_3 = new byte[] { tmpByt_1[0], tmpByt_1[1], tmpByt_2[0], tmpByt_2[1] }; + //低位 short 的字节数组。 + byte[] tmpByt_1 = BitConverter.GetBytes(readBytArr_D[plcItemDeviationAddress]); + //高位 short 的字节数组。 + byte[] tmpByt_2 = BitConverter.GetBytes(readBytArr_D[plcItemDeviationAddress + 1]); + //组合为int32的字节数组。 + byte[] tmpByt_3 = new byte[] { tmpByt_1[0], tmpByt_1[1], tmpByt_2[0], tmpByt_2[1] }; - ////readBytArr_D[plcItemDeviationAddress + 1] << 16 + - //value = BitConverter.ToInt32(tmpByt_3, 0).ToString(); + //readBytArr_D[plcItemDeviationAddress + 1] << 16 + + value = BitConverter.ToInt32(tmpByt_3, 0).ToString(); #endregion #region 方法二 :Short数组转换为int数据 20201014 孙亚龙 //相较而言 使用位移的算法效率更高一些。 - value = ((readBytArr_D[plcItemDeviationAddress + 1] << 16) + readBytArr_D[plcItemDeviationAddress]).ToString(); + // value = ((readBytArr_D[plcItemDeviationAddress + 1] << 16) + readBytArr_D[plcItemDeviationAddress]).ToString(); #endregion @@ -1108,7 +1108,25 @@ namespace CleanMachineHMI { return false; } - master.WriteSingleRegister(slaveAddress, Convert.ToUInt16(item_D.PlcItemModbusAddress), ushort.Parse(writeValue)); + + + if (item_D.PlcItemDataLength == 2) + { + var _value = int.Parse(writeValue); + var bytes = BitConverter.GetBytes(_value); + var v1 = BitConverter.ToUInt16(bytes, 0); + var v2 = BitConverter.ToUInt16(bytes, 2); + master.WriteMultipleRegisters(slaveAddress, Convert.ToUInt16(item_D.PlcItemModbusAddress), new ushort[] { v1, v2 }); + + + } + else + { + master.WriteSingleRegister(slaveAddress, Convert.ToUInt16(item_D.PlcItemModbusAddress), ushort.Parse(writeValue)); + } + + + return true; case PlcItemTypeDesc.X: return false; diff --git a/CleanMachineHMI/frmMainNew.cs b/CleanMachineHMI/frmMainNew.cs index 2f1d1ce..d63a7e7 100644 --- a/CleanMachineHMI/frmMainNew.cs +++ b/CleanMachineHMI/frmMainNew.cs @@ -525,9 +525,9 @@ namespace CleanMachineHMI long lastTick = DateTime.Now.Ticks; - var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList(""); - int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue); - + //var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList(""); + //int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue); + //int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue); while (Global.SysThIsRunFlag) { @@ -579,13 +579,13 @@ namespace CleanMachineHMI new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime); - int Minutes = SysRunTime / 60; + int Minutes = (SysRunTime - CleanMachineHMI.Global.MaintainTime) / 60; BeginInvoke(new Action(() => { kryptonLabel1.Text = Minutes + " Minutes"; - pictureBox1.Visible = Minutes >= maintainAlarmTime; - + pictureBox1.Visible = Minutes >= Global.MaintainAlarmTime; + }));