Commit a360d0cc 张东亮

跑位功能里增加尺寸选择

1 个父辈 a522008d
......@@ -303,7 +303,7 @@
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(11, 425);
this.groupBox1.Location = new System.Drawing.Point(11, 422);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(476, 136);
this.groupBox1.TabIndex = 217;
......@@ -482,7 +482,7 @@
this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(11, 341);
this.groupBox2.Location = new System.Drawing.Point(11, 338);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(476, 78);
this.groupBox2.TabIndex = 276;
......@@ -681,7 +681,7 @@
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(5, 6);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(508, 561);
this.groupInout.Size = new System.Drawing.Size(508, 558);
this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作";
......@@ -1356,10 +1356,10 @@
// tabPage1
//
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1091, 607);
this.tabPage1.Size = new System.Drawing.Size(1091, 610);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " IO调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
......
......@@ -35,6 +35,7 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.grpBoxLog = new System.Windows.Forms.GroupBox();
this.grpBoxOperation = new System.Windows.Forms.GroupBox();
this.comboBoxSize = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnOut4 = new System.Windows.Forms.Button();
this.btnOut3 = new System.Windows.Forms.Button();
......@@ -56,10 +57,10 @@
//
this.lstBoxInOK.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstBoxInOK.FormattingEnabled = true;
this.lstBoxInOK.ItemHeight = 20;
this.lstBoxInOK.Location = new System.Drawing.Point(3, 23);
this.lstBoxInOK.ItemHeight = 17;
this.lstBoxInOK.Location = new System.Drawing.Point(3, 19);
this.lstBoxInOK.Name = "lstBoxInOK";
this.lstBoxInOK.Size = new System.Drawing.Size(253, 589);
this.lstBoxInOK.Size = new System.Drawing.Size(253, 593);
this.lstBoxInOK.TabIndex = 0;
//
// grpBoxOKList
......@@ -76,9 +77,9 @@
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 23);
this.richTextBox1.Location = new System.Drawing.Point(3, 19);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(510, 589);
this.richTextBox1.Size = new System.Drawing.Size(510, 593);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
//
......@@ -112,6 +113,7 @@
//
// grpBoxOperation
//
this.grpBoxOperation.Controls.Add(this.comboBoxSize);
this.grpBoxOperation.Controls.Add(this.groupBox1);
this.grpBoxOperation.Controls.Add(this.btnOutStore);
this.grpBoxOperation.Controls.Add(this.cmbPosition);
......@@ -125,6 +127,15 @@
this.grpBoxOperation.TabStop = false;
this.grpBoxOperation.Text = "料仓操作";
//
// comboBoxSize
//
this.comboBoxSize.FormattingEnabled = true;
this.comboBoxSize.Location = new System.Drawing.Point(15, 112);
this.comboBoxSize.Name = "comboBoxSize";
this.comboBoxSize.Size = new System.Drawing.Size(150, 25);
this.comboBoxSize.TabIndex = 5;
this.comboBoxSize.SelectedIndexChanged += new System.EventHandler(this.comboBoxSize_SelectedIndexChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnOut4);
......@@ -191,14 +202,14 @@
// cmbPosition
//
this.cmbPosition.FormattingEnabled = true;
this.cmbPosition.Location = new System.Drawing.Point(15, 114);
this.cmbPosition.Location = new System.Drawing.Point(15, 152);
this.cmbPosition.Name = "cmbPosition";
this.cmbPosition.Size = new System.Drawing.Size(150, 28);
this.cmbPosition.Size = new System.Drawing.Size(150, 25);
this.cmbPosition.TabIndex = 2;
//
// btnStartAuto
//
this.btnStartAuto.Location = new System.Drawing.Point(15, 170);
this.btnStartAuto.Location = new System.Drawing.Point(15, 196);
this.btnStartAuto.Name = "btnStartAuto";
this.btnStartAuto.Size = new System.Drawing.Size(150, 47);
this.btnStartAuto.TabIndex = 1;
......@@ -218,7 +229,7 @@
//
// FrmInOutStore
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1003, 621);
this.Controls.Add(this.tableLayoutPanel1);
......@@ -253,5 +264,6 @@
private System.Windows.Forms.Button btnOut3;
private System.Windows.Forms.Button btnOut2;
private System.Windows.Forms.Button btnOut1;
private System.Windows.Forms.ComboBox comboBoxSize;
}
}
\ No newline at end of file
......@@ -109,6 +109,7 @@ namespace OnlineStore.ACSingleStore
LastStageInOutStep lastStageInOutStep;
GeneralInOutStep generalInOutStep;
public List<int> curState; //料盘所在位置
private PositionInfo PositionInfo;
private List<string> PositionNumList;//需要跑位的所有信息
public FrmInOutStore(BoxBean store)
{
......@@ -118,6 +119,8 @@ namespace OnlineStore.ACSingleStore
generalInOutStep = new GeneralInOutStep();
moveToStartPosStep = new MoveToStartPosStep();
needToInStoreNumList = new List<string>();
PositionInfo = new PositionInfo(store);
PositionInfo.IniPosition();
PositionNumList = new List<string>();
curState = new List<int>();
iniPositionStep = new IniPositionStep();
......@@ -132,11 +135,16 @@ namespace OnlineStore.ACSingleStore
LogUtil.logBox = this.richTextBox1;
btnStartAuto.Text = StartAuto;
mainTimer.Tick += MainTimer_Tick;
if (store.PositionNumList.Count > 0)
if (PositionInfo.PositionDic.Count > 0)
{
cmbPosition.DataSource = store.PositionNumList;
cmbPosition.SelectedIndex = 0;
comboBoxSize.DataSource = PositionInfo.PositionDic.Keys.ToList<string>();
comboBoxSize.SelectedIndex = 0;
}
cmbPosition.DataSource = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
PositionNumList = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
cmbPosition.SelectedIndex = 0;
}
/// <summary>
......@@ -1178,7 +1186,7 @@ namespace OnlineStore.ACSingleStore
/// <param name="fromPositionIdx"></param>
public void OutStoreExecution(int fromPositionIdx)
{
string selectPositionNum =PositionNumList[fromPositionIdx];
string selectPositionNum = PositionNumList[fromPositionIdx];
store.StartOutStoreMove(new InOutParam(new InOutPosInfo("AUTOINOUT", selectPositionNum)));
//LogUtil.info(LOGGER, selectPositionNum + "出库");
}
......@@ -1196,5 +1204,46 @@ namespace OnlineStore.ACSingleStore
}
private void comboBoxSize_SelectedIndexChanged(object sender, EventArgs e)
{
cmbPosition.DataSource = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
PositionNumList=PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
cmbPosition.SelectedIndex = 0;
}
}
class PositionInfo
{
public Dictionary<string, List<string>> PositionDic;
private BoxBean boxBean;
public PositionInfo(BoxBean boxBean)
{
this.boxBean = boxBean;
PositionDic = new Dictionary<string, List<string>>();
}
public void IniPosition()
{
List<ACStorePosition> positionList = CSVPositionReader<ACStorePosition>.getPositionList();
string size = "";
foreach (ACStorePosition position in positionList)
{
bool result = ACStorePosition.CheckPosition(position, boxBean.Config);
if (result && position.StoreId.Equals(boxBean.Config.GetStoreId()))
{
size = position.BagHigh + "*" + position.BagWidth;
if (PositionDic.ContainsKey(size))
{
PositionDic[size].Add(position.PositionNum);
}
else
{
PositionDic.Add(size, new List<string>() { position.PositionNum });
}
}
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!