Commit 65c2fbdc LN

设备照明功能需要增加验证

1 个父辈 f4870629
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnCloseDeviceLed = new System.Windows.Forms.Button();
this.btnOpenDeviceLed = new System.Windows.Forms.Button();
this.radioButton2 = new System.Windows.Forms.RadioButton(); this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton(); this.radioButton1 = new System.Windows.Forms.RadioButton();
this.btnDisDoorClose = new System.Windows.Forms.Button(); this.btnDisDoorClose = new System.Windows.Forms.Button();
...@@ -58,8 +60,6 @@ ...@@ -58,8 +60,6 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnCloseDeviceLed = new System.Windows.Forms.Button();
this.btnOpenDeviceLed = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -119,6 +119,28 @@ ...@@ -119,6 +119,28 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// btnCloseDeviceLed
//
this.btnCloseDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDeviceLed.Location = new System.Drawing.Point(6, 586);
this.btnCloseDeviceLed.Name = "btnCloseDeviceLed";
this.btnCloseDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnCloseDeviceLed.TabIndex = 272;
this.btnCloseDeviceLed.Text = "关闭设备照明";
this.btnCloseDeviceLed.UseVisualStyleBackColor = true;
this.btnCloseDeviceLed.Click += new System.EventHandler(this.btnCloseDeviceLed_Click);
//
// btnOpenDeviceLed
//
this.btnOpenDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDeviceLed.Location = new System.Drawing.Point(6, 549);
this.btnOpenDeviceLed.Name = "btnOpenDeviceLed";
this.btnOpenDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnOpenDeviceLed.TabIndex = 271;
this.btnOpenDeviceLed.Text = "打开设备照明";
this.btnOpenDeviceLed.UseVisualStyleBackColor = true;
this.btnOpenDeviceLed.Click += new System.EventHandler(this.btnOpenDeviceLed_Click);
//
// radioButton2 // radioButton2
// //
this.radioButton2.AutoSize = true; this.radioButton2.AutoSize = true;
...@@ -573,26 +595,6 @@ ...@@ -573,26 +595,6 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(252, 758); this.tableLayoutPanel1.Size = new System.Drawing.Size(252, 758);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// btnCloseDeviceLed
//
this.btnCloseDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDeviceLed.Location = new System.Drawing.Point(6, 586);
this.btnCloseDeviceLed.Name = "btnCloseDeviceLed";
this.btnCloseDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnCloseDeviceLed.TabIndex = 272;
this.btnCloseDeviceLed.Text = "关闭设备照明";
this.btnCloseDeviceLed.UseVisualStyleBackColor = true;
//
// btnOpenDeviceLed
//
this.btnOpenDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDeviceLed.Location = new System.Drawing.Point(6, 549);
this.btnOpenDeviceLed.Name = "btnOpenDeviceLed";
this.btnOpenDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnOpenDeviceLed.TabIndex = 271;
this.btnOpenDeviceLed.Text = "打开设备照明";
this.btnOpenDeviceLed.UseVisualStyleBackColor = true;
//
// FrmIOStatus // FrmIOStatus
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......
...@@ -344,5 +344,17 @@ namespace OnlineStore.AutoInOutStore ...@@ -344,5 +344,17 @@ namespace OnlineStore.AutoInOutStore
{ {
IOManager.IOMove(IO_Type.DisableDoorControl, IO_VALUE.LOW); IOManager.IOMove(IO_Type.DisableDoorControl, IO_VALUE.LOW);
} }
private void btnOpenDeviceLed_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
}
private void btnCloseDeviceLed_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
} }
} }
...@@ -1054,19 +1054,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -1054,19 +1054,21 @@ namespace OnlineStore.DeviceLibrary
{ {
doorIsOpen = true; doorIsOpen = true;
} }
if (Config.DOList.ContainsKey(IO_Type.Device_Led))
if (doorIsOpen && Config.DOList.ContainsKey(IO_Type.Device_Led))
{ {
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW)) if (doorIsOpen)
{ {
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH); if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
}
} }
} else
else
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{ {
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW); if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!