Commit 203ba6e5 LN

出库BUG修改。

1 个父辈 05e87cb4
...@@ -49,14 +49,8 @@ namespace OnlineStore.ACSingleStore ...@@ -49,14 +49,8 @@ namespace OnlineStore.ACSingleStore
this.tableLayoutPanel1.RowCount = boxBean.Config.StoreDIList.Count; this.tableLayoutPanel1.RowCount = boxBean.Config.StoreDIList.Count;
foreach (ConfigIO ioValue in boxBean.Config.StoreDIList.Values) foreach (ConfigIO ioValue in boxBean.Config.StoreDIList.Values)
{ {
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 28)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.IOName = ioValue.ElectricalDefinition + "_" + ioValue.Explain;
control.IOValue = 0;
control.isCanClick = false;
control.Name = "IO_" + ioValue.ProName;
control.Size = new System.Drawing.Size(200, 25);
control.TabIndex = 0;
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex); this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++; roleindex++;
DIControlList.Add(ioValue.ProName, control); DIControlList.Add(ioValue.ProName, control);
...@@ -68,14 +62,7 @@ namespace OnlineStore.ACSingleStore ...@@ -68,14 +62,7 @@ namespace OnlineStore.ACSingleStore
foreach (ConfigIO ioValue in boxBean.Config.StoreDOList.Values) foreach (ConfigIO ioValue in boxBean.Config.StoreDOList.Values)
{ {
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28)); this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
control.IOName = ioValue.ElectricalDefinition + "_" + ioValue.Explain;
control.IOValue = 0;
control.isCanClick = true;
//control.Location = new System.Drawing.Point(0, 25*roleindex);
control.Name = "IO_" + ioValue.ProName;
control.Size = new System.Drawing.Size(200, 25);
control.TabIndex = 0;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex); this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++; roleindex++;
DOControlList.Add(ioValue.ProName, control); DOControlList.Add(ioValue.ProName, control);
......
...@@ -602,7 +602,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -602,7 +602,7 @@ namespace OnlineStore.DeviceLibrary
//SO_10_DeviceToDoorPro(); //SO_10_DeviceToDoorPro();
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray); StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); // StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor(); OpenDoor();
} }
...@@ -619,7 +619,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -619,7 +619,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray); StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 "); OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); // StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor(); OpenDoor();
} }
...@@ -667,8 +667,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -667,8 +667,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake); StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒"); OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); // StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true; StoreMove.OneWaitCanEndStep = true;
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake) else if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake)
......
...@@ -233,14 +233,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -233,14 +233,14 @@ namespace OnlineStore.DeviceLibrary
return wait; return wait;
} }
public static WaitResultInfo WaitHeight(int height) //public static WaitResultInfo WaitHeight(int height)
{ //{
WaitResultInfo wait = new WaitResultInfo(); // WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = 7; // wait.WaitType = 7;
wait.HeightValue = height; // wait.HeightValue = height;
wait.IsEnd = false; // wait.IsEnd = false;
return wait; // return wait;
} //}
public string ToStr() public string ToStr()
{ {
if (WaitType == 1) if (WaitType == 1)
......
...@@ -31,7 +31,26 @@ namespace UserFromControl ...@@ -31,7 +31,26 @@ namespace UserFromControl
pictureBox2.Visible = false; pictureBox2.Visible = false;
isCanClick = false; isCanClick = false;
} }
public IOTextControl(string ioName, string name, int widht = 220, int height = 25, int ioValue = 0, bool canClick = false, int tabIndex = 0)
{
InitializeComponent();
if (ImageManager.IsInit == false)
{
ImageManager.Init();
}
this.pictureBox1.BackgroundImage = ImageManager.imgGrey;
this.pictureBox2.BackgroundImage = ImageManager.imgGreen;
pictureBox1.Visible = true;
pictureBox2.Visible = false;
isCanClick = false;
IOName = ioName;
IOValue = IOValue;
isCanClick = canClick;
Name = "IO_" + name;
Size = new System.Drawing.Size(widht, height);
TabIndex = tabIndex;
}
public void ShowData() public void ShowData()
{ {
label1.Text = IOName; label1.Text = IOName;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!