Commit c7dad736 LN

1

1 个父辈 a3b477f2
......@@ -82,7 +82,7 @@
this.btnLShelfBack.Name = "btnLShelfBack";
this.btnLShelfBack.Size = new System.Drawing.Size(140, 40);
this.btnLShelfBack.TabIndex = 257;
this.btnLShelfBack.Text = "左侧货架后退";
this.btnLShelfBack.Text = "左侧货架-后退";
this.btnLShelfBack.UseVisualStyleBackColor = true;
this.btnLShelfBack.Click += new System.EventHandler(this.btnLShelfBack_Click);
//
......@@ -94,33 +94,31 @@
this.btnLShelfForward.Name = "btnLShelfForward";
this.btnLShelfForward.Size = new System.Drawing.Size(140, 40);
this.btnLShelfForward.TabIndex = 256;
this.btnLShelfForward.Text = "左侧托架前进";
this.btnLShelfForward.Text = "左侧托架-前进";
this.btnLShelfForward.UseVisualStyleBackColor = true;
this.btnLShelfForward.Click += new System.EventHandler(this.btnLShelfForward_Click);
//
// btnCloseRDoor
//
this.btnCloseRDoor.Enabled = false;
this.btnCloseRDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseRDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseRDoor.Location = new System.Drawing.Point(206, 80);
this.btnCloseRDoor.Name = "btnCloseRDoor";
this.btnCloseRDoor.Size = new System.Drawing.Size(140, 40);
this.btnCloseRDoor.TabIndex = 255;
this.btnCloseRDoor.Text = "关闭右侧门";
this.btnCloseRDoor.Text = "右侧门锁-关闭";
this.btnCloseRDoor.UseVisualStyleBackColor = true;
this.btnCloseRDoor.Click += new System.EventHandler(this.btnCloseRDoor_Click);
//
// btnOpenRDoor
//
this.btnOpenRDoor.Enabled = false;
this.btnOpenRDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenRDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenRDoor.Location = new System.Drawing.Point(206, 34);
this.btnOpenRDoor.Name = "btnOpenRDoor";
this.btnOpenRDoor.Size = new System.Drawing.Size(140, 40);
this.btnOpenRDoor.TabIndex = 254;
this.btnOpenRDoor.Text = "打开右侧门";
this.btnOpenRDoor.Text = "右侧门锁-打开";
this.btnOpenRDoor.UseVisualStyleBackColor = true;
this.btnOpenRDoor.Click += new System.EventHandler(this.btnOpenRDoor_Click);
//
......@@ -132,7 +130,7 @@
this.btnRShelfBack.Name = "btnRShelfBack";
this.btnRShelfBack.Size = new System.Drawing.Size(140, 40);
this.btnRShelfBack.TabIndex = 253;
this.btnRShelfBack.Text = "右侧货架后退";
this.btnRShelfBack.Text = "右侧货架-后退";
this.btnRShelfBack.UseVisualStyleBackColor = true;
this.btnRShelfBack.Click += new System.EventHandler(this.btnCloseAxisBreak_Click);
//
......@@ -144,33 +142,31 @@
this.btnRShelfForward.Name = "btnRShelfForward";
this.btnRShelfForward.Size = new System.Drawing.Size(140, 40);
this.btnRShelfForward.TabIndex = 252;
this.btnRShelfForward.Text = "右侧货架前进";
this.btnRShelfForward.Text = "右侧货架-前进";
this.btnRShelfForward.UseVisualStyleBackColor = true;
this.btnRShelfForward.Click += new System.EventHandler(this.btnOpenAxisBreak_Click);
//
// btnCloseLDoor
//
this.btnCloseLDoor.Enabled = false;
this.btnCloseLDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseLDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLDoor.Location = new System.Drawing.Point(41, 80);
this.btnCloseLDoor.Name = "btnCloseLDoor";
this.btnCloseLDoor.Size = new System.Drawing.Size(140, 40);
this.btnCloseLDoor.TabIndex = 249;
this.btnCloseLDoor.Text = "关闭左侧门";
this.btnCloseLDoor.Text = "左侧门锁-关闭";
this.btnCloseLDoor.UseVisualStyleBackColor = true;
this.btnCloseLDoor.Click += new System.EventHandler(this.btnCloseDoor_Click);
//
// btnOpenLDoor
//
this.btnOpenLDoor.Enabled = false;
this.btnOpenLDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenLDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLDoor.Location = new System.Drawing.Point(41, 34);
this.btnOpenLDoor.Name = "btnOpenLDoor";
this.btnOpenLDoor.Size = new System.Drawing.Size(140, 40);
this.btnOpenLDoor.TabIndex = 248;
this.btnOpenLDoor.Text = "打开左侧门";
this.btnOpenLDoor.Text = "左侧门锁-打开";
this.btnOpenLDoor.UseVisualStyleBackColor = true;
this.btnOpenLDoor.Click += new System.EventHandler(this.btnOpenDoor_Click);
//
......
......@@ -163,14 +163,6 @@ namespace OnlineStore.ACSingleStore
}
private void btnOpenDoor_Click(object sender, EventArgs e)
{
StoreManager.Store.OpenDoor(1);
}
private void btnCloseDoor_Click(object sender, EventArgs e)
{
StoreManager.Store.CloseDoor(1);
}
private void FrmIOStatus_Shown(object sender, EventArgs e)
{
timer1.Start();
......@@ -235,13 +227,25 @@ namespace OnlineStore.ACSingleStore
}
}
private void btnOpenDoor_Click(object sender, EventArgs e)
{
// StoreManager.Store.OpenDoor(1);
IOManager.IOMove(IO_Type.LeftDoor_Close, IO_VALUE.LOW);
}
private void btnCloseDoor_Click(object sender, EventArgs e)
{
// StoreManager.Store.CloseDoor(1);
IOManager.IOMove(IO_Type.LeftDoor_Close, IO_VALUE.HIGH);
}
private void btnOpenRDoor_Click(object sender, EventArgs e)
{
StoreManager.Store.OpenDoor(2);
// StoreManager.Store.OpenDoor(2);
IOManager.IOMove(IO_Type.RightDoor_Close, IO_VALUE.LOW);
}
private void btnCloseRDoor_Click(object sender, EventArgs e)
{
StoreManager.Store.OpenDoor(2);
// StoreManager.Store.OpenDoor(2);
IOManager.IOMove(IO_Type.RightDoor_Close, IO_VALUE.HIGH);
}
private void btnLShelfForward_Click(object sender, EventArgs e)
{
......
......@@ -143,6 +143,7 @@
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.cmbHumpPort = new System.Windows.Forms.ComboBox();
this.btnSelTemp = new System.Windows.Forms.Button();
this.txtHum = new System.Windows.Forms.TextBox();
this.label29 = new System.Windows.Forms.Label();
......@@ -169,7 +170,6 @@
this.button4 = new System.Windows.Forms.Button();
this.btnClearL = new System.Windows.Forms.Button();
this.btnLogDebug = new System.Windows.Forms.Button();
this.cmbHumpPort = new System.Windows.Forms.ComboBox();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupInout.SuspendLayout();
......@@ -1592,9 +1592,9 @@
this.btnOpenRDoor.Name = "btnOpenRDoor";
this.btnOpenRDoor.Size = new System.Drawing.Size(140, 40);
this.btnOpenRDoor.TabIndex = 274;
this.btnOpenRDoor.Text = "右侧门-打开";
this.btnOpenRDoor.Text = "右侧门-打开";
this.btnOpenRDoor.UseVisualStyleBackColor = true;
this.btnOpenRDoor.Visible = false;
this.btnOpenRDoor.Click += new System.EventHandler(this.btnOpenRDoor_Click);
//
// btnOpenLDoor
//
......@@ -1604,9 +1604,9 @@
this.btnOpenLDoor.Name = "btnOpenLDoor";
this.btnOpenLDoor.Size = new System.Drawing.Size(140, 40);
this.btnOpenLDoor.TabIndex = 273;
this.btnOpenLDoor.Text = "左侧门-打开";
this.btnOpenLDoor.Text = "左侧门-打开";
this.btnOpenLDoor.UseVisualStyleBackColor = true;
this.btnOpenLDoor.Visible = false;
this.btnOpenLDoor.Click += new System.EventHandler(this.btnOpenLDoor_Click);
//
// lblMoveEquipInfo
//
......@@ -1747,6 +1747,17 @@
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
//
// cmbHumpPort
//
this.cmbHumpPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHumpPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbHumpPort.FormattingEnabled = true;
this.cmbHumpPort.Location = new System.Drawing.Point(95, 27);
this.cmbHumpPort.Name = "cmbHumpPort";
this.cmbHumpPort.Size = new System.Drawing.Size(87, 28);
this.cmbHumpPort.TabIndex = 273;
this.cmbHumpPort.SelectedIndexChanged += new System.EventHandler(this.cmbHumpPort_SelectedIndexChanged);
//
// btnSelTemp
//
this.btnSelTemp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
......@@ -2063,17 +2074,6 @@
this.btnLogDebug.UseVisualStyleBackColor = true;
this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
//
// cmbHumpPort
//
this.cmbHumpPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHumpPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbHumpPort.FormattingEnabled = true;
this.cmbHumpPort.Location = new System.Drawing.Point(95, 27);
this.cmbHumpPort.Name = "cmbHumpPort";
this.cmbHumpPort.Size = new System.Drawing.Size(87, 28);
this.cmbHumpPort.TabIndex = 273;
this.cmbHumpPort.SelectedIndexChanged += new System.EventHandler(this.cmbHumpPort_SelectedIndexChanged);
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
......@@ -283,6 +283,27 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg.Text = "";
btnStartAuTo.Text = "开始自动出入库";
}
if (IOManager.IOValue(IO_Type.LeftDoor_Close).Equals(IO_VALUE.HIGH))
{
btnOpenLDoor.Text = "左侧门锁-关闭";
btnOpenLDoor.BackColor = Color.Aqua;
}
else
{
btnOpenLDoor.Text = "左侧门锁-打开";
btnOpenLDoor.BackColor = Color.White;
}
if (IOManager.IOValue(IO_Type.RightDoor_Close).Equals(IO_VALUE.HIGH))
{
btnOpenRDoor.Text = "右侧门锁-关闭";
btnOpenRDoor.BackColor = Color.Aqua;
}
else
{
btnOpenRDoor.Text = "右侧门锁-打开";
btnOpenRDoor.BackColor = Color.White;
}
}
private void ReadPosistion()
......@@ -1243,5 +1264,31 @@ namespace OnlineStore.ACSingleStore
btnTempClose.Enabled = false ;
}
}
protected void BtnMove(Button btn, string defaultText, string targetText, string ioHighType)
{
LogUtil.info( "点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
IOManager.IOMove(ioHighType, IO_VALUE.HIGH);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
IOManager.IOMove(ioHighType, IO_VALUE.LOW);
btn.Text = defaultText;
btn.BackColor = Color.White;
}
}
private void btnOpenLDoor_Click(object sender, EventArgs e)
{
BtnMove(btnOpenLDoor, "左侧门锁-打开", "左侧门锁-关闭", IO_Type.LeftDoor_Close);
}
private void btnOpenRDoor_Click(object sender, EventArgs e)
{
BtnMove(btnOpenRDoor, "右侧门锁-打开", "右侧门锁-关闭", IO_Type.RightDoor_Close);
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!