Commit 5db702d1 几米阳光

增加自动出库功能。扫码增加日志。

1 个父辈 7a963e86
......@@ -91,6 +91,7 @@
this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chbOnlyOut = new System.Windows.Forms.CheckBox();
this.lblTemp = new System.Windows.Forms.Label();
this.btnClearLog = new System.Windows.Forms.Button();
this.lblMsg = new System.Windows.Forms.Label();
......@@ -175,6 +176,7 @@
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.lblShuoKeMsg = new System.Windows.Forms.Label();
this.btnRelMove = new System.Windows.Forms.Button();
this.txtAddr = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
......@@ -195,7 +197,6 @@
this.btnLineAbsMove = new System.Windows.Forms.Button();
this.label25 = new System.Windows.Forms.Label();
this.comboBoxPortName = new System.Windows.Forms.ComboBox();
this.lblShuoKeMsg = new System.Windows.Forms.Label();
this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
......@@ -750,9 +751,9 @@
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 525);
this.richTextBox1.Location = new System.Drawing.Point(7, 567);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(496, 214);
this.richTextBox1.Size = new System.Drawing.Size(496, 172);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
......@@ -961,6 +962,7 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.chbOnlyOut);
this.groupBox2.Controls.Add(this.lblTemp);
this.groupBox2.Controls.Add(this.btnClearLog);
this.groupBox2.Controls.Add(this.lblMsg);
......@@ -1006,18 +1008,30 @@
this.groupBox2.Controls.Add(this.btnUpDownP4);
this.groupBox2.Location = new System.Drawing.Point(7, 124);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(496, 396);
this.groupBox2.Size = new System.Drawing.Size(496, 437);
this.groupBox2.TabIndex = 100;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "料仓操作";
this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
//
// chbOnlyOut
//
this.chbOnlyOut.AutoSize = true;
this.chbOnlyOut.Checked = true;
this.chbOnlyOut.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbOnlyOut.Location = new System.Drawing.Point(153, 69);
this.chbOnlyOut.Name = "chbOnlyOut";
this.chbOnlyOut.Size = new System.Drawing.Size(112, 24);
this.chbOnlyOut.TabIndex = 271;
this.chbOnlyOut.Text = "只出库不入库";
this.chbOnlyOut.UseVisualStyleBackColor = true;
//
// lblTemp
//
this.lblTemp.AutoSize = true;
this.lblTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTemp.ForeColor = System.Drawing.Color.Black;
this.lblTemp.Location = new System.Drawing.Point(11, 356);
this.lblTemp.Location = new System.Drawing.Point(11, 394);
this.lblTemp.Name = "lblTemp";
this.lblTemp.Size = new System.Drawing.Size(159, 20);
this.lblTemp.TabIndex = 270;
......@@ -1026,7 +1040,7 @@
// btnClearLog
//
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(251, 347);
this.btnClearLog.Location = new System.Drawing.Point(251, 385);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 38);
this.btnClearLog.TabIndex = 224;
......@@ -1039,7 +1053,7 @@
this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.ForeColor = System.Drawing.Color.Green;
this.lblMsg.Location = new System.Drawing.Point(269, 64);
this.lblMsg.Location = new System.Drawing.Point(15, 104);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(135, 20);
this.lblMsg.TabIndex = 223;
......@@ -1048,7 +1062,7 @@
// btnSavePosition
//
this.btnSavePosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSavePosition.Location = new System.Drawing.Point(362, 347);
this.btnSavePosition.Location = new System.Drawing.Point(362, 385);
this.btnSavePosition.Name = "btnSavePosition";
this.btnSavePosition.Size = new System.Drawing.Size(105, 38);
this.btnSavePosition.TabIndex = 217;
......@@ -1059,7 +1073,7 @@
// btnStartAuTo
//
this.btnStartAuTo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartAuTo.Location = new System.Drawing.Point(158, 55);
this.btnStartAuTo.Location = new System.Drawing.Point(271, 62);
this.btnStartAuTo.Name = "btnStartAuTo";
this.btnStartAuTo.Size = new System.Drawing.Size(105, 38);
this.btnStartAuTo.TabIndex = 222;
......@@ -1071,15 +1085,15 @@
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(12, 66);
this.label9.Location = new System.Drawing.Point(14, 73);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(92, 17);
this.label9.Size = new System.Drawing.Size(68, 17);
this.label9.TabIndex = 220;
this.label9.Text = "入库间隔仓位:";
this.label9.Text = "间隔仓位:";
//
// txtJiange
//
this.txtJiange.Location = new System.Drawing.Point(107, 61);
this.txtJiange.Location = new System.Drawing.Point(84, 68);
this.txtJiange.Name = "txtJiange";
this.txtJiange.Size = new System.Drawing.Size(37, 26);
this.txtJiange.TabIndex = 221;
......@@ -1092,7 +1106,7 @@
this.txtComP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP1.Location = new System.Drawing.Point(153, 318);
this.txtComP1.Location = new System.Drawing.Point(153, 356);
this.txtComP1.MaxLength = 0;
this.txtComP1.Name = "txtComP1";
this.txtComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1107,7 +1121,7 @@
this.txtInOutP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP2.Location = new System.Drawing.Point(153, 287);
this.txtInOutP2.Location = new System.Drawing.Point(153, 325);
this.txtInOutP2.MaxLength = 0;
this.txtInOutP2.Name = "txtInOutP2";
this.txtInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1122,7 +1136,7 @@
this.txtInOutP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP1.Location = new System.Drawing.Point(153, 256);
this.txtInOutP1.Location = new System.Drawing.Point(153, 294);
this.txtInOutP1.MaxLength = 0;
this.txtInOutP1.Name = "txtInOutP1";
this.txtInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1137,7 +1151,7 @@
this.txtMiddleP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtMiddleP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtMiddleP1.Location = new System.Drawing.Point(153, 225);
this.txtMiddleP1.Location = new System.Drawing.Point(153, 263);
this.txtMiddleP1.MaxLength = 0;
this.txtMiddleP1.Name = "txtMiddleP1";
this.txtMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1152,7 +1166,7 @@
this.txtUpDownP7.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP7.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP7.Location = new System.Drawing.Point(153, 163);
this.txtUpDownP7.Location = new System.Drawing.Point(153, 201);
this.txtUpDownP7.MaxLength = 0;
this.txtUpDownP7.Name = "txtUpDownP7";
this.txtUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1167,7 +1181,7 @@
this.txtUpDownP8.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP8.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP8.Location = new System.Drawing.Point(153, 194);
this.txtUpDownP8.Location = new System.Drawing.Point(153, 232);
this.txtUpDownP8.MaxLength = 0;
this.txtUpDownP8.Name = "txtUpDownP8";
this.txtUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1182,7 +1196,7 @@
this.txtUpDownP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP1.Location = new System.Drawing.Point(153, 101);
this.txtUpDownP1.Location = new System.Drawing.Point(153, 139);
this.txtUpDownP1.MaxLength = 0;
this.txtUpDownP1.Name = "txtUpDownP1";
this.txtUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1197,7 +1211,7 @@
this.txtUpDownP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP2.Location = new System.Drawing.Point(153, 132);
this.txtUpDownP2.Location = new System.Drawing.Point(153, 170);
this.txtUpDownP2.MaxLength = 0;
this.txtUpDownP2.Name = "txtUpDownP2";
this.txtUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1212,7 +1226,7 @@
this.txtComP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP3.Location = new System.Drawing.Point(395, 318);
this.txtComP3.Location = new System.Drawing.Point(395, 356);
this.txtComP3.MaxLength = 0;
this.txtComP3.Name = "txtComP3";
this.txtComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1227,7 +1241,7 @@
this.txtComP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP2.Location = new System.Drawing.Point(395, 287);
this.txtComP2.Location = new System.Drawing.Point(395, 325);
this.txtComP2.MaxLength = 0;
this.txtComP2.Name = "txtComP2";
this.txtComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1242,7 +1256,7 @@
this.txtInOutP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP3.Location = new System.Drawing.Point(395, 256);
this.txtInOutP3.Location = new System.Drawing.Point(395, 294);
this.txtInOutP3.MaxLength = 0;
this.txtInOutP3.Name = "txtInOutP3";
this.txtInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1257,7 +1271,7 @@
this.txtMiddleP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtMiddleP2.Location = new System.Drawing.Point(395, 225);
this.txtMiddleP2.Location = new System.Drawing.Point(395, 263);
this.txtMiddleP2.MaxLength = 0;
this.txtMiddleP2.Name = "txtMiddleP2";
this.txtMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1272,7 +1286,7 @@
this.txtUpDownP5.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP5.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP5.Location = new System.Drawing.Point(395, 163);
this.txtUpDownP5.Location = new System.Drawing.Point(395, 201);
this.txtUpDownP5.MaxLength = 0;
this.txtUpDownP5.Name = "txtUpDownP5";
this.txtUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1287,7 +1301,7 @@
this.txtUpDownP6.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP6.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP6.Location = new System.Drawing.Point(395, 194);
this.txtUpDownP6.Location = new System.Drawing.Point(395, 232);
this.txtUpDownP6.MaxLength = 0;
this.txtUpDownP6.Name = "txtUpDownP6";
this.txtUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1330,7 +1344,7 @@
this.txtUpDownP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP3.Location = new System.Drawing.Point(395, 101);
this.txtUpDownP3.Location = new System.Drawing.Point(395, 139);
this.txtUpDownP3.MaxLength = 0;
this.txtUpDownP3.Name = "txtUpDownP3";
this.txtUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1367,7 +1381,7 @@
this.txtUpDownP4.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP4.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP4.Location = new System.Drawing.Point(395, 132);
this.txtUpDownP4.Location = new System.Drawing.Point(395, 170);
this.txtUpDownP4.MaxLength = 0;
this.txtUpDownP4.Name = "txtUpDownP4";
this.txtUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1383,7 +1397,7 @@
this.btnComP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP1.ForeColor = System.Drawing.Color.Purple;
this.btnComP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnComP1.Location = new System.Drawing.Point(10, 316);
this.btnComP1.Location = new System.Drawing.Point(10, 354);
this.btnComP1.Name = "btnComP1";
this.btnComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP1.Size = new System.Drawing.Size(140, 27);
......@@ -1401,7 +1415,7 @@
this.btnInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP2.ForeColor = System.Drawing.Color.Green;
this.btnInOutP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP2.Location = new System.Drawing.Point(10, 285);
this.btnInOutP2.Location = new System.Drawing.Point(10, 323);
this.btnInOutP2.Name = "btnInOutP2";
this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP2.Size = new System.Drawing.Size(140, 27);
......@@ -1419,7 +1433,7 @@
this.btnInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP1.ForeColor = System.Drawing.Color.Green;
this.btnInOutP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP1.Location = new System.Drawing.Point(10, 254);
this.btnInOutP1.Location = new System.Drawing.Point(10, 292);
this.btnInOutP1.Name = "btnInOutP1";
this.btnInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP1.Size = new System.Drawing.Size(140, 27);
......@@ -1437,7 +1451,7 @@
this.btnMiddleP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.btnMiddleP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnMiddleP1.Location = new System.Drawing.Point(10, 223);
this.btnMiddleP1.Location = new System.Drawing.Point(10, 261);
this.btnMiddleP1.Name = "btnMiddleP1";
this.btnMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP1.Size = new System.Drawing.Size(140, 27);
......@@ -1455,7 +1469,7 @@
this.btnUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP7.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP7.Location = new System.Drawing.Point(10, 161);
this.btnUpDownP7.Location = new System.Drawing.Point(10, 199);
this.btnUpDownP7.Name = "btnUpDownP7";
this.btnUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP7.Size = new System.Drawing.Size(140, 27);
......@@ -1473,7 +1487,7 @@
this.btnUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP8.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP8.Location = new System.Drawing.Point(10, 192);
this.btnUpDownP8.Location = new System.Drawing.Point(10, 230);
this.btnUpDownP8.Name = "btnUpDownP8";
this.btnUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP8.Size = new System.Drawing.Size(140, 27);
......@@ -1491,7 +1505,7 @@
this.btnUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP1.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP1.Location = new System.Drawing.Point(10, 99);
this.btnUpDownP1.Location = new System.Drawing.Point(10, 137);
this.btnUpDownP1.Name = "btnUpDownP1";
this.btnUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP1.Size = new System.Drawing.Size(140, 27);
......@@ -1509,7 +1523,7 @@
this.btnUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP2.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP2.Location = new System.Drawing.Point(10, 130);
this.btnUpDownP2.Location = new System.Drawing.Point(10, 168);
this.btnUpDownP2.Name = "btnUpDownP2";
this.btnUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP2.Size = new System.Drawing.Size(140, 27);
......@@ -1526,7 +1540,7 @@
this.btnComP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnComP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP3.ForeColor = System.Drawing.Color.Purple;
this.btnComP3.Location = new System.Drawing.Point(251, 316);
this.btnComP3.Location = new System.Drawing.Point(251, 354);
this.btnComP3.Name = "btnComP3";
this.btnComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP3.Size = new System.Drawing.Size(140, 27);
......@@ -1543,7 +1557,7 @@
this.btnComP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnComP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP2.ForeColor = System.Drawing.Color.Purple;
this.btnComP2.Location = new System.Drawing.Point(251, 285);
this.btnComP2.Location = new System.Drawing.Point(251, 323);
this.btnComP2.Name = "btnComP2";
this.btnComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP2.Size = new System.Drawing.Size(140, 27);
......@@ -1560,7 +1574,7 @@
this.btnInOutP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP3.ForeColor = System.Drawing.Color.Green;
this.btnInOutP3.Location = new System.Drawing.Point(251, 254);
this.btnInOutP3.Location = new System.Drawing.Point(251, 292);
this.btnInOutP3.Name = "btnInOutP3";
this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP3.Size = new System.Drawing.Size(140, 27);
......@@ -1577,7 +1591,7 @@
this.btnMiddleP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.btnMiddleP2.Location = new System.Drawing.Point(251, 223);
this.btnMiddleP2.Location = new System.Drawing.Point(251, 261);
this.btnMiddleP2.Name = "btnMiddleP2";
this.btnMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP2.Size = new System.Drawing.Size(140, 27);
......@@ -1594,7 +1608,7 @@
this.btnUpDownP5.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP5.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP5.Location = new System.Drawing.Point(251, 161);
this.btnUpDownP5.Location = new System.Drawing.Point(251, 199);
this.btnUpDownP5.Name = "btnUpDownP5";
this.btnUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP5.Size = new System.Drawing.Size(140, 27);
......@@ -1611,7 +1625,7 @@
this.btnUpDownP6.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP6.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP6.Location = new System.Drawing.Point(251, 192);
this.btnUpDownP6.Location = new System.Drawing.Point(251, 230);
this.btnUpDownP6.Name = "btnUpDownP6";
this.btnUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP6.Size = new System.Drawing.Size(140, 27);
......@@ -1628,7 +1642,7 @@
this.btnUpDownP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP3.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP3.Location = new System.Drawing.Point(251, 99);
this.btnUpDownP3.Location = new System.Drawing.Point(251, 137);
this.btnUpDownP3.Name = "btnUpDownP3";
this.btnUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP3.Size = new System.Drawing.Size(140, 27);
......@@ -1645,7 +1659,7 @@
this.btnUpDownP4.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP4.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP4.Location = new System.Drawing.Point(251, 130);
this.btnUpDownP4.Location = new System.Drawing.Point(251, 168);
this.btnUpDownP4.Name = "btnUpDownP4";
this.btnUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP4.Size = new System.Drawing.Size(140, 27);
......@@ -1827,31 +1841,31 @@
// 轴卡点动ToolStripMenuItem
//
this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem";
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(160, 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(177, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(157, 6);
//
// 扫码测试ToolStripMenuItem
//
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(160, 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(177, 6);
this.toolStripSeparator10.Size = new System.Drawing.Size(157, 6);
//
// 学习二维码ToolStripMenuItem
//
this.学习二维码ToolStripMenuItem.Name = "学习二维码ToolStripMenuItem";
this.学习二维码ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.学习二维码ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.学习二维码ToolStripMenuItem.Text = "学习二维码";
this.学习二维码ToolStripMenuItem.Click += new System.EventHandler(this.学习二维码ToolStripMenuItem_Click);
//
......@@ -1996,6 +2010,16 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "压紧轴";
//
// lblShuoKeMsg
//
this.lblShuoKeMsg.AutoSize = true;
this.lblShuoKeMsg.ForeColor = System.Drawing.Color.Green;
this.lblShuoKeMsg.Location = new System.Drawing.Point(19, 170);
this.lblShuoKeMsg.Name = "lblShuoKeMsg";
this.lblShuoKeMsg.Size = new System.Drawing.Size(80, 17);
this.lblShuoKeMsg.TabIndex = 97;
this.lblShuoKeMsg.Text = "步进电机信息";
//
// btnRelMove
//
this.btnRelMove.Location = new System.Drawing.Point(285, 56);
......@@ -2189,16 +2213,6 @@
this.comboBoxPortName.Size = new System.Drawing.Size(103, 25);
this.comboBoxPortName.TabIndex = 0;
//
// lblShuoKeMsg
//
this.lblShuoKeMsg.AutoSize = true;
this.lblShuoKeMsg.ForeColor = System.Drawing.Color.Green;
this.lblShuoKeMsg.Location = new System.Drawing.Point(19, 170);
this.lblShuoKeMsg.Name = "lblShuoKeMsg";
this.lblShuoKeMsg.Size = new System.Drawing.Size(80, 17);
this.lblShuoKeMsg.TabIndex = 97;
this.lblShuoKeMsg.Text = "步进电机信息";
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -2413,6 +2427,7 @@
private System.Windows.Forms.Label label25;
private System.Windows.Forms.ComboBox comboBoxPortName;
private System.Windows.Forms.Label lblShuoKeMsg;
private System.Windows.Forms.CheckBox chbOnlyOut;
}
}
......@@ -897,12 +897,21 @@ namespace OnlineStore.ACSingleStore
}
else
{
DialogResult res = MessageBox.Show("确定开始自动出入库?", "提示", MessageBoxButtons.YesNo);
DialogResult res;
if (chbOnlyOut.Checked)
{
res = MessageBox.Show("确定开始自动出库?", "提示", MessageBoxButtons.YesNo);
}
else
{
res = MessageBox.Show("确定开始自动出入库?", "提示", MessageBoxButtons.YesNo);
}
if (res.Equals(DialogResult.Yes))
{
store.autoNext = true;
int jiange = FormUtil.GetIntValue(txtJiange);
store.autoJiange = jiange;
store.AutoOnlyOut = chbOnlyOut.Checked;
if (cmbPosition.SelectedIndex >= 0)
{
int currIndex = cmbPosition.SelectedIndex;
......@@ -910,9 +919,18 @@ namespace OnlineStore.ACSingleStore
store.AutoStartIndex = currIndex;
string poText = cmbPosition.Text;
store.autoMsg = "自动出库:" + poText;
LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + ")(间隔=" + jiange + ")(" +
(store.AutoOnlyOut ? "出库" : "出入库") + "),开始!");
//store.StartOutStoreMove(new InOutStoreParam("", poText));
store.StartInStoreMove(new InOutStoreParam("", poText));
if (store.AutoOnlyOut)
{
store.StartOutStoreMove(new InOutStoreParam("", poText));
}
else
{
store.StartInStoreMove(new InOutStoreParam("", poText));
}
}
btnStartAuTo.Text = "停止自动出入库";
}
......
......@@ -1453,7 +1453,7 @@ namespace OnlineStore.DeviceLibrary
private void scanTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
int height = GetHeight();
LogUtil.info("高度【"+height+"】开始扫码");
// LogUtil.info("高度【"+height+"】开始扫码");
DateTime date = DateTime.Now;
//scanTimer.Enabled = false;
KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
......
......@@ -18,7 +18,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 入库完成后自动出库,出库完成后自动入库
/// </summary>
public bool autoNext = false;
public bool autoNext = false;
/// <summary>
/// 自动出入库只出库不入库
/// </summary>
public bool AutoOnlyOut = false;
/// <summary>
/// 自动出入库间隔
/// </summary>
......@@ -821,11 +825,7 @@ namespace OnlineStore.DeviceLibrary
}
if (storeMoveType.Equals(StoreMoveType.InStore))
{
int newIndex = autoPositionIndex - 1;
//if (autoJiange == 0)
//{
// newIndex = autoPositionIndex;
//}
int newIndex = autoPositionIndex;
if (newIndex < 0)
{
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
......@@ -844,36 +844,16 @@ namespace OnlineStore.DeviceLibrary
{
autoPositionIndex = newIndex;
string posid = PositionNumList[autoPositionIndex];
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
else if (CurrInOutCount >= Config.Box_ResetMCount)
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutStoreParam("", posid));
}
StartNewOut(posid);
}
}
else if (storeMoveType.Equals(StoreMoveType.OutStore))
{
int newIndex = autoPositionIndex - autoJiange;
if (newIndex < 0)
{
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count && AutoOnlyOut.Equals(false))
{
newIndex = AutoStartIndex;
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】");
......@@ -888,27 +868,16 @@ namespace OnlineStore.DeviceLibrary
else
{
string posid = PositionNumList[newIndex];
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
if (AutoOnlyOut)
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
Reset(false);
autoMsg = "自动入库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "AAAA", posid));
}
else if (CurrInOutCount >= Config.Box_ResetMCount)
StartNewOut(posid);
}else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动入库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "AAAA", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个入库:posid=" + posid);
LogUtil.info(LOGGER, StoreName + "自动入库:posid=" + posid);
autoMsg = "自动入库:" + posid;
StartInStoreMove(new InOutStoreParam("AAAA", posid));
}
}
}
}
......@@ -918,6 +887,56 @@ namespace OnlineStore.DeviceLibrary
}
}
private void StartNewIn(string posid)
{
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
{
LogUtil.info(LOGGER, StoreName + "自动入库:【" + posid + "】已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存放到列表中");
Reset(false);
autoMsg = "自动入库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "AAAA", posid));
}
else if (CurrInOutCount >= Config.Box_ResetMCount)
{
LogUtil.info(LOGGER, StoreName + "自动入库:【" + posid + "】已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把入库信息存放到列表中");
//ResetMiddleAxis(false);
autoMsg = "自动入库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "AAAA", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + "自动入库:posid=" + posid);
autoMsg = "自动入库:" + posid;
StartInStoreMove(new InOutStoreParam("AAAA", posid));
}
}
private void StartNewOut(string posid)
{
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
{
LogUtil.info(LOGGER, StoreName + "自动入库:【" + posid + "】已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
else if (CurrInOutCount >= Config.Box_ResetMCount)
{
LogUtil.info(LOGGER, StoreName + "自动入库:【" + posid + "】已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + "自动出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutStoreParam("", posid));
}
}
private void InStoreLog(string msg)
{
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......
......@@ -70,23 +70,44 @@ namespace OnlineStore.DeviceLibrary
public static Bitmap GetCamerImage(string cameraName)
{
Bitmap bitm = null;
if (balserNameList.Contains(cameraName))
{
BaslerCamera.Instance.Open(cameraName);
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
}
else if(hikNameList.Contains(cameraName))
try
{
HIKCamera.Instance.Open(cameraName);
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
if (balserNameList.Contains(cameraName))
{
bool result = BaslerCamera.Instance.Open(cameraName);
if (result)
{
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + BaslerCamera.Instance.ErrInfo);
}
}
else if (hikNameList.Contains(cameraName))
{
bool result = HIKCamera.Instance.Open(cameraName);
if (result)
{
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + HIKCamera.Instance.ErrInfo);
}
}
else
{
LogUtil.info("未找到相机【" + cameraName + "】无法获取图片");
}
}
else
catch (Exception ex)
{
LogUtil.info("未找到摄像机【"+cameraName+"】无法获取图片");
LogUtil.error("从相机【" + cameraName + "】获取图片出错:" + ex.ToString());
}
return bitm;
}
......@@ -107,6 +128,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.info(" 摄像机【" + cameraName + "】获取图片完成,开始扫码");
HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
......@@ -123,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
}
allCodeList.AddRange(cc);
}
}
}
}
catch (Exception ex)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!