Commit f72c9764 LN

界面调整

1 个父辈 4dfa6eca
......@@ -6,12 +6,12 @@
<appSettings>
<!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1"/>
<add key="App_Title" value="包装料料仓"/>
<add key="App_Title" value="包装料料仓"/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<add key="StartBlowValue" value="4"/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4"/>
<!--Server address-->
<!--Server address-->
<add key="http.server" value="http://192.168.101.11/myproject/" />
<!--storeType-->
<add key="store_count" value="2"/>
......@@ -31,22 +31,23 @@
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="QR Code" />
<!--出库等待料盘拿走的时间,秒-->
<add key="OutStoreWaitSeconds" value="10"/>
<add key="OutStoreWaitSeconds" value="10"/>
<!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪-->
<add key="HumitureControllerType" value="0"/>
<add key="UseAIOBOX" value="1"/>
<add key ="DIMS" value ="120"/>
<add key ="DIMS" value ="60"/>
<add key ="DOMS" value ="300"/>
<!--流水线地址和端口配置-->
<add key ="LineServerIp" value ="192.168.101.11"/>
<add key ="LineServerPort" value ="5246"/>
<!--是否调试状态-->
<add key ="IsInDebug" value ="1"/>
<add key ="UseBuzzer" value ="1"/>
<add key ="UseBuzzer" value ="1"/>
<!--IO模块是否主动上传-->
<add key ="AIOAutoUpload" value ="1"/>
<add key ="AIOAutoUpload" value ="0"/>
<!--AGV调度服务器地址-->
<add key="AgvServerIp" value="192.168.103.22" />
<add key ="CodeCount" value ="1"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -96,7 +96,6 @@
this.txtUpDownP5 = new System.Windows.Forms.TextBox();
this.txtUpDownP6 = new System.Windows.Forms.TextBox();
this.cmbPosition = new System.Windows.Forms.ComboBox();
this.label21 = new System.Windows.Forms.Label();
this.txtUpDownP3 = new System.Windows.Forms.TextBox();
this.btnInStore = new System.Windows.Forms.Button();
this.btnOutStore = new System.Windows.Forms.Button();
......@@ -115,6 +114,7 @@
this.btnUpDownP6 = new System.Windows.Forms.Button();
this.btnUpDownP3 = new System.Windows.Forms.Button();
this.btnUpDownP4 = new System.Windows.Forms.Button();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupShelf.SuspendLayout();
this.panel1.SuspendLayout();
this.tabControl1.SuspendLayout();
......@@ -124,6 +124,7 @@
this.groupBox7.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupInout.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// timer1
......@@ -147,9 +148,9 @@
this.groupShelf.Controls.Add(this.btnUpdownP102);
this.groupShelf.Controls.Add(this.cmbShelfPosition);
this.groupShelf.Enabled = false;
this.groupShelf.Location = new System.Drawing.Point(517, 191);
this.groupShelf.Location = new System.Drawing.Point(7, 8);
this.groupShelf.Name = "groupShelf";
this.groupShelf.Size = new System.Drawing.Size(236, 520);
this.groupShelf.Size = new System.Drawing.Size(550, 465);
this.groupShelf.TabIndex = 274;
this.groupShelf.TabStop = false;
this.groupShelf.Text = "料架位置";
......@@ -159,7 +160,7 @@
this.btnSaveShelf.BackColor = System.Drawing.SystemColors.Control;
this.btnSaveShelf.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveShelf.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveShelf.Location = new System.Drawing.Point(70, 357);
this.btnSaveShelf.Location = new System.Drawing.Point(281, 29);
this.btnSaveShelf.Name = "btnSaveShelf";
this.btnSaveShelf.Size = new System.Drawing.Size(105, 38);
this.btnSaveShelf.TabIndex = 282;
......@@ -176,9 +177,9 @@
this.label13.Location = new System.Drawing.Point(16, 40);
this.label13.Name = "label13";
this.label13.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label13.Size = new System.Drawing.Size(95, 17);
this.label13.Size = new System.Drawing.Size(59, 17);
this.label13.TabIndex = 281;
this.label13.Text = "请选择料架位置:";
this.label13.Text = "料架位置:";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtInoutP101
......@@ -188,7 +189,7 @@
this.txtInoutP101.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInoutP101.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInoutP101.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInoutP101.Location = new System.Drawing.Point(136, 294);
this.txtInoutP101.Location = new System.Drawing.Point(391, 151);
this.txtInoutP101.MaxLength = 0;
this.txtInoutP101.Name = "txtInoutP101";
this.txtInoutP101.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -204,7 +205,7 @@
this.btnInoutP101.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInoutP101.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInoutP101.ForeColor = System.Drawing.Color.Green;
this.btnInoutP101.Location = new System.Drawing.Point(13, 289);
this.btnInoutP101.Location = new System.Drawing.Point(268, 146);
this.btnInoutP101.Name = "btnInoutP101";
this.btnInoutP101.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInoutP101.Size = new System.Drawing.Size(118, 33);
......@@ -220,7 +221,7 @@
this.txtMP101.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtMP101.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMP101.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtMP101.Location = new System.Drawing.Point(136, 244);
this.txtMP101.Location = new System.Drawing.Point(391, 96);
this.txtMP101.MaxLength = 0;
this.txtMP101.Name = "txtMP101";
this.txtMP101.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -237,7 +238,7 @@
this.button5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button5.Location = new System.Drawing.Point(13, 239);
this.button5.Location = new System.Drawing.Point(268, 91);
this.button5.Name = "button5";
this.button5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.button5.Size = new System.Drawing.Size(118, 33);
......@@ -253,7 +254,7 @@
this.txtUpdownP101.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpdownP101.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpdownP101.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpdownP101.Location = new System.Drawing.Point(136, 144);
this.txtUpdownP101.Location = new System.Drawing.Point(136, 96);
this.txtUpdownP101.MaxLength = 0;
this.txtUpdownP101.Name = "txtUpdownP101";
this.txtUpdownP101.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -268,7 +269,7 @@
this.txtUpdownP102.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpdownP102.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpdownP102.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpdownP102.Location = new System.Drawing.Point(136, 194);
this.txtUpdownP102.Location = new System.Drawing.Point(136, 147);
this.txtUpdownP102.MaxLength = 0;
this.txtUpdownP102.Name = "txtUpdownP102";
this.txtUpdownP102.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -284,7 +285,7 @@
this.btnUpdownP101.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdownP101.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdownP101.ForeColor = System.Drawing.Color.Red;
this.btnUpdownP101.Location = new System.Drawing.Point(13, 139);
this.btnUpdownP101.Location = new System.Drawing.Point(13, 91);
this.btnUpdownP101.Name = "btnUpdownP101";
this.btnUpdownP101.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpdownP101.Size = new System.Drawing.Size(118, 33);
......@@ -301,7 +302,7 @@
this.btnUpdownP102.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdownP102.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdownP102.ForeColor = System.Drawing.Color.Red;
this.btnUpdownP102.Location = new System.Drawing.Point(13, 189);
this.btnUpdownP102.Location = new System.Drawing.Point(13, 142);
this.btnUpdownP102.Name = "btnUpdownP102";
this.btnUpdownP102.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpdownP102.Size = new System.Drawing.Size(118, 33);
......@@ -315,9 +316,9 @@
this.cmbShelfPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbShelfPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbShelfPosition.FormattingEnabled = true;
this.cmbShelfPosition.Location = new System.Drawing.Point(13, 77);
this.cmbShelfPosition.Location = new System.Drawing.Point(98, 34);
this.cmbShelfPosition.Name = "cmbShelfPosition";
this.cmbShelfPosition.Size = new System.Drawing.Size(189, 28);
this.cmbShelfPosition.Size = new System.Drawing.Size(144, 28);
this.cmbShelfPosition.TabIndex = 272;
this.cmbShelfPosition.SelectedIndexChanged += new System.EventHandler(this.cmbShelfPosition_SelectedIndexChanged);
//
......@@ -335,15 +336,15 @@
this.panel1.Controls.Add(this.btnStoreStart);
this.panel1.Controls.Add(this.btnStoreStop);
this.panel1.Controls.Add(this.btnSotreReset);
this.panel1.Location = new System.Drawing.Point(7, 7);
this.panel1.Location = new System.Drawing.Point(3, 7);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1347, 55);
this.panel1.Size = new System.Drawing.Size(1308, 47);
this.panel1.TabIndex = 273;
//
// btnUpdown
//
this.btnUpdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdown.Location = new System.Drawing.Point(1200, 4);
this.btnUpdown.Location = new System.Drawing.Point(1173, 4);
this.btnUpdown.Name = "btnUpdown";
this.btnUpdown.Size = new System.Drawing.Size(128, 39);
this.btnUpdown.TabIndex = 273;
......@@ -354,7 +355,7 @@
// btnScanTest
//
this.btnScanTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnScanTest.Location = new System.Drawing.Point(1067, 4);
this.btnScanTest.Location = new System.Drawing.Point(1043, 4);
this.btnScanTest.Name = "btnScanTest";
this.btnScanTest.Size = new System.Drawing.Size(128, 39);
this.btnScanTest.TabIndex = 272;
......@@ -365,7 +366,7 @@
// btnStoreHome
//
this.btnStoreHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreHome.Location = new System.Drawing.Point(402, 4);
this.btnStoreHome.Location = new System.Drawing.Point(393, 4);
this.btnStoreHome.Name = "btnStoreHome";
this.btnStoreHome.Size = new System.Drawing.Size(128, 39);
this.btnStoreHome.TabIndex = 3;
......@@ -376,7 +377,7 @@
// btnAxisOff
//
this.btnAxisOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOff.Location = new System.Drawing.Point(934, 4);
this.btnAxisOff.Location = new System.Drawing.Point(913, 4);
this.btnAxisOff.Name = "btnAxisOff";
this.btnAxisOff.Size = new System.Drawing.Size(128, 39);
this.btnAxisOff.TabIndex = 11;
......@@ -387,7 +388,7 @@
// btnAxisOn
//
this.btnAxisOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOn.Location = new System.Drawing.Point(801, 4);
this.btnAxisOn.Location = new System.Drawing.Point(783, 4);
this.btnAxisOn.Name = "btnAxisOn";
this.btnAxisOn.Size = new System.Drawing.Size(128, 39);
this.btnAxisOn.TabIndex = 10;
......@@ -398,7 +399,7 @@
// btnAxisP
//
this.btnAxisP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisP.Location = new System.Drawing.Point(668, 4);
this.btnAxisP.Location = new System.Drawing.Point(653, 4);
this.btnAxisP.Name = "btnAxisP";
this.btnAxisP.Size = new System.Drawing.Size(128, 39);
this.btnAxisP.TabIndex = 8;
......@@ -409,7 +410,7 @@
// btnIO
//
this.btnIO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnIO.Location = new System.Drawing.Point(535, 4);
this.btnIO.Location = new System.Drawing.Point(523, 4);
this.btnIO.Name = "btnIO";
this.btnIO.Size = new System.Drawing.Size(128, 39);
this.btnIO.TabIndex = 5;
......@@ -431,7 +432,7 @@
// btnStoreStop
//
this.btnStoreStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreStop.Location = new System.Drawing.Point(136, 4);
this.btnStoreStop.Location = new System.Drawing.Point(133, 4);
this.btnStoreStop.Name = "btnStoreStop";
this.btnStoreStop.Size = new System.Drawing.Size(128, 39);
this.btnStoreStop.TabIndex = 1;
......@@ -442,7 +443,7 @@
// btnSotreReset
//
this.btnSotreReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSotreReset.Location = new System.Drawing.Point(269, 4);
this.btnSotreReset.Location = new System.Drawing.Point(263, 4);
this.btnSotreReset.Name = "btnSotreReset";
this.btnSotreReset.Size = new System.Drawing.Size(128, 39);
this.btnSotreReset.TabIndex = 2;
......@@ -457,20 +458,20 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(759, 63);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(742, 56);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(595, 648);
this.tabControl1.Size = new System.Drawing.Size(573, 515);
this.tabControl1.TabIndex = 272;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.axisMoveControl1);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(587, 615);
this.tabPage1.Size = new System.Drawing.Size(565, 482);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
......@@ -487,9 +488,9 @@
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Enabled = false;
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(14, 492);
this.groupBox1.Location = new System.Drawing.Point(6, 504);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(559, 114);
this.groupBox1.Size = new System.Drawing.Size(730, 63);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "压紧轴位置配置";
......@@ -499,7 +500,7 @@
this.btnSaveCom.BackColor = System.Drawing.SystemColors.Control;
this.btnSaveCom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveCom.Location = new System.Drawing.Point(379, 59);
this.btnSaveCom.Location = new System.Drawing.Point(617, 19);
this.btnSaveCom.Name = "btnSaveCom";
this.btnSaveCom.Size = new System.Drawing.Size(105, 38);
this.btnSaveCom.TabIndex = 256;
......@@ -514,7 +515,7 @@
this.txtComMax.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComMax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComMax.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComMax.Location = new System.Drawing.Point(413, 27);
this.txtComMax.Location = new System.Drawing.Point(341, 27);
this.txtComMax.MaxLength = 12;
this.txtComMax.Name = "txtComMax";
this.txtComMax.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -528,7 +529,7 @@
this.label47.Cursor = System.Windows.Forms.Cursors.Default;
this.label47.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label47.ForeColor = System.Drawing.SystemColors.ControlText;
this.label47.Location = new System.Drawing.Point(392, 30);
this.label47.Location = new System.Drawing.Point(318, 30);
this.label47.Name = "label47";
this.label47.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label47.Size = new System.Drawing.Size(13, 17);
......@@ -542,7 +543,7 @@
this.txtComMin.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComMin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComMin.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComMin.Location = new System.Drawing.Point(302, 27);
this.txtComMin.Location = new System.Drawing.Point(226, 27);
this.txtComMin.MaxLength = 12;
this.txtComMin.Name = "txtComMin";
this.txtComMin.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -556,7 +557,7 @@
this.label48.Cursor = System.Windows.Forms.Cursors.Default;
this.label48.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label48.ForeColor = System.Drawing.SystemColors.ControlText;
this.label48.Location = new System.Drawing.Point(211, 30);
this.label48.Location = new System.Drawing.Point(133, 30);
this.label48.Name = "label48";
this.label48.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label48.Size = new System.Drawing.Size(83, 17);
......@@ -573,7 +574,7 @@
this.btnCMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCMove.ForeColor = System.Drawing.Color.Purple;
this.btnCMove.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCMove.Location = new System.Drawing.Point(95, 64);
this.btnCMove.Location = new System.Drawing.Point(433, 22);
this.btnCMove.Name = "btnCMove";
this.btnCMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnCMove.Size = new System.Drawing.Size(174, 33);
......@@ -588,9 +589,9 @@
this.cmbPlateH.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPlateH.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbPlateH.FormattingEnabled = true;
this.cmbPlateH.Location = new System.Drawing.Point(95, 24);
this.cmbPlateH.Location = new System.Drawing.Point(59, 24);
this.cmbPlateH.Name = "cmbPlateH";
this.cmbPlateH.Size = new System.Drawing.Size(95, 28);
this.cmbPlateH.Size = new System.Drawing.Size(64, 28);
this.cmbPlateH.TabIndex = 176;
this.cmbPlateH.SelectedIndexChanged += new System.EventHandler(this.cmbPlateH_SelectedIndexChanged);
//
......@@ -600,20 +601,20 @@
this.label1.Cursor = System.Windows.Forms.Cursors.Default;
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
this.label1.Location = new System.Drawing.Point(30, 30);
this.label1.Location = new System.Drawing.Point(14, 30);
this.label1.Name = "label1";
this.label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label1.Size = new System.Drawing.Size(59, 17);
this.label1.Size = new System.Drawing.Size(35, 17);
this.label1.TabIndex = 175;
this.label1.Text = "选择盘高:";
this.label1.Text = "盘高:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// axisMoveControl1
//
this.axisMoveControl1.Enabled = false;
this.axisMoveControl1.Location = new System.Drawing.Point(7, 7);
this.axisMoveControl1.Location = new System.Drawing.Point(7, 4);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(574, 473);
this.axisMoveControl1.Size = new System.Drawing.Size(547, 449);
this.axisMoveControl1.TabIndex = 0;
//
// tabPage2
......@@ -622,7 +623,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(587, 671);
this.tabPage2.Size = new System.Drawing.Size(565, 482);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 温湿度 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -640,7 +641,7 @@
this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Location = new System.Drawing.Point(11, 6);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(561, 154);
this.groupBox7.Size = new System.Drawing.Size(532, 154);
this.groupBox7.TabIndex = 272;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
......@@ -747,9 +748,9 @@
this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Controls.Add(this.chbDebug);
this.groupBox3.Location = new System.Drawing.Point(7, 65);
this.groupBox3.Location = new System.Drawing.Point(3, 58);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(746, 124);
this.groupBox3.Size = new System.Drawing.Size(733, 125);
this.groupBox3.TabIndex = 268;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态";
......@@ -759,7 +760,7 @@
this.lblMoveEquipInfo.AutoSize = true;
this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Blue;
this.lblMoveEquipInfo.Location = new System.Drawing.Point(221, 30);
this.lblMoveEquipInfo.Location = new System.Drawing.Point(221, 27);
this.lblMoveEquipInfo.Name = "lblMoveEquipInfo";
this.lblMoveEquipInfo.Size = new System.Drawing.Size(65, 19);
this.lblMoveEquipInfo.TabIndex = 272;
......@@ -773,7 +774,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(12, 61);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(728, 54);
this.lblWarnMsg.Size = new System.Drawing.Size(715, 54);
this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -782,7 +783,7 @@
this.lblThisSta.AutoSize = true;
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Green;
this.lblThisSta.Location = new System.Drawing.Point(14, 30);
this.lblThisSta.Location = new System.Drawing.Point(14, 27);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(65, 19);
this.lblThisSta.TabIndex = 216;
......@@ -793,7 +794,7 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(630, 24);
this.chbDebug.Location = new System.Drawing.Point(617, 24);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(93, 25);
this.chbDebug.TabIndex = 271;
......@@ -824,7 +825,6 @@
this.groupInout.Controls.Add(this.txtUpDownP5);
this.groupInout.Controls.Add(this.txtUpDownP6);
this.groupInout.Controls.Add(this.cmbPosition);
this.groupInout.Controls.Add(this.label21);
this.groupInout.Controls.Add(this.txtUpDownP3);
this.groupInout.Controls.Add(this.btnInStore);
this.groupInout.Controls.Add(this.btnOutStore);
......@@ -844,9 +844,9 @@
this.groupInout.Controls.Add(this.btnUpDownP3);
this.groupInout.Controls.Add(this.btnUpDownP4);
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(7, 191);
this.groupInout.Location = new System.Drawing.Point(3, 184);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(503, 520);
this.groupInout.Size = new System.Drawing.Size(733, 316);
this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作";
......@@ -856,7 +856,7 @@
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(10, 468);
this.lblTemp.Location = new System.Drawing.Point(9, 287);
this.lblTemp.Name = "lblTemp";
this.lblTemp.Size = new System.Drawing.Size(159, 20);
this.lblTemp.TabIndex = 270;
......@@ -867,7 +867,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, 85);
this.lblMsg.Location = new System.Drawing.Point(248, 70);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(135, 20);
this.lblMsg.TabIndex = 223;
......@@ -878,7 +878,7 @@
this.btnSavePosition.BackColor = System.Drawing.SystemColors.Control;
this.btnSavePosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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(379, 468);
this.btnSavePosition.Location = new System.Drawing.Point(617, 20);
this.btnSavePosition.Name = "btnSavePosition";
this.btnSavePosition.Size = new System.Drawing.Size(105, 38);
this.btnSavePosition.TabIndex = 217;
......@@ -888,20 +888,22 @@
//
// btnStartAuTo
//
this.btnStartAuTo.BackColor = System.Drawing.SystemColors.Control;
this.btnStartAuTo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 76);
this.btnStartAuTo.Location = new System.Drawing.Point(470, 20);
this.btnStartAuTo.Name = "btnStartAuTo";
this.btnStartAuTo.Size = new System.Drawing.Size(105, 38);
this.btnStartAuTo.Size = new System.Drawing.Size(141, 38);
this.btnStartAuTo.TabIndex = 222;
this.btnStartAuTo.Text = "启动自动模式";
this.btnStartAuTo.UseVisualStyleBackColor = true;
this.btnStartAuTo.Text = "开始自动出入库";
this.btnStartAuTo.UseVisualStyleBackColor = false;
this.btnStartAuTo.Click += new System.EventHandler(this.btnStartAuTo_Click);
//
// label9
//
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, 87);
this.label9.Location = new System.Drawing.Point(101, 73);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(83, 17);
this.label9.TabIndex = 220;
......@@ -909,9 +911,9 @@
//
// txtJiange
//
this.txtJiange.Location = new System.Drawing.Point(107, 82);
this.txtJiange.Location = new System.Drawing.Point(190, 67);
this.txtJiange.Name = "txtJiange";
this.txtJiange.Size = new System.Drawing.Size(37, 26);
this.txtJiange.Size = new System.Drawing.Size(52, 26);
this.txtJiange.TabIndex = 221;
this.txtJiange.Text = "0";
//
......@@ -922,7 +924,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, 418);
this.txtComP1.Location = new System.Drawing.Point(636, 274);
this.txtComP1.MaxLength = 0;
this.txtComP1.Name = "txtComP1";
this.txtComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -937,7 +939,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, 378);
this.txtInOutP2.Location = new System.Drawing.Point(394, 239);
this.txtInOutP2.MaxLength = 0;
this.txtInOutP2.Name = "txtInOutP2";
this.txtInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -952,7 +954,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, 338);
this.txtInOutP1.Location = new System.Drawing.Point(394, 199);
this.txtInOutP1.MaxLength = 0;
this.txtInOutP1.Name = "txtInOutP1";
this.txtInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -967,7 +969,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, 298);
this.txtMiddleP1.Location = new System.Drawing.Point(153, 194);
this.txtMiddleP1.MaxLength = 0;
this.txtMiddleP1.Name = "txtMiddleP1";
this.txtMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -982,7 +984,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, 138);
this.txtUpDownP1.Location = new System.Drawing.Point(153, 114);
this.txtUpDownP1.MaxLength = 0;
this.txtUpDownP1.Name = "txtUpDownP1";
this.txtUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -997,7 +999,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, 178);
this.txtUpDownP2.Location = new System.Drawing.Point(153, 154);
this.txtUpDownP2.MaxLength = 0;
this.txtUpDownP2.Name = "txtUpDownP2";
this.txtUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1012,7 +1014,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, 418);
this.txtComP3.Location = new System.Drawing.Point(636, 234);
this.txtComP3.MaxLength = 0;
this.txtComP3.Name = "txtComP3";
this.txtComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1027,7 +1029,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, 378);
this.txtComP2.Location = new System.Drawing.Point(636, 194);
this.txtComP2.MaxLength = 0;
this.txtComP2.Name = "txtComP2";
this.txtComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1042,7 +1044,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, 338);
this.txtInOutP3.Location = new System.Drawing.Point(394, 279);
this.txtInOutP3.MaxLength = 0;
this.txtInOutP3.Name = "txtInOutP3";
this.txtInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1057,7 +1059,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, 298);
this.txtMiddleP2.Location = new System.Drawing.Point(153, 234);
this.txtMiddleP2.MaxLength = 0;
this.txtMiddleP2.Name = "txtMiddleP2";
this.txtMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1072,7 +1074,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, 218);
this.txtUpDownP5.Location = new System.Drawing.Point(636, 114);
this.txtUpDownP5.MaxLength = 0;
this.txtUpDownP5.Name = "txtUpDownP5";
this.txtUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1087,7 +1089,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, 258);
this.txtUpDownP6.Location = new System.Drawing.Point(636, 154);
this.txtUpDownP6.MaxLength = 0;
this.txtUpDownP6.Name = "txtUpDownP6";
this.txtUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1100,26 +1102,12 @@
this.cmbPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbPosition.FormattingEnabled = true;
this.cmbPosition.Location = new System.Drawing.Point(76, 31);
this.cmbPosition.Location = new System.Drawing.Point(10, 25);
this.cmbPosition.Name = "cmbPosition";
this.cmbPosition.Size = new System.Drawing.Size(189, 28);
this.cmbPosition.Size = new System.Drawing.Size(232, 28);
this.cmbPosition.TabIndex = 174;
this.cmbPosition.SelectedIndexChanged += new System.EventHandler(this.cmbPosition_SelectedIndexChanged);
//
// label21
//
this.label21.AutoSize = true;
this.label21.Cursor = System.Windows.Forms.Cursors.Default;
this.label21.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label21.ForeColor = System.Drawing.SystemColors.ControlText;
this.label21.Location = new System.Drawing.Point(11, 37);
this.label21.Name = "label21";
this.label21.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label21.Size = new System.Drawing.Size(59, 17);
this.label21.TabIndex = 172;
this.label21.Text = "选择仓位:";
this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtUpDownP3
//
this.txtUpDownP3.AcceptsReturn = true;
......@@ -1127,7 +1115,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, 138);
this.txtUpDownP3.Location = new System.Drawing.Point(395, 114);
this.txtUpDownP3.MaxLength = 0;
this.txtUpDownP3.Name = "txtUpDownP3";
this.txtUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1140,7 +1128,7 @@
this.btnInStore.BackColor = System.Drawing.SystemColors.Control;
this.btnInStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInStore.Location = new System.Drawing.Point(271, 26);
this.btnInStore.Location = new System.Drawing.Point(248, 20);
this.btnInStore.Name = "btnInStore";
this.btnInStore.Size = new System.Drawing.Size(105, 38);
this.btnInStore.TabIndex = 102;
......@@ -1153,7 +1141,7 @@
this.btnOutStore.BackColor = System.Drawing.SystemColors.Control;
this.btnOutStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStore.Location = new System.Drawing.Point(379, 26);
this.btnOutStore.Location = new System.Drawing.Point(359, 20);
this.btnOutStore.Name = "btnOutStore";
this.btnOutStore.Size = new System.Drawing.Size(105, 38);
this.btnOutStore.TabIndex = 101;
......@@ -1168,7 +1156,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, 178);
this.txtUpDownP4.Location = new System.Drawing.Point(395, 154);
this.txtUpDownP4.MaxLength = 0;
this.txtUpDownP4.Name = "txtUpDownP4";
this.txtUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1185,7 +1173,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, 413);
this.btnComP1.Location = new System.Drawing.Point(493, 269);
this.btnComP1.Name = "btnComP1";
this.btnComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP1.Size = new System.Drawing.Size(140, 33);
......@@ -1204,7 +1192,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, 373);
this.btnInOutP2.Location = new System.Drawing.Point(251, 234);
this.btnInOutP2.Name = "btnInOutP2";
this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP2.Size = new System.Drawing.Size(140, 33);
......@@ -1223,7 +1211,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, 333);
this.btnInOutP1.Location = new System.Drawing.Point(251, 194);
this.btnInOutP1.Name = "btnInOutP1";
this.btnInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP1.Size = new System.Drawing.Size(140, 33);
......@@ -1242,7 +1230,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, 293);
this.btnMiddleP1.Location = new System.Drawing.Point(10, 189);
this.btnMiddleP1.Name = "btnMiddleP1";
this.btnMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP1.Size = new System.Drawing.Size(140, 33);
......@@ -1261,7 +1249,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, 133);
this.btnUpDownP1.Location = new System.Drawing.Point(10, 109);
this.btnUpDownP1.Name = "btnUpDownP1";
this.btnUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP1.Size = new System.Drawing.Size(140, 33);
......@@ -1280,7 +1268,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, 173);
this.btnUpDownP2.Location = new System.Drawing.Point(10, 149);
this.btnUpDownP2.Name = "btnUpDownP2";
this.btnUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP2.Size = new System.Drawing.Size(140, 33);
......@@ -1298,7 +1286,7 @@
this.btnComP3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 413);
this.btnComP3.Location = new System.Drawing.Point(492, 229);
this.btnComP3.Name = "btnComP3";
this.btnComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP3.Size = new System.Drawing.Size(140, 33);
......@@ -1316,7 +1304,7 @@
this.btnComP2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 373);
this.btnComP2.Location = new System.Drawing.Point(492, 189);
this.btnComP2.Name = "btnComP2";
this.btnComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP2.Size = new System.Drawing.Size(140, 33);
......@@ -1334,7 +1322,7 @@
this.btnInOutP3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 333);
this.btnInOutP3.Location = new System.Drawing.Point(250, 274);
this.btnInOutP3.Name = "btnInOutP3";
this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP3.Size = new System.Drawing.Size(140, 33);
......@@ -1352,7 +1340,7 @@
this.btnMiddleP2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 293);
this.btnMiddleP2.Location = new System.Drawing.Point(9, 229);
this.btnMiddleP2.Name = "btnMiddleP2";
this.btnMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP2.Size = new System.Drawing.Size(140, 33);
......@@ -1370,7 +1358,7 @@
this.btnUpDownP5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 213);
this.btnUpDownP5.Location = new System.Drawing.Point(492, 109);
this.btnUpDownP5.Name = "btnUpDownP5";
this.btnUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP5.Size = new System.Drawing.Size(140, 33);
......@@ -1388,7 +1376,7 @@
this.btnUpDownP6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 253);
this.btnUpDownP6.Location = new System.Drawing.Point(492, 149);
this.btnUpDownP6.Name = "btnUpDownP6";
this.btnUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP6.Size = new System.Drawing.Size(140, 33);
......@@ -1406,7 +1394,7 @@
this.btnUpDownP3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 133);
this.btnUpDownP3.Location = new System.Drawing.Point(251, 109);
this.btnUpDownP3.Name = "btnUpDownP3";
this.btnUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP3.Size = new System.Drawing.Size(140, 33);
......@@ -1424,7 +1412,7 @@
this.btnUpDownP4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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, 173);
this.btnUpDownP4.Location = new System.Drawing.Point(251, 149);
this.btnUpDownP4.Name = "btnUpDownP4";
this.btnUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP4.Size = new System.Drawing.Size(140, 33);
......@@ -1434,12 +1422,22 @@
this.btnUpDownP4.UseVisualStyleBackColor = false;
this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click);
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupShelf);
this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(565, 482);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 料架位置 ";
this.tabPage3.UseVisualStyleBackColor = true;
//
// FrmBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1364, 713);
this.Controls.Add(this.groupShelf);
this.ClientSize = new System.Drawing.Size(1314, 576);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel1);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox3);
......@@ -1465,6 +1463,7 @@
this.groupBox3.PerformLayout();
this.groupInout.ResumeLayout(false);
this.groupInout.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.ResumeLayout(false);
}
......@@ -1479,7 +1478,6 @@
public System.Windows.Forms.Button btnUpDownP3;
public System.Windows.Forms.TextBox txtUpDownP4;
public System.Windows.Forms.Button btnUpDownP4;
public System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbPosition;
public System.Windows.Forms.Button btnComP1;
public System.Windows.Forms.TextBox txtComP1;
......@@ -1562,6 +1560,7 @@
public System.Windows.Forms.Label label47;
public System.Windows.Forms.TextBox txtComMin;
public System.Windows.Forms.Label label48;
private System.Windows.Forms.TabPage tabPage3;
}
}
......@@ -147,22 +147,7 @@ namespace OnlineStore.ACPackingStore
LoadOk = true;
}
lblTemp.Text = BoxBean.humBean.currTempStr;
lblWarnMsg.Text = BoxBean.WarnMsg;
if (BoxBean.IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
{
lblWarnMsg.Text = lblWarnMsg.Text + " 前门未关";
}
if (BoxBean.IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
{
lblWarnMsg.Text = lblWarnMsg.Text + " 无门禁信号,请检查";
}
if (BoxBean.humBean.TempOrHumidityIsAlarm)
{
lblWarnMsg.Text = lblWarnMsg.Text + " 温湿度报警[" + BoxBean.humBean.TempAlarmTime.ToLongTimeString() + "]";
}
if (lblWarnMsg.Text.Equals(""))
{
}
lblWarnMsg.Text = BoxBean.GetWarnMsg();
//ReadPosistion();
if (BoxBean.storeRunStatus > StoreRunStatus.Wait)
......
......@@ -181,7 +181,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(281, 4);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1045, 69);
this.lblWarnMsg.Size = new System.Drawing.Size(1062, 69);
this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......
......@@ -56,6 +56,8 @@ namespace OnlineStore.ACPackingStore
// LogUtil.logBox = this.logBox;
// HideForm();
LoadOk = true;
this.timer1.Start();
}
......@@ -127,10 +129,8 @@ namespace OnlineStore.ACPackingStore
IOManager.instance.CloseAllDO();
IOManager.instance.CloseAllConnection();
HumitureController.CloseAllPort();
//AIManager.CloseConnect();
ACServerManager.CloseAllPort();
CodeManager.CloseAllCamera();
HumitureController.CloseAllPort();
ACServerManager.CloseAllPort();
//this.Close();
System.Environment.Exit(System.Environment.ExitCode);
}
......@@ -170,7 +170,6 @@ namespace OnlineStore.ACPackingStore
startTimer.Interval = 1;
startTimer.Elapsed += timer_Elapsed;
startTimer.Enabled = true;
this.timer1.Start();
}
private delegate void ShowFormDelegate();
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
......@@ -272,7 +271,16 @@ namespace OnlineStore.ACPackingStore
{
return;
}
string msg = "";
foreach(AC_BOX_Bean box in StoreManager.Store.BoxMap.Values)
{
string s = box.GetWarnMsg();
if (!s.Equals(""))
{
msg += box.Name+":"+s+ "\r" ;
}
}
lblWarnMsg.Text = msg;
}
private void chbAutoRun_CheckedChanged(object sender, EventArgs e)
......
......@@ -137,7 +137,7 @@
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(5, 5);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(539, 279);
this.groupAxis.Size = new System.Drawing.Size(539, 267);
this.groupAxis.TabIndex = 217;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
......@@ -146,7 +146,7 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(51, 144);
this.label7.Location = new System.Drawing.Point(51, 133);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(59, 17);
this.label7.TabIndex = 328;
......@@ -155,7 +155,7 @@
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(112, 141);
this.txtServoStatue.Location = new System.Drawing.Point(112, 130);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
......@@ -163,7 +163,7 @@
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(150, 244);
this.label17.Location = new System.Drawing.Point(150, 233);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(71, 17);
this.label17.TabIndex = 316;
......@@ -173,7 +173,7 @@
// txtLimit2
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(226, 241);
this.txtLimit2.Location = new System.Drawing.Point(226, 230);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
......@@ -181,7 +181,7 @@
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(150, 210);
this.label19.Location = new System.Drawing.Point(150, 199);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(71, 17);
this.label19.TabIndex = 312;
......@@ -191,7 +191,7 @@
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(226, 207);
this.txtLimit1.Location = new System.Drawing.Point(226, 196);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
......@@ -199,7 +199,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(162, 176);
this.label6.Location = new System.Drawing.Point(162, 165);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
......@@ -208,7 +208,7 @@
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(226, 173);
this.txtHomeSingle.Location = new System.Drawing.Point(226, 162);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
......@@ -216,7 +216,7 @@
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(5, 244);
this.label11.Location = new System.Drawing.Point(5, 233);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(105, 17);
this.label11.TabIndex = 292;
......@@ -225,7 +225,7 @@
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(112, 241);
this.txtHomeStatus.Location = new System.Drawing.Point(112, 230);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
......@@ -233,7 +233,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(44, 210);
this.label10.Location = new System.Drawing.Point(44, 199);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
......@@ -242,7 +242,7 @@
// txtBusyStatus
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(112, 207);
this.txtBusyStatus.Location = new System.Drawing.Point(112, 196);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
......@@ -250,7 +250,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(51, 176);
this.label2.Location = new System.Drawing.Point(51, 165);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 17);
this.label2.TabIndex = 286;
......@@ -259,7 +259,7 @@
// txtAlarmStatus
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 173);
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 162);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
......@@ -268,7 +268,7 @@
//
this.btnGetAlarm.BackColor = System.Drawing.SystemColors.Control;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(301, 190);
this.btnGetAlarm.Location = new System.Drawing.Point(301, 174);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(105, 33);
this.btnGetAlarm.TabIndex = 284;
......@@ -283,7 +283,7 @@
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(416, 229);
this.btnReadPosition.Location = new System.Drawing.Point(416, 213);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(105, 33);
......@@ -296,7 +296,7 @@
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(143, 143);
this.label8.Location = new System.Drawing.Point(143, 132);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(59, 17);
this.label8.TabIndex = 255;
......@@ -309,7 +309,7 @@
this.btnOpenAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnOpenAxis.Location = new System.Drawing.Point(297, 25);
this.btnOpenAxis.Location = new System.Drawing.Point(297, 17);
this.btnOpenAxis.Name = "btnOpenAxis";
this.btnOpenAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnOpenAxis.Size = new System.Drawing.Size(105, 33);
......@@ -325,7 +325,7 @@
this.btnCloseAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnCloseAxis.Location = new System.Drawing.Point(416, 25);
this.btnCloseAxis.Location = new System.Drawing.Point(416, 17);
this.btnCloseAxis.Name = "btnCloseAxis";
this.btnCloseAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnCloseAxis.Size = new System.Drawing.Size(105, 33);
......@@ -336,7 +336,7 @@
//
// txtP
//
this.txtP.Location = new System.Drawing.Point(207, 141);
this.txtP.Location = new System.Drawing.Point(207, 130);
this.txtP.Name = "txtP";
this.txtP.ReadOnly = true;
this.txtP.Size = new System.Drawing.Size(87, 23);
......@@ -349,7 +349,7 @@
this.txtASpeed.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtASpeed.Location = new System.Drawing.Point(189, 102);
this.txtASpeed.Location = new System.Drawing.Point(189, 91);
this.txtASpeed.MaxLength = 12;
this.txtASpeed.Name = "txtASpeed";
this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -363,7 +363,7 @@
this.label47.Cursor = System.Windows.Forms.Cursors.Default;
this.label47.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label47.ForeColor = System.Drawing.SystemColors.ControlText;
this.label47.Location = new System.Drawing.Point(152, 103);
this.label47.Location = new System.Drawing.Point(152, 92);
this.label47.Name = "label47";
this.label47.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label47.Size = new System.Drawing.Size(35, 17);
......@@ -378,7 +378,7 @@
this.btnAxisVMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisVMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisVMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisVMove.Location = new System.Drawing.Point(297, 106);
this.btnAxisVMove.Location = new System.Drawing.Point(297, 95);
this.btnAxisVMove.Name = "btnAxisVMove";
this.btnAxisVMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisVMove.Size = new System.Drawing.Size(105, 33);
......@@ -394,7 +394,7 @@
this.btnAxisRMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisRMove.Location = new System.Drawing.Point(416, 67);
this.btnAxisRMove.Location = new System.Drawing.Point(416, 56);
this.btnAxisRMove.Name = "btnAxisRMove";
this.btnAxisRMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisRMove.Size = new System.Drawing.Size(105, 33);
......@@ -410,7 +410,7 @@
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(416, 190);
this.btnAxisReturnHome.Location = new System.Drawing.Point(416, 174);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(105, 33);
......@@ -426,7 +426,7 @@
this.btnAxisAMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisAMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisAMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisAMove.Location = new System.Drawing.Point(297, 67);
this.btnAxisAMove.Location = new System.Drawing.Point(297, 56);
this.btnAxisAMove.Name = "btnAxisAMove";
this.btnAxisAMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisAMove.Size = new System.Drawing.Size(105, 33);
......@@ -439,7 +439,7 @@
//
this.btnComAlarmClear.BackColor = System.Drawing.SystemColors.Control;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(301, 229);
this.btnComAlarmClear.Location = new System.Drawing.Point(301, 213);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(105, 33);
this.btnComAlarmClear.TabIndex = 50;
......@@ -453,7 +453,7 @@
this.txtAPosition.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtAPosition.Location = new System.Drawing.Point(189, 68);
this.txtAPosition.Location = new System.Drawing.Point(189, 57);
this.txtAPosition.MaxLength = 12;
this.txtAPosition.Name = "txtAPosition";
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -467,7 +467,7 @@
this.label48.Cursor = System.Windows.Forms.Cursors.Default;
this.label48.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label48.ForeColor = System.Drawing.SystemColors.ControlText;
this.label48.Location = new System.Drawing.Point(152, 69);
this.label48.Location = new System.Drawing.Point(152, 58);
this.label48.Name = "label48";
this.label48.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label48.Size = new System.Drawing.Size(35, 17);
......@@ -482,7 +482,7 @@
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(416, 106);
this.btnAxisStop.Location = new System.Drawing.Point(416, 95);
this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(105, 71);
......@@ -494,7 +494,7 @@
// txtAxisValue
//
this.txtAxisValue.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisValue.Location = new System.Drawing.Point(88, 100);
this.txtAxisValue.Location = new System.Drawing.Point(88, 89);
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
......@@ -505,7 +505,7 @@
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(88, 66);
this.txtAxisDeviceName.Location = new System.Drawing.Point(88, 55);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
......@@ -518,7 +518,7 @@
this.label45.AutoSize = true;
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(31, 71);
this.label45.Location = new System.Drawing.Point(31, 60);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(47, 17);
this.label45.TabIndex = 240;
......@@ -530,7 +530,7 @@
this.label46.AutoSize = true;
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(43, 105);
this.label46.Location = new System.Drawing.Point(43, 94);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(35, 17);
this.label46.TabIndex = 239;
......@@ -543,7 +543,7 @@
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.ItemHeight = 20;
this.comboBox1.Location = new System.Drawing.Point(88, 26);
this.comboBox1.Location = new System.Drawing.Point(88, 18);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(187, 28);
this.comboBox1.TabIndex = 234;
......@@ -554,7 +554,7 @@
this.label49.AutoSize = true;
this.label49.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label49.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label49.Location = new System.Drawing.Point(27, 33);
this.label49.Location = new System.Drawing.Point(27, 25);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(51, 17);
this.label49.TabIndex = 233;
......@@ -590,7 +590,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(5, 286);
this.groupBox1.Location = new System.Drawing.Point(5, 274);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(539, 175);
this.groupBox1.TabIndex = 218;
......@@ -819,7 +819,7 @@
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(552, 467);
this.Size = new System.Drawing.Size(552, 450);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox1.ResumeLayout(false);
......
......@@ -99,5 +99,6 @@ namespace OnlineStore.Common
public static string Tool_TargetPosition = "Tool_TargetPosition";
public static string AgvServerIp = "AgvServerIp";
public static string CodeCount = "CodeCount";
}
}
......@@ -188,6 +188,25 @@ namespace OnlineStore.DeviceLibrary
}
}
public string GetWarnMsg()
{
string msg= WarnMsg;
//if (IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
//{
// msg = msg + " 前门未关";
//}
if (IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
{
msg = msg + " 无门禁信号";
}
if (humBean.TempOrHumidityIsAlarm)
{
msg = msg + " 温湿度报警[" + humBean.TempAlarmTime.ToLongTimeString() + "]";
}
return msg;
}
#region 原点返回和复位处理
private void ReturnHome()
......
......@@ -129,6 +129,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
,,,,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,CameraName,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,#,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.101,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
......@@ -128,7 +128,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
,,,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,CameraName,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,#,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
......@@ -7,16 +7,14 @@ using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class CodeManager
{
// public static List<string> cameraNameList = new List<string>();
{
public static List<string> codeTypeList = new List<string>();
public static List<string> balserNameList = new List<string>();
public static List<string> hikNameList = new List<string>();
......@@ -26,23 +24,11 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public static void LoadConfig()
{
// string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
// cameraNameList = new List<string>();
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
{
//string[] nameArray = nameStr.Split(spiltChar);
//foreach (string str in nameArray)
//{
// if (str.Trim().Equals(""))
// {
// continue;
// }
// //LogUtil.info("加载到配置摄像机名称:" + str.Trim());
// cameraNameList.Add(str.Trim());
//}
string[] codeArray = codeStr.Split(spiltChar);
foreach (string str in codeArray)
{
......@@ -56,7 +42,6 @@ namespace OnlineStore.DeviceLibrary
LoadCamera(false);
CodeLibrary.HDCodeLearnHelper.LoadConfig("", codeStr);
}
catch (Exception ex)
{
......@@ -69,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
CodeLibrary.HIKCamera.Instance.Load();
CodeLibrary.HIKCManager.Load();
}
catch (Exception ex)
{
......@@ -77,14 +62,14 @@ namespace OnlineStore.DeviceLibrary
}
try
{
CodeLibrary.BaslerCamera.Instance.Load();
CodeLibrary.BaslerCManager.Load();
}
catch (Exception ex)
{
LogUtil.error("加载Basler相机出错:" + ex.ToString());
}
}
string[] names = CodeLibrary.HIKCamera.Instance.CameraName;
string[] names = CodeLibrary.HIKCManager.CameraName;
if (names != null)
......@@ -95,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("加载到HIK相机:" + name);
}
}
names = CodeLibrary.BaslerCamera.Instance.CameraName;
names = CodeLibrary.BaslerCManager.CameraName;
if (names != null)
{
balserNameList.AddRange(names);
......@@ -105,10 +90,29 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public static void CloseCamera()
public static void CloseCamera(string name)
{
BaslerCamera.Instance.Close();
HIKCamera.Instance.Close();
try
{
//BaslerCamera.Instance.Close();
//HIKCamera.Instance.Close();
if (HIKCManager.CameraName.Contains(name))
{
HIKCManager.Close(name);
}
else
{
BaslerCManager.Close(name);
}
}catch(Exception ex)
{
LogUtil.error("CloseCamera[" + name + "]出错:" + ex.ToString());
}
}
public static void CloseAllCamera()
{
HIKCManager.CloseAll();
BaslerCManager.CloseAll();
}
public static Bitmap GetCamerImage(string cameraName)
......@@ -118,13 +122,15 @@ namespace OnlineStore.DeviceLibrary
{
if (balserNameList.Contains(cameraName))
{
bool result = BaslerCamera.Instance.Open(cameraName);
bool result = true;
if (!BaslerCManager.IsOpen(cameraName))
{
result = BaslerCManager.Open(cameraName);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
bitm = BaslerCManager.GrabOne(cameraName);
}
else
{
......@@ -133,13 +139,16 @@ namespace OnlineStore.DeviceLibrary
}
else if (hikNameList.Contains(cameraName))
{
bool result = HIKCamera.Instance.Open(cameraName);
bool result = true;
if (!HIKCManager.IsOpen(cameraName))
{
result = HIKCManager.Open(cameraName);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
bitm = HIKCManager.GrabOne(cameraName);
}
else
{
......@@ -165,54 +174,55 @@ namespace OnlineStore.DeviceLibrary
}
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraNameList = null)
public static List<string> CameraScan(List<string> cameraNameList)
{
List<string> codeList = new List<string>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if (cameraNameList == null)
{
return codeList;
}
try
{
List<Task<List<CodeInfo>>> taskList = new List<Task<List<CodeInfo>>>();
foreach (string cameraName in cameraNameList)
{
using (Bitmap bitmap = GetCamerImage(cameraName))
Task.Factory.StartNew(delegate ()
{
if (bitmap == null)
{
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera();
continue;
}
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
using (Bitmap bitmap = GetCamerImage(cameraName))
{
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
if (bitmap == null)
{
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera(cameraName);
return;
}
if (cc.Count > 0)
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
{
string r = "";
foreach (CodeInfo c in cc)
Task<List<CodeInfo>> typeDeCode = Task.Factory.StartNew(delegate ()
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:"+r);
return DeCode(ho_Image, codeType);
});
taskList.Add(typeDeCode);
}
}
}
});
}
Task.WaitAll(taskList.ToArray());
foreach (Task<List<CodeInfo>> t in taskList)
{
List<CodeInfo> cc = t.Result;
if (cc.Count > 0)
{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
}
}
}
......@@ -224,10 +234,34 @@ namespace OnlineStore.DeviceLibrary
catch (Exception ex)
{
LogUtil.error("扫码出错:" + ex.ToString());
}
}
return codeList;
}
private static List<CodeInfo> DeCode(HalconDotNet.HObject ho_Image, string codeType)
{
List<CodeInfo> cc = new List<CodeInfo>();
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
}
//if (cc.Count > 0)
//{
// string r = "";
// foreach (CodeInfo c in cc)
// {
// codeList.Add(c.CodeStr);
// r = r + "##" + c.CodeStr;
// }
// LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
return cc;
}
public static string GetCodeParamFilePath(string codePath)
{
......
......@@ -7,15 +7,14 @@ using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class CodeManager
{
public class CodeManager
{
public static List<string> codeTypeList = new List<string>();
public static List<string> balserNameList = new List<string>();
public static List<string> hikNameList = new List<string>();
......@@ -56,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
CodeLibrary.HIKCManager.Load();
CodeLibrary.HIKCamera.Instance.Load();
}
catch (Exception ex)
{
......@@ -64,14 +63,14 @@ namespace OnlineStore.DeviceLibrary
}
try
{
CodeLibrary.BaslerCManager.Load();
CodeLibrary.BaslerCamera.Instance.Load();
}
catch (Exception ex)
{
LogUtil.error("加载Basler相机出错:" + ex.ToString());
}
}
string[] names = CodeLibrary.HIKCManager.CameraName;
string[] names = CodeLibrary.HIKCamera.Instance.CameraName;
if (names != null)
......@@ -82,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("加载到HIK相机:" + name);
}
}
names = CodeLibrary.BaslerCManager.CameraName;
names = CodeLibrary.BaslerCamera.Instance.CameraName;
if (names != null)
{
balserNameList.AddRange(names);
......@@ -92,29 +91,10 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public static void CloseCamera(string name)
{
try
{
//BaslerCamera.Instance.Close();
//HIKCamera.Instance.Close();
if (HIKCManager.CameraName.Contains(name))
{
HIKCManager.Close(name);
}
else
{
BaslerCManager.Close(name);
}
}catch(Exception ex)
{
LogUtil.error("CloseCamera[" + name + "]出错:" + ex.ToString());
}
}
public static void CloseAllCamera()
public static void CloseCamera()
{
HIKCManager.CloseAll();
BaslerCManager.CloseAll();
BaslerCamera.Instance.Close();
HIKCamera.Instance.Close();
}
public static Bitmap GetCamerImage(string cameraName)
......@@ -124,15 +104,13 @@ namespace OnlineStore.DeviceLibrary
{
if (balserNameList.Contains(cameraName))
{
bool result = true;
if (!BaslerCManager.IsOpen(cameraName))
{
result = BaslerCManager.Open(cameraName);
}
bool result = BaslerCamera.Instance.Open(cameraName);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
bitm = BaslerCManager.GrabOne(cameraName);
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
}
else
{
......@@ -141,16 +119,13 @@ namespace OnlineStore.DeviceLibrary
}
else if (hikNameList.Contains(cameraName))
{
bool result = true;
if (!HIKCManager.IsOpen(cameraName))
{
result = HIKCManager.Open(cameraName);
}
bool result = HIKCamera.Instance.Open(cameraName);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
bitm = HIKCManager.GrabOne(cameraName);
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
}
else
{
......@@ -174,57 +149,66 @@ namespace OnlineStore.DeviceLibrary
}
return bitm;
}
private static int codeCount = ConfigAppSettings.GetIntValue(Setting_Init.CodeCount);
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraNameList)
public static List<string> CameraScan(List<string> cameraList = null)
{
if (codeCount < 1)
{
codeCount = 1;
}
List<string> codeList = new List<string>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if (cameraList == null || cameraList.Count <= 0)
{
return codeList;
}
try
{
List<Task<List<CodeInfo>>> taskList = new List<Task<List<CodeInfo>>>();
foreach (string cameraName in cameraNameList)
foreach (string cameraName in cameraList)
{
Task.Factory.StartNew(delegate ()
if (cameraName.Trim().Equals(""))
{
continue;
}
using (Bitmap bitmap = GetCamerImage(cameraName))
{
using (Bitmap bitmap = GetCamerImage(cameraName))
if (bitmap == null)
{
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera();
continue;
}
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
{
if (bitmap == null)
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera(cameraName);
return;
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
else
{
Task<List<CodeInfo>> typeDeCode = Task.Factory.StartNew(delegate ()
{
return DeCode(ho_Image, codeType);
});
taskList.Add(typeDeCode);
cc = HDCodeHelper.DecodeCode(ho_Image, codeCount, GetCodeParamFilePath(codeType), codeType);
}
}
});
}
Task.WaitAll(taskList.ToArray());
foreach (Task<List<CodeInfo>> t in taskList)
{
List<CodeInfo> cc = t.Result;
if (cc.Count > 0)
{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
//if (cc.Count > 0)
//{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
LogUtil.info(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
}
bitmap.Dispose();
}
}
}
......@@ -240,30 +224,6 @@ namespace OnlineStore.DeviceLibrary
return codeList;
}
private static List<CodeInfo> DeCode(HalconDotNet.HObject ho_Image, string codeType)
{
List<CodeInfo> cc = new List<CodeInfo>();
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
}
//if (cc.Count > 0)
//{
// string r = "";
// foreach (CodeInfo c in cc)
// {
// codeList.Add(c.CodeStr);
// r = r + "##" + c.CodeStr;
// }
// LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
return cc;
}
public static string GetCodeParamFilePath(string codePath)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!