Commit eea6de9a LN

托盘编辑界面修改

1 个父辈 d6ec23b5
......@@ -112,12 +112,12 @@ namespace OnlineStore.AssemblyLine
ReadIOList();
lblMoveInfo.Text = LineManager.Line.GetMoveStr();
lblTrayNum.Text = "T3-C1托盘号:" + LineManager.Line.T3C1_TrayNum.ToString();
if (cmbTray.SelectedIndex >= 0)
{
int trayNum = cmbTray.SelectedIndex + 101;
//if (cmbTray.SelectedIndex >= 0)
//{
int trayNum =(int) numTrayNum.Value + 101;
TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
lblSelTrayNum.Text = tray.ToStr();
}
//}
if (LineManager.Line.IOValue(IO_Type.HY_TopCylinder_Up).Equals(IO_VALUE.HIGH))
{
......@@ -219,11 +219,11 @@ namespace OnlineStore.AssemblyLine
private void LoadTray()
{
cmbTray.Items.Clear();
for (int i = 101; i <= 150; i++)
{
cmbTray.Items.Add(i.ToString());
}
//cmbTray.Items.Clear();
//for (int i = 101; i <= 150; i++)
//{
// cmbTray.Items.Add(i.ToString());
//}
cmbWidth.Items.Clear();
cmbHeight.Items.Clear();
......@@ -236,11 +236,12 @@ namespace OnlineStore.AssemblyLine
cmbHeight.SelectedIndex = 0;
cmbTrayType.SelectedIndex = 0;
cmbTray.SelectedIndex = 0;
//cmbTray.SelectedIndex = 0;
}
private void btnUpdateTray_Click(object sender, EventArgs e)
{
int num = cmbTray.SelectedIndex + 101;
//int num = cmbTray.SelectedIndex + 101;
int num = (int)numTrayNum.Value;
DialogResult resut = MessageBox.Show("确定手动更新托盘【" + num + "】的信息?", "提示", MessageBoxButtons.YesNo);
if (resut.Equals(DialogResult.Yes))
{
......@@ -397,12 +398,38 @@ namespace OnlineStore.AssemblyLine
LogUtil.info("界面点击:" + btnLineStop.Text);
LineManager.Line.WriteDrivetMotorRun(IO_VALUE.LOW);
}
private void chbTray_CheckedChanged(object sender, EventArgs e)
{
if (!groupTray.Enabled.Equals(chbTray.Checked))
{
groupTray.Enabled = chbTray.Checked;
LogUtil.error("勾选 " + chbTray.Text + "=" + groupTray.Enabled);
}
}
private void cmbTray_SelectedIndexChanged(object sender, EventArgs e)
private void btnClear_Click(object sender, EventArgs e)
{
if (cmbTray.SelectedIndex >= 0)
//int num = cmbTray.SelectedIndex + 101;
int num = (int)numTrayNum.Value;
TrayInfo tray = TrayManager.GetTrayInfo(num);
DialogResult resut = MessageBox.Show("确定手动清空托盘【" + num + "】的信息?\r\n " + tray.ToStr() + "", "提示", MessageBoxButtons.YesNo);
if (resut.Equals(DialogResult.Yes))
{
TrayManager.ClearInstore( tray);
TrayManager.UpdateTrayInfo(num);
TrayInfo info = TrayManager.GetTrayInfo(num);
MessageBox.Show("更新成功:\r" + info.ToStr());
LogUtil.info("界面点击手动清空托盘信息:" + info.ToStr());
}
}
private void numTrayNum_ValueChanged(object sender, EventArgs e)
{
int trayNum = (int)numTrayNum.Value;
if (trayNum >= 0)
{
int trayNum = cmbTray.SelectedIndex + 101;
TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
cmbTrayType.SelectedIndex = tray.InOrOutStore;
......@@ -434,30 +461,5 @@ namespace OnlineStore.AssemblyLine
}
}
}
private void chbTray_CheckedChanged(object sender, EventArgs e)
{
if (!groupTray.Enabled.Equals(chbTray.Checked))
{
groupTray.Enabled = chbTray.Checked;
LogUtil.error("勾选 " + chbTray.Text + "=" + groupTray.Enabled);
}
}
private void btnClear_Click(object sender, EventArgs e)
{
int num = cmbTray.SelectedIndex + 101;
TrayInfo tray = TrayManager.GetTrayInfo(num);
DialogResult resut = MessageBox.Show("确定手动清空托盘【" + num + "】的信息?\r\n " + tray.ToStr() + "", "提示", MessageBoxButtons.YesNo);
if (resut.Equals(DialogResult.Yes))
{
TrayManager.ClearInstore( tray);
TrayManager.UpdateTrayInfo(num);
TrayInfo info = TrayManager.GetTrayInfo(num);
MessageBox.Show("更新成功:\r" + info.ToStr());
LogUtil.info("界面点击手动清空托盘信息:" + info.ToStr());
}
}
}
}
......@@ -328,9 +328,9 @@
this.groupBox1.Controls.Add(this.btnInStoreTset);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(294, 82);
this.groupBox1.Location = new System.Drawing.Point(339, 25);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(939, 69);
this.groupBox1.Size = new System.Drawing.Size(862, 69);
this.groupBox1.TabIndex = 195;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓通信测试";
......@@ -347,10 +347,9 @@
//
// btnUpdateStatus
//
this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdateStatus.BackColor = System.Drawing.Color.White;
this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateStatus.Location = new System.Drawing.Point(637, 21);
this.btnUpdateStatus.Location = new System.Drawing.Point(629, 21);
this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35);
this.btnUpdateStatus.TabIndex = 195;
......@@ -1121,38 +1120,38 @@
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Visible = false;
//
// 二维码学习ToolStripMenuItem
//
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator9.Visible = false;
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
......@@ -1160,36 +1159,36 @@
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator13.Size = new System.Drawing.Size(177, 6);
//
// iO模块状态ToolStripMenuItem
//
this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem";
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.iO模块状态ToolStripMenuItem.Text = "查看料仓状态";
this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
//
// 查看托盘信息ToolStripMenuItem
//
this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem";
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息";
this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
//
// 清空托盘信息ToolStripMenuItem
//
this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem";
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息";
this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click);
//
......@@ -1208,31 +1207,31 @@
// 清空日志ToolStripMenuItem
//
this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem";
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清空日志ToolStripMenuItem.Text = "清空日志";
this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(141, 6);
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6);
//
// 复制日志ToolStripMenuItem
//
this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem";
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.复制日志ToolStripMenuItem.Text = "复制日志";
this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(141, 6);
this.toolStripSeparator11.Size = new System.Drawing.Size(177, 6);
//
// 版本号ToolStripMenuItem
//
this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem";
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.版本号ToolStripMenuItem.Text = "关于软件";
this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click);
//
......@@ -1307,6 +1306,7 @@
this.自动保存托盘信息ToolStripMenuItem.Name = "自动保存托盘信息ToolStripMenuItem";
this.自动保存托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(206, 26);
this.自动保存托盘信息ToolStripMenuItem.Text = "保存托盘信息";
this.自动保存托盘信息ToolStripMenuItem.Visible = false;
this.自动保存托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.自动保存托盘信息ToolStripMenuItem_Click);
//
// toolStripSeparator24
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!