Commit 43eeaace 几米阳光

增加调试屏蔽功能

1 个父辈 d404a67a
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStoreBox)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStoreBox));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupAxis = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.btnReadHomeSingle = new System.Windows.Forms.Button(); this.btnReadHomeSingle = new System.Windows.Forms.Button();
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label43 = new System.Windows.Forms.Label(); this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label(); this.label42 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupInout = new System.Windows.Forms.GroupBox();
this.lblTemp = new System.Windows.Forms.Label(); this.lblTemp = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label(); this.lblMsg = new System.Windows.Forms.Label();
this.btnSavePosition = new System.Windows.Forms.Button(); this.btnSavePosition = new System.Windows.Forms.Button();
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupComAxis = new System.Windows.Forms.GroupBox();
this.label20 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label();
this.txtComAPosition = new System.Windows.Forms.TextBox(); this.txtComAPosition = new System.Windows.Forms.TextBox();
this.lblShuoKeMsg = new System.Windows.Forms.Label(); this.lblShuoKeMsg = new System.Windows.Forms.Label();
...@@ -234,13 +234,14 @@ ...@@ -234,13 +234,14 @@
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.btnClearL = new System.Windows.Forms.Button(); this.btnClearL = new System.Windows.Forms.Button();
this.btnLogDebug = new System.Windows.Forms.Button(); this.btnLogDebug = new System.Windows.Forms.Button();
this.groupBox5.SuspendLayout(); this.btnDebug = new System.Windows.Forms.Button();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupInout.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupComAxis.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
...@@ -267,59 +268,60 @@ ...@@ -267,59 +268,60 @@
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// groupBox5 // groupAxis
// //
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.label6); this.groupAxis.Controls.Add(this.label6);
this.groupBox5.Controls.Add(this.label5); this.groupAxis.Controls.Add(this.label5);
this.groupBox5.Controls.Add(this.btnReadHomeSingle); this.groupAxis.Controls.Add(this.btnReadHomeSingle);
this.groupBox5.Controls.Add(this.txtHomeSingle); this.groupAxis.Controls.Add(this.txtHomeSingle);
this.groupBox5.Controls.Add(this.chbAutoRead); this.groupAxis.Controls.Add(this.chbAutoRead);
this.groupBox5.Controls.Add(this.label16); this.groupAxis.Controls.Add(this.label16);
this.groupBox5.Controls.Add(this.label15); this.groupAxis.Controls.Add(this.label15);
this.groupBox5.Controls.Add(this.label14); this.groupAxis.Controls.Add(this.label14);
this.groupBox5.Controls.Add(this.label11); this.groupAxis.Controls.Add(this.label11);
this.groupBox5.Controls.Add(this.txtHomeStatus); this.groupAxis.Controls.Add(this.txtHomeStatus);
this.groupBox5.Controls.Add(this.button2); this.groupAxis.Controls.Add(this.button2);
this.groupBox5.Controls.Add(this.label10); this.groupAxis.Controls.Add(this.label10);
this.groupBox5.Controls.Add(this.txtBusyStatus); this.groupAxis.Controls.Add(this.txtBusyStatus);
this.groupBox5.Controls.Add(this.button1); this.groupAxis.Controls.Add(this.button1);
this.groupBox5.Controls.Add(this.label2); this.groupAxis.Controls.Add(this.label2);
this.groupBox5.Controls.Add(this.txtAlarmStatus); this.groupAxis.Controls.Add(this.txtAlarmStatus);
this.groupBox5.Controls.Add(this.btnGetAlarm); this.groupAxis.Controls.Add(this.btnGetAlarm);
this.groupBox5.Controls.Add(this.btnReadPosition); this.groupAxis.Controls.Add(this.btnReadPosition);
this.groupBox5.Controls.Add(this.lblServerOn); this.groupAxis.Controls.Add(this.lblServerOn);
this.groupBox5.Controls.Add(this.label7); this.groupAxis.Controls.Add(this.label7);
this.groupBox5.Controls.Add(this.label8); this.groupAxis.Controls.Add(this.label8);
this.groupBox5.Controls.Add(this.btnOpenAxis); this.groupAxis.Controls.Add(this.btnOpenAxis);
this.groupBox5.Controls.Add(this.btnCloseAxis); this.groupAxis.Controls.Add(this.btnCloseAxis);
this.groupBox5.Controls.Add(this.lblCountPulse); this.groupAxis.Controls.Add(this.lblCountPulse);
this.groupBox5.Controls.Add(this.txtASpeed); this.groupAxis.Controls.Add(this.txtASpeed);
this.groupBox5.Controls.Add(this.lblOutPulse); this.groupAxis.Controls.Add(this.lblOutPulse);
this.groupBox5.Controls.Add(this.label47); this.groupAxis.Controls.Add(this.label47);
this.groupBox5.Controls.Add(this.btnAxisVMove); this.groupAxis.Controls.Add(this.btnAxisVMove);
this.groupBox5.Controls.Add(this.btnAxisRMove); this.groupAxis.Controls.Add(this.btnAxisRMove);
this.groupBox5.Controls.Add(this.btnAxisReturnHome); this.groupAxis.Controls.Add(this.btnAxisReturnHome);
this.groupBox5.Controls.Add(this.btnAxisAMove); this.groupAxis.Controls.Add(this.btnAxisAMove);
this.groupBox5.Controls.Add(this.Bt_ClearCounter); this.groupAxis.Controls.Add(this.Bt_ClearCounter);
this.groupBox5.Controls.Add(this.btnComAlarmClear); this.groupAxis.Controls.Add(this.btnComAlarmClear);
this.groupBox5.Controls.Add(this.txtAPosition); this.groupAxis.Controls.Add(this.txtAPosition);
this.groupBox5.Controls.Add(this.label48); this.groupAxis.Controls.Add(this.label48);
this.groupBox5.Controls.Add(this.btnAxisStop); this.groupAxis.Controls.Add(this.btnAxisStop);
this.groupBox5.Controls.Add(this.txtAxisValue); this.groupAxis.Controls.Add(this.txtAxisValue);
this.groupBox5.Controls.Add(this.txtAxisDeviceName); this.groupAxis.Controls.Add(this.txtAxisDeviceName);
this.groupBox5.Controls.Add(this.label45); this.groupAxis.Controls.Add(this.label45);
this.groupBox5.Controls.Add(this.label46); this.groupAxis.Controls.Add(this.label46);
this.groupBox5.Controls.Add(this.cmbAxisList); this.groupAxis.Controls.Add(this.cmbAxisList);
this.groupBox5.Controls.Add(this.label49); this.groupAxis.Controls.Add(this.label49);
this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupAxis.Enabled = false;
this.groupBox5.Location = new System.Drawing.Point(6, 6); this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox5.Name = "groupBox5"; this.groupAxis.Location = new System.Drawing.Point(6, 6);
this.groupBox5.Size = new System.Drawing.Size(543, 351); this.groupAxis.Name = "groupAxis";
this.groupBox5.TabIndex = 216; this.groupAxis.Size = new System.Drawing.Size(543, 351);
this.groupBox5.TabStop = false; this.groupAxis.TabIndex = 216;
this.groupBox5.Text = "伺服运动"; this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
// //
// label6 // label6
// //
...@@ -1010,56 +1012,57 @@ ...@@ -1010,56 +1012,57 @@
this.label42.TabIndex = 24; this.label42.TabIndex = 24;
this.label42.Text = "编码器计数:"; this.label42.Text = "编码器计数:";
// //
// groupBox2 // groupInout
// //
this.groupBox2.Controls.Add(this.lblTemp); this.groupInout.Controls.Add(this.lblTemp);
this.groupBox2.Controls.Add(this.lblMsg); this.groupInout.Controls.Add(this.lblMsg);
this.groupBox2.Controls.Add(this.btnSavePosition); this.groupInout.Controls.Add(this.btnSavePosition);
this.groupBox2.Controls.Add(this.btnStartAuTo); this.groupInout.Controls.Add(this.btnStartAuTo);
this.groupBox2.Controls.Add(this.label9); this.groupInout.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.txtJiange); this.groupInout.Controls.Add(this.txtJiange);
this.groupBox2.Controls.Add(this.txtComP1); this.groupInout.Controls.Add(this.txtComP1);
this.groupBox2.Controls.Add(this.txtInOutP2); this.groupInout.Controls.Add(this.txtInOutP2);
this.groupBox2.Controls.Add(this.txtInOutP1); this.groupInout.Controls.Add(this.txtInOutP1);
this.groupBox2.Controls.Add(this.txtMiddleP1); this.groupInout.Controls.Add(this.txtMiddleP1);
this.groupBox2.Controls.Add(this.txtUpDownP7); this.groupInout.Controls.Add(this.txtUpDownP7);
this.groupBox2.Controls.Add(this.txtUpDownP8); this.groupInout.Controls.Add(this.txtUpDownP8);
this.groupBox2.Controls.Add(this.txtUpDownP1); this.groupInout.Controls.Add(this.txtUpDownP1);
this.groupBox2.Controls.Add(this.txtUpDownP2); this.groupInout.Controls.Add(this.txtUpDownP2);
this.groupBox2.Controls.Add(this.txtComP3); this.groupInout.Controls.Add(this.txtComP3);
this.groupBox2.Controls.Add(this.txtComP2); this.groupInout.Controls.Add(this.txtComP2);
this.groupBox2.Controls.Add(this.txtInOutP3); this.groupInout.Controls.Add(this.txtInOutP3);
this.groupBox2.Controls.Add(this.txtMiddleP2); this.groupInout.Controls.Add(this.txtMiddleP2);
this.groupBox2.Controls.Add(this.txtUpDownP5); this.groupInout.Controls.Add(this.txtUpDownP5);
this.groupBox2.Controls.Add(this.txtUpDownP6); this.groupInout.Controls.Add(this.txtUpDownP6);
this.groupBox2.Controls.Add(this.cmbPosition); this.groupInout.Controls.Add(this.cmbPosition);
this.groupBox2.Controls.Add(this.label21); this.groupInout.Controls.Add(this.label21);
this.groupBox2.Controls.Add(this.txtUpDownP3); this.groupInout.Controls.Add(this.txtUpDownP3);
this.groupBox2.Controls.Add(this.btnInStore); this.groupInout.Controls.Add(this.btnInStore);
this.groupBox2.Controls.Add(this.btnOutStore); this.groupInout.Controls.Add(this.btnOutStore);
this.groupBox2.Controls.Add(this.txtUpDownP4); this.groupInout.Controls.Add(this.txtUpDownP4);
this.groupBox2.Controls.Add(this.btnComP1); this.groupInout.Controls.Add(this.btnComP1);
this.groupBox2.Controls.Add(this.btnInOutP2); this.groupInout.Controls.Add(this.btnInOutP2);
this.groupBox2.Controls.Add(this.btnInOutP1); this.groupInout.Controls.Add(this.btnInOutP1);
this.groupBox2.Controls.Add(this.btnMiddleP1); this.groupInout.Controls.Add(this.btnMiddleP1);
this.groupBox2.Controls.Add(this.btnUpDownP7); this.groupInout.Controls.Add(this.btnUpDownP7);
this.groupBox2.Controls.Add(this.btnUpDownP8); this.groupInout.Controls.Add(this.btnUpDownP8);
this.groupBox2.Controls.Add(this.btnUpDownP1); this.groupInout.Controls.Add(this.btnUpDownP1);
this.groupBox2.Controls.Add(this.btnUpDownP2); this.groupInout.Controls.Add(this.btnUpDownP2);
this.groupBox2.Controls.Add(this.btnComP3); this.groupInout.Controls.Add(this.btnComP3);
this.groupBox2.Controls.Add(this.btnComP2); this.groupInout.Controls.Add(this.btnComP2);
this.groupBox2.Controls.Add(this.btnInOutP3); this.groupInout.Controls.Add(this.btnInOutP3);
this.groupBox2.Controls.Add(this.btnMiddleP2); this.groupInout.Controls.Add(this.btnMiddleP2);
this.groupBox2.Controls.Add(this.btnUpDownP5); this.groupInout.Controls.Add(this.btnUpDownP5);
this.groupBox2.Controls.Add(this.btnUpDownP6); this.groupInout.Controls.Add(this.btnUpDownP6);
this.groupBox2.Controls.Add(this.btnUpDownP3); this.groupInout.Controls.Add(this.btnUpDownP3);
this.groupBox2.Controls.Add(this.btnUpDownP4); this.groupInout.Controls.Add(this.btnUpDownP4);
this.groupBox2.Location = new System.Drawing.Point(7, 236); this.groupInout.Enabled = false;
this.groupBox2.Name = "groupBox2"; this.groupInout.Location = new System.Drawing.Point(7, 236);
this.groupBox2.Size = new System.Drawing.Size(496, 502); this.groupInout.Name = "groupInout";
this.groupBox2.TabIndex = 100; this.groupInout.Size = new System.Drawing.Size(496, 502);
this.groupBox2.TabStop = false; this.groupInout.TabIndex = 100;
this.groupBox2.Text = "料仓操作"; this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作";
// //
// lblTemp // lblTemp
// //
...@@ -2014,40 +2017,41 @@ ...@@ -2014,40 +2017,41 @@
this.notifyIcon1.Text = "料仓客户端"; this.notifyIcon1.Text = "料仓客户端";
this.notifyIcon1.Visible = true; this.notifyIcon1.Visible = true;
// //
// groupBox4 // groupComAxis
// //
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupComAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox4.Controls.Add(this.label20); this.groupComAxis.Controls.Add(this.label20);
this.groupBox4.Controls.Add(this.txtComAPosition); this.groupComAxis.Controls.Add(this.txtComAPosition);
this.groupBox4.Controls.Add(this.lblShuoKeMsg); this.groupComAxis.Controls.Add(this.lblShuoKeMsg);
this.groupBox4.Controls.Add(this.btnRelMove); this.groupComAxis.Controls.Add(this.btnRelMove);
this.groupBox4.Controls.Add(this.txtAddr); this.groupComAxis.Controls.Add(this.txtAddr);
this.groupBox4.Controls.Add(this.label18); this.groupComAxis.Controls.Add(this.label18);
this.groupBox4.Controls.Add(this.btnGetPosition); this.groupComAxis.Controls.Add(this.btnGetPosition);
this.groupBox4.Controls.Add(this.cmbHomeType); this.groupComAxis.Controls.Add(this.cmbHomeType);
this.groupBox4.Controls.Add(this.label13); this.groupComAxis.Controls.Add(this.label13);
this.groupBox4.Controls.Add(this.label17); this.groupComAxis.Controls.Add(this.label17);
this.groupBox4.Controls.Add(this.txtSpeed); this.groupComAxis.Controls.Add(this.txtSpeed);
this.groupBox4.Controls.Add(this.btnVolMove); this.groupComAxis.Controls.Add(this.btnVolMove);
this.groupBox4.Controls.Add(this.btnClose); this.groupComAxis.Controls.Add(this.btnClose);
this.groupBox4.Controls.Add(this.btnOpen); this.groupComAxis.Controls.Add(this.btnOpen);
this.groupBox4.Controls.Add(this.btnStatusSearch); this.groupComAxis.Controls.Add(this.btnStatusSearch);
this.groupBox4.Controls.Add(this.label19); this.groupComAxis.Controls.Add(this.label19);
this.groupBox4.Controls.Add(this.txtLinePosition); this.groupComAxis.Controls.Add(this.txtLinePosition);
this.groupBox4.Controls.Add(this.btnHomeMove); this.groupComAxis.Controls.Add(this.btnHomeMove);
this.groupBox4.Controls.Add(this.btnClearPosition); this.groupComAxis.Controls.Add(this.btnClearPosition);
this.groupBox4.Controls.Add(this.btnStop); this.groupComAxis.Controls.Add(this.btnStop);
this.groupBox4.Controls.Add(this.btnLineAbsMove); this.groupComAxis.Controls.Add(this.btnLineAbsMove);
this.groupBox4.Controls.Add(this.label25); this.groupComAxis.Controls.Add(this.label25);
this.groupBox4.Controls.Add(this.comboBoxPortName); this.groupComAxis.Controls.Add(this.comboBoxPortName);
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupComAxis.Enabled = false;
this.groupBox4.Location = new System.Drawing.Point(7, 8); this.groupComAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Name = "groupBox4"; this.groupComAxis.Location = new System.Drawing.Point(7, 8);
this.groupBox4.Size = new System.Drawing.Size(544, 285); this.groupComAxis.Name = "groupComAxis";
this.groupBox4.TabIndex = 271; this.groupComAxis.Size = new System.Drawing.Size(544, 285);
this.groupBox4.TabStop = false; this.groupComAxis.TabIndex = 271;
this.groupBox4.Text = "压紧轴"; this.groupComAxis.TabStop = false;
this.groupComAxis.Text = "压紧轴";
// //
// label20 // label20
// //
...@@ -2345,7 +2349,7 @@ ...@@ -2345,7 +2349,7 @@
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.groupBox5); this.tabPage1.Controls.Add(this.groupAxis);
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
...@@ -2358,7 +2362,7 @@ ...@@ -2358,7 +2362,7 @@
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupBox7); this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Controls.Add(this.groupBox4); this.tabPage2.Controls.Add(this.groupComAxis);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
...@@ -2568,6 +2572,7 @@ ...@@ -2568,6 +2572,7 @@
// //
// tabPage5 // tabPage5
// //
this.tabPage5.Controls.Add(this.btnDebug);
this.tabPage5.Controls.Add(this.btnAxisOff); this.tabPage5.Controls.Add(this.btnAxisOff);
this.tabPage5.Controls.Add(this.btnAxisOn); this.tabPage5.Controls.Add(this.btnAxisOn);
this.tabPage5.Controls.Add(this.btnScanCode); this.tabPage5.Controls.Add(this.btnScanCode);
...@@ -2693,6 +2698,17 @@ ...@@ -2693,6 +2698,17 @@
this.btnLogDebug.UseVisualStyleBackColor = true; this.btnLogDebug.UseVisualStyleBackColor = true;
this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click); this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
// //
// btnDebug
//
this.btnDebug.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDebug.Location = new System.Drawing.Point(806, 4);
this.btnDebug.Name = "btnDebug";
this.btnDebug.Size = new System.Drawing.Size(132, 39);
this.btnDebug.TabIndex = 13;
this.btnDebug.Text = "启用调试";
this.btnDebug.UseVisualStyleBackColor = true;
this.btnDebug.Click += new System.EventHandler(this.btnDebug_Click);
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
...@@ -2701,7 +2717,7 @@ ...@@ -2701,7 +2717,7 @@
this.Controls.Add(this.tabControl2); this.Controls.Add(this.tabControl2);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupInout);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
...@@ -2713,19 +2729,19 @@ ...@@ -2713,19 +2729,19 @@
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmStoreBox_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmStoreBox_FormClosed);
this.Load += new System.EventHandler(this.FrmTest_Load); this.Load += new System.EventHandler(this.FrmTest_Load);
this.Shown += new System.EventHandler(this.FrmStoreBox_Shown); this.Shown += new System.EventHandler(this.FrmStoreBox_Shown);
this.groupBox5.ResumeLayout(false); this.groupAxis.ResumeLayout(false);
this.groupBox5.PerformLayout(); this.groupAxis.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupInout.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupInout.PerformLayout();
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout(); this.groupBox3.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.groupBox4.ResumeLayout(false); this.groupComAxis.ResumeLayout(false);
this.groupBox4.PerformLayout(); this.groupComAxis.PerformLayout();
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
...@@ -2745,7 +2761,7 @@ ...@@ -2745,7 +2761,7 @@
#endregion #endregion
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupInout;
private System.Windows.Forms.Button btnOutStore; private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.Button btnInStore; private System.Windows.Forms.Button btnInStore;
public System.Windows.Forms.TextBox txtUpDownP3; public System.Windows.Forms.TextBox txtUpDownP3;
...@@ -2760,7 +2776,7 @@ ...@@ -2760,7 +2776,7 @@
private System.Windows.Forms.TextBox lblOutPulse; private System.Windows.Forms.TextBox lblOutPulse;
private System.Windows.Forms.TextBox lblCountPulse; private System.Windows.Forms.TextBox lblCountPulse;
private System.Windows.Forms.Button btnComAlarmClear; private System.Windows.Forms.Button btnComAlarmClear;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupAxis;
public System.Windows.Forms.Button btnComP1; public System.Windows.Forms.Button btnComP1;
public System.Windows.Forms.TextBox txtComP1; public System.Windows.Forms.TextBox txtComP1;
public System.Windows.Forms.Button btnInOutP2; public System.Windows.Forms.Button btnInOutP2;
...@@ -2894,7 +2910,7 @@ ...@@ -2894,7 +2910,7 @@
private System.Windows.Forms.TextBox txtHomeSingle; private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupComAxis;
private System.Windows.Forms.Button btnRelMove; private System.Windows.Forms.Button btnRelMove;
private System.Windows.Forms.TextBox txtAddr; private System.Windows.Forms.TextBox txtAddr;
private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label18;
...@@ -2954,6 +2970,7 @@ ...@@ -2954,6 +2970,7 @@
private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button btnClearL; private System.Windows.Forms.Button btnClearL;
private System.Windows.Forms.Button btnStoreStart; private System.Windows.Forms.Button btnStoreStart;
private System.Windows.Forms.Button btnDebug;
} }
} }
...@@ -1472,5 +1472,30 @@ namespace OnlineStore.ACSingleStore ...@@ -1472,5 +1472,30 @@ namespace OnlineStore.ACSingleStore
store.KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW); store.KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW);
store.KNDIOMove(IO_Type.Door_Down, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
} }
private void DebugStatus(bool status)
{
if (status)
{
btnDebug.Text = "禁用调试";
}
else
{
btnDebug.Text = "启用调试";
}
groupAxis.Enabled = status;
groupComAxis.Enabled = status;
groupInout.Enabled = status;
}
private void btnDebug_Click(object sender, EventArgs e)
{
if (btnDebug.Text.Equals("启用调试"))
{
DebugStatus(true);
}
else
{
DebugStatus(false);
}
}
} }
} }
...@@ -66,7 +66,8 @@ statusBean.addServerData("needInAfterOut",needInAfterOut); ...@@ -66,7 +66,8 @@ statusBean.addServerData("needInAfterOut",needInAfterOut);
为true时,盘点出库后需要接着扫码入库 为true时,盘点出库后需要接着扫码入库
2.Data中增加数据:"inTimeout","alarm" 盘点入库超时报警 2.Data中增加数据:"inTimeout","alarm" 盘点入库超时报警
20190319
增加调试屏蔽的功能。
......
...@@ -31,7 +31,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -31,7 +31,6 @@ namespace OnlineStore.DeviceLibrary
{ {
cameraNameList = new List<string>(); cameraNameList = new List<string>();
codeTypeList = new List<string>(); codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try try
{ {
string[] nameArray = nameStr.Split(spiltChar); string[] nameArray = nameStr.Split(spiltChar);
...@@ -47,30 +46,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,30 +46,40 @@ namespace OnlineStore.DeviceLibrary
codeTypeList.Add(str.Trim()); codeTypeList.Add(str.Trim());
} }
string[] names = CodeLibrary.HIKCamera.Instance.CameraName; LoadCamera();
hikNameList.AddRange(names);
foreach(string str in names) CodeLibrary.HDCodeLearnHelper.LoadConfig(nameStr, codeStr);
}
catch (Exception ex)
{ {
LogUtil.info("加载到HIK相机:" + str.Trim()); LogUtil.error("解析摄像机配置出错:" + ex.ToString());
}
} }
private static void LoadCamera()
{
string[] names = CodeLibrary.HIKCamera.Instance.CameraName;
hikNameList.AddRange(names);
names = CodeLibrary.BaslerCamera.Instance.CameraName; names = CodeLibrary.BaslerCamera.Instance.CameraName;
balserNameList.AddRange(names); balserNameList.AddRange(names);
foreach (string str in names) foreach (string name in hikNameList)
{ {
LogUtil.info("加载到Balser相机:" + str.Trim()); LogUtil.info("加载到HIK相机:" + name);
} }
CodeLibrary.HDCodeLearnHelper.LoadConfig(nameStr, codeStr); foreach (string name in balserNameList)
}
catch (Exception ex)
{ {
LogUtil.error("解析摄像机配置出错:" + ex.ToString()); LogUtil.info("加载到Balser相机:" + name);
} }
} }
public static Bitmap GetCamerImage(string cameraName) public static Bitmap GetCamerImage(string cameraName)
{ {
Bitmap bitm = null; Bitmap bitm = null;
//若未加载到相机,需要重新加载相机
if (balserNameList.Count <= 0 && hikNameList.Count <= 0)
{
LogUtil.error("获取图片时发现未加载到相机,重新加载相机");
LoadCamera();
}
if (balserNameList.Contains(cameraName)) if (balserNameList.Contains(cameraName))
{ {
BaslerCamera.Instance.Open(cameraName); BaslerCamera.Instance.Open(cameraName);
...@@ -78,7 +87,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
bitm = BaslerCamera.Instance.Image; bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close(); BaslerCamera.Instance.Close();
} }
else if(hikNameList.Contains(cameraName)) else if (hikNameList.Contains(cameraName))
{ {
HIKCamera.Instance.Open(cameraName); HIKCamera.Instance.Open(cameraName);
HIKCamera.Instance.GrabOne(); HIKCamera.Instance.GrabOne();
...@@ -87,10 +96,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -87,10 +96,11 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.info("未找到摄像机【"+cameraName+"】无法获取图片"); LogUtil.info("未找到摄像机【" + cameraName + "】无法获取图片");
} }
return bitm; return bitm;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan() public static List<string> CameraScan()
{ {
...@@ -101,14 +111,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -101,14 +111,18 @@ namespace OnlineStore.DeviceLibrary
{ {
foreach (string cameraName in cameraNameList) foreach (string cameraName in cameraNameList)
{ {
Bitmap bitmap = GetCamerImage(cameraName); using (Bitmap bitmap = GetCamerImage(cameraName))
{
if (bitmap == null) if (bitmap == null)
{ {
LogUtil.info(" 摄像机【" + cameraName + "】获取图片失败"); LogUtil.info(" 摄像机【" + cameraName + "】获取图片失败");
continue;
} }
else
{ LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap); HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>(); List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList) foreach (string codeType in codeTypeList)
{ {
...@@ -121,10 +135,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -121,10 +135,10 @@ namespace OnlineStore.DeviceLibrary
{ {
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType); cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
} }
} //LogUtil.info(" 摄像机【" + cameraName + "】【"+ codeType + "】扫码完成");
allCodeList.AddRange(cc); allCodeList.AddRange(cc);
} }
bitmap.Dispose(); }
} }
} }
catch (AccessViolationException e) catch (AccessViolationException e)
...@@ -159,7 +173,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -159,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public static string ProcessBarcode(List<string> codeList,int height) public static string ProcessBarcode(List<string> codeList, int height)
{ {
// 条码前面字母去掉之后用分号分割,最后不加分号 // 条码前面字母去掉之后用分号分割,最后不加分号
//P; H; Q //P; H; Q
...@@ -183,7 +197,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
result =result + split + s; result = result + split + s;
} }
} }
} }
...@@ -191,9 +205,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -191,9 +205,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return "=1+0x0-13x" + height + "=" + result; return "=1+0x0-13x" + height + "=" + result;
} }
}catch(Exception ex) }
catch (Exception ex)
{ {
LogUtil.error("处理二维码出错:"+ex.ToString()); LogUtil.error("处理二维码出错:" + ex.ToString());
} }
return result; return result;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!