yhluo 1 هفته پیش
والد
کامیت
97c6624b39

+ 258 - 225
UAS_Tools_HY/Main.Designer.cs

@@ -34,6 +34,13 @@
             this.checkPagination = new System.Windows.Forms.TabControl();
             this.checkPage1 = new System.Windows.Forms.TabPage();
             this.Datas = new System.Windows.Forms.DataGridView();
+            this.DbarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DboxCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DcountCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DtimeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Duser = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DisCheckdcr = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Dresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.checkPage2 = new System.Windows.Forms.TabPage();
             this.checkSetting = new System.Windows.Forms.TableLayoutPanel();
             this.checkSettingRight = new System.Windows.Forms.GroupBox();
@@ -52,6 +59,13 @@
             this.settingLeftLab1 = new System.Windows.Forms.Label();
             this.checkPage3 = new System.Windows.Forms.TabPage();
             this.RulesDatas = new System.Windows.Forms.DataGridView();
+            this.ruleId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RulesCol6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.rulesDataBox = new System.Windows.Forms.Panel();
             this.rulesAdd = new System.Windows.Forms.Button();
             this.rulesLab2 = new System.Windows.Forms.Label();
@@ -62,11 +76,6 @@
             this.checkPage4 = new System.Windows.Forms.TabPage();
             this.queryDataBox1 = new System.Windows.Forms.Panel();
             this.QDDatas = new System.Windows.Forms.DataGridView();
-            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.queryDataBox = new System.Windows.Forms.Panel();
             this.QDcheckbox1 = new System.Windows.Forms.CheckBox();
             this.QDlab3 = new System.Windows.Forms.Label();
@@ -80,6 +89,8 @@
             this.QDlab1 = new System.Windows.Forms.Label();
             this.detailTop = new System.Windows.Forms.TableLayoutPanel();
             this.detailLeft = new System.Windows.Forms.Panel();
+            this.dRuleslab = new System.Windows.Forms.Label();
+            this.DRulesBtn1 = new System.Windows.Forms.Button();
             this.radio1 = new System.Windows.Forms.CheckBox();
             this.detailLeftBox = new System.Windows.Forms.TableLayoutPanel();
             this.dAll = new System.Windows.Forms.Label();
@@ -105,22 +116,13 @@
             this.currUser = new System.Windows.Forms.Label();
             this.currTime = new System.Windows.Forms.Label();
             this.top = new System.Windows.Forms.Panel();
-            this.DbarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DboxCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DcountCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DtimeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Duser = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DisCheckdcr = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Dresult = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DRulesBtn1 = new System.Windows.Forms.Button();
-            this.ruleId = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RulesCol6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dRuleslab = new System.Windows.Forms.Label();
+            this.dqSN = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqOUTBOX_NO = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqCOUNT = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqUPDATE_TIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqNAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqRULE_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dqRULE_VALUE = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Pagination.SuspendLayout();
             this.Page1.SuspendLayout();
             this.checkPagination.SuspendLayout();
@@ -228,6 +230,69 @@
             this.Datas.Size = new System.Drawing.Size(1224, 329);
             this.Datas.TabIndex = 0;
             // 
+            // DbarCode
+            // 
+            this.DbarCode.DataPropertyName = "DbarCode";
+            this.DbarCode.HeaderText = "条码";
+            this.DbarCode.MinimumWidth = 8;
+            this.DbarCode.Name = "DbarCode";
+            this.DbarCode.ReadOnly = true;
+            this.DbarCode.Width = 240;
+            // 
+            // DboxCode
+            // 
+            this.DboxCode.DataPropertyName = "DboxCode";
+            this.DboxCode.HeaderText = "箱号";
+            this.DboxCode.MinimumWidth = 8;
+            this.DboxCode.Name = "DboxCode";
+            this.DboxCode.ReadOnly = true;
+            this.DboxCode.Width = 260;
+            // 
+            // DcountCol
+            // 
+            this.DcountCol.DataPropertyName = "DcountCol";
+            this.DcountCol.HeaderText = "扫描次数";
+            this.DcountCol.MinimumWidth = 8;
+            this.DcountCol.Name = "DcountCol";
+            this.DcountCol.ReadOnly = true;
+            this.DcountCol.Width = 120;
+            // 
+            // DtimeCol
+            // 
+            this.DtimeCol.DataPropertyName = "DtimeCol";
+            this.DtimeCol.HeaderText = "扫描时间";
+            this.DtimeCol.MinimumWidth = 8;
+            this.DtimeCol.Name = "DtimeCol";
+            this.DtimeCol.ReadOnly = true;
+            this.DtimeCol.Width = 180;
+            // 
+            // Duser
+            // 
+            this.Duser.DataPropertyName = "Duser";
+            this.Duser.HeaderText = "扫描人";
+            this.Duser.MinimumWidth = 8;
+            this.Duser.Name = "Duser";
+            this.Duser.ReadOnly = true;
+            this.Duser.Width = 120;
+            // 
+            // DisCheckdcr
+            // 
+            this.DisCheckdcr.DataPropertyName = "DisCheckdcr";
+            this.DisCheckdcr.HeaderText = "是否核对DCR";
+            this.DisCheckdcr.MinimumWidth = 8;
+            this.DisCheckdcr.Name = "DisCheckdcr";
+            this.DisCheckdcr.ReadOnly = true;
+            this.DisCheckdcr.Width = 160;
+            // 
+            // Dresult
+            // 
+            this.Dresult.DataPropertyName = "Dresult";
+            this.Dresult.HeaderText = "扫描结果";
+            this.Dresult.MinimumWidth = 8;
+            this.Dresult.Name = "Dresult";
+            this.Dresult.ReadOnly = true;
+            this.Dresult.Width = 120;
+            // 
             // checkPage2
             // 
             this.checkPage2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -437,6 +502,70 @@
             this.RulesDatas.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.RulesDatas_CellMouseClick);
             this.RulesDatas.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.RulesDatas_CellMouseDoubleClick);
             // 
+            // ruleId
+            // 
+            this.ruleId.DataPropertyName = "ruleId";
+            this.ruleId.HeaderText = "ruleId";
+            this.ruleId.MinimumWidth = 8;
+            this.ruleId.Name = "ruleId";
+            this.ruleId.ReadOnly = true;
+            this.ruleId.Visible = false;
+            this.ruleId.Width = 150;
+            // 
+            // RulesCol1
+            // 
+            this.RulesCol1.DataPropertyName = "RulesCol1";
+            this.RulesCol1.HeaderText = "规则名称";
+            this.RulesCol1.MinimumWidth = 8;
+            this.RulesCol1.Name = "RulesCol1";
+            this.RulesCol1.ReadOnly = true;
+            this.RulesCol1.Width = 240;
+            // 
+            // RulesCol2
+            // 
+            this.RulesCol2.DataPropertyName = "RulesCol2";
+            this.RulesCol2.HeaderText = "规则内容";
+            this.RulesCol2.MinimumWidth = 8;
+            this.RulesCol2.Name = "RulesCol2";
+            this.RulesCol2.ReadOnly = true;
+            this.RulesCol2.Width = 260;
+            // 
+            // RulesCol3
+            // 
+            this.RulesCol3.DataPropertyName = "RulesCol3";
+            this.RulesCol3.HeaderText = "备注";
+            this.RulesCol3.MinimumWidth = 8;
+            this.RulesCol3.Name = "RulesCol3";
+            this.RulesCol3.ReadOnly = true;
+            this.RulesCol3.Width = 260;
+            // 
+            // RulesCol4
+            // 
+            this.RulesCol4.DataPropertyName = "RulesCol4";
+            this.RulesCol4.HeaderText = "长度";
+            this.RulesCol4.MinimumWidth = 8;
+            this.RulesCol4.Name = "RulesCol4";
+            this.RulesCol4.ReadOnly = true;
+            this.RulesCol4.Width = 70;
+            // 
+            // RulesCol5
+            // 
+            this.RulesCol5.DataPropertyName = "RulesCol5";
+            this.RulesCol5.HeaderText = "更新时间";
+            this.RulesCol5.MinimumWidth = 8;
+            this.RulesCol5.Name = "RulesCol5";
+            this.RulesCol5.ReadOnly = true;
+            this.RulesCol5.Width = 160;
+            // 
+            // RulesCol6
+            // 
+            this.RulesCol6.DataPropertyName = "RulesCol6";
+            this.RulesCol6.HeaderText = "操作人员";
+            this.RulesCol6.MinimumWidth = 8;
+            this.RulesCol6.Name = "RulesCol6";
+            this.RulesCol6.ReadOnly = true;
+            this.RulesCol6.Width = 120;
+            // 
             // rulesDataBox
             // 
             this.rulesDataBox.Controls.Add(this.rulesAdd);
@@ -536,11 +665,13 @@
             this.QDDatas.BackgroundColor = System.Drawing.SystemColors.ControlLight;
             this.QDDatas.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.QDDatas.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.dataGridViewTextBoxColumn1,
-            this.dataGridViewTextBoxColumn2,
-            this.dataGridViewTextBoxColumn3,
-            this.dataGridViewTextBoxColumn4,
-            this.dataGridViewTextBoxColumn5});
+            this.dqSN,
+            this.dqOUTBOX_NO,
+            this.dqCOUNT,
+            this.dqUPDATE_TIME,
+            this.dqNAME,
+            this.dqRULE_NAME,
+            this.dqRULE_VALUE});
             this.QDDatas.Dock = System.Windows.Forms.DockStyle.Fill;
             this.QDDatas.Location = new System.Drawing.Point(0, 0);
             this.QDDatas.MultiSelect = false;
@@ -551,46 +682,6 @@
             this.QDDatas.Size = new System.Drawing.Size(1230, 245);
             this.QDDatas.TabIndex = 1;
             // 
-            // dataGridViewTextBoxColumn1
-            // 
-            this.dataGridViewTextBoxColumn1.HeaderText = "条码";
-            this.dataGridViewTextBoxColumn1.MinimumWidth = 8;
-            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
-            this.dataGridViewTextBoxColumn1.ReadOnly = true;
-            this.dataGridViewTextBoxColumn1.Width = 240;
-            // 
-            // dataGridViewTextBoxColumn2
-            // 
-            this.dataGridViewTextBoxColumn2.HeaderText = "箱码";
-            this.dataGridViewTextBoxColumn2.MinimumWidth = 8;
-            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
-            this.dataGridViewTextBoxColumn2.ReadOnly = true;
-            this.dataGridViewTextBoxColumn2.Width = 260;
-            // 
-            // dataGridViewTextBoxColumn3
-            // 
-            this.dataGridViewTextBoxColumn3.HeaderText = "扫描次数";
-            this.dataGridViewTextBoxColumn3.MinimumWidth = 8;
-            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
-            this.dataGridViewTextBoxColumn3.ReadOnly = true;
-            this.dataGridViewTextBoxColumn3.Width = 120;
-            // 
-            // dataGridViewTextBoxColumn4
-            // 
-            this.dataGridViewTextBoxColumn4.HeaderText = "扫描时间";
-            this.dataGridViewTextBoxColumn4.MinimumWidth = 8;
-            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
-            this.dataGridViewTextBoxColumn4.ReadOnly = true;
-            this.dataGridViewTextBoxColumn4.Width = 180;
-            // 
-            // dataGridViewTextBoxColumn5
-            // 
-            this.dataGridViewTextBoxColumn5.HeaderText = "扫描人";
-            this.dataGridViewTextBoxColumn5.MinimumWidth = 8;
-            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
-            this.dataGridViewTextBoxColumn5.ReadOnly = true;
-            this.dataGridViewTextBoxColumn5.Width = 120;
-            // 
             // queryDataBox
             // 
             this.queryDataBox.Controls.Add(this.QDcheckbox1);
@@ -728,6 +819,27 @@
             this.detailLeft.Size = new System.Drawing.Size(924, 197);
             this.detailLeft.TabIndex = 4;
             // 
+            // dRuleslab
+            // 
+            this.dRuleslab.AutoSize = true;
+            this.dRuleslab.Location = new System.Drawing.Point(543, 7);
+            this.dRuleslab.Name = "dRuleslab";
+            this.dRuleslab.Size = new System.Drawing.Size(96, 28);
+            this.dRuleslab.TabIndex = 9;
+            this.dRuleslab.Text = "核对规则";
+            // 
+            // DRulesBtn1
+            // 
+            this.DRulesBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.DRulesBtn1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DRulesBtn1.Location = new System.Drawing.Point(707, 42);
+            this.DRulesBtn1.Name = "DRulesBtn1";
+            this.DRulesBtn1.Size = new System.Drawing.Size(70, 30);
+            this.DRulesBtn1.TabIndex = 12;
+            this.DRulesBtn1.Text = "取消";
+            this.DRulesBtn1.UseVisualStyleBackColor = true;
+            this.DRulesBtn1.Click += new System.EventHandler(this.DRulesBtn1_Click);
+            // 
             // radio1
             // 
             this.radio1.AutoSize = true;
@@ -780,6 +892,7 @@
             this.dAll.TabIndex = 9;
             this.dAll.Text = "0";
             this.dAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.dAll.Visible = false;
             // 
             // dAgain
             // 
@@ -794,6 +907,7 @@
             this.dAgain.TabIndex = 8;
             this.dAgain.Text = "0";
             this.dAgain.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.dAgain.Visible = false;
             // 
             // dSum
             // 
@@ -855,22 +969,22 @@
             // 
             this.dlab1.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.dlab1.AutoSize = true;
-            this.dlab1.Location = new System.Drawing.Point(11, 0);
+            this.dlab1.Location = new System.Drawing.Point(20, 0);
             this.dlab1.Name = "dlab1";
-            this.dlab1.Size = new System.Drawing.Size(105, 49);
+            this.dlab1.Size = new System.Drawing.Size(96, 49);
             this.dlab1.TabIndex = 0;
-            this.dlab1.Text = "已扫产品数/箱容量";
+            this.dlab1.Text = "已扫产品数";
             this.dlab1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             // 
             // dlab2
             // 
             this.dlab2.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.dlab2.AutoSize = true;
-            this.dlab2.Location = new System.Drawing.Point(274, 0);
+            this.dlab2.Location = new System.Drawing.Point(274, 10);
             this.dlab2.Name = "dlab2";
-            this.dlab2.Size = new System.Drawing.Size(75, 49);
+            this.dlab2.Size = new System.Drawing.Size(75, 28);
             this.dlab2.TabIndex = 1;
-            this.dlab2.Text = "已扫次数";
+            this.dlab2.Text = "箱容量";
             this.dlab2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             // 
             // dlab4
@@ -883,6 +997,7 @@
             this.dlab4.TabIndex = 3;
             this.dlab4.Text = "总箱数";
             this.dlab4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.dlab4.Visible = false;
             // 
             // detailSN
             // 
@@ -923,6 +1038,7 @@
             this.dlab3.TabIndex = 2;
             this.dlab3.Text = "重复次数";
             this.dlab3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.dlab3.Visible = false;
             // 
             // dCount
             // 
@@ -935,7 +1051,7 @@
             this.dCount.Name = "dCount";
             this.dCount.Size = new System.Drawing.Size(146, 49);
             this.dCount.TabIndex = 6;
-            this.dCount.Text = "0/192";
+            this.dCount.Text = "0";
             this.dCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // dRules
@@ -1035,153 +1151,68 @@
             this.top.Size = new System.Drawing.Size(1254, 625);
             this.top.TabIndex = 3;
             // 
-            // DbarCode
-            // 
-            this.DbarCode.DataPropertyName = "DbarCode";
-            this.DbarCode.HeaderText = "条码";
-            this.DbarCode.MinimumWidth = 8;
-            this.DbarCode.Name = "DbarCode";
-            this.DbarCode.ReadOnly = true;
-            this.DbarCode.Width = 240;
-            // 
-            // DboxCode
-            // 
-            this.DboxCode.DataPropertyName = "DboxCode";
-            this.DboxCode.HeaderText = "箱号";
-            this.DboxCode.MinimumWidth = 8;
-            this.DboxCode.Name = "DboxCode";
-            this.DboxCode.ReadOnly = true;
-            this.DboxCode.Width = 260;
-            // 
-            // DcountCol
-            // 
-            this.DcountCol.DataPropertyName = "DcountCol";
-            this.DcountCol.HeaderText = "扫描次数";
-            this.DcountCol.MinimumWidth = 8;
-            this.DcountCol.Name = "DcountCol";
-            this.DcountCol.ReadOnly = true;
-            this.DcountCol.Width = 120;
-            // 
-            // DtimeCol
-            // 
-            this.DtimeCol.DataPropertyName = "DtimeCol";
-            this.DtimeCol.HeaderText = "扫描时间";
-            this.DtimeCol.MinimumWidth = 8;
-            this.DtimeCol.Name = "DtimeCol";
-            this.DtimeCol.ReadOnly = true;
-            this.DtimeCol.Width = 180;
-            // 
-            // Duser
-            // 
-            this.Duser.DataPropertyName = "Duser";
-            this.Duser.HeaderText = "扫描人";
-            this.Duser.MinimumWidth = 8;
-            this.Duser.Name = "Duser";
-            this.Duser.ReadOnly = true;
-            this.Duser.Width = 120;
-            // 
-            // DisCheckdcr
-            // 
-            this.DisCheckdcr.DataPropertyName = "DisCheckdcr";
-            this.DisCheckdcr.HeaderText = "是否核对DCR";
-            this.DisCheckdcr.MinimumWidth = 8;
-            this.DisCheckdcr.Name = "DisCheckdcr";
-            this.DisCheckdcr.ReadOnly = true;
-            this.DisCheckdcr.Width = 160;
-            // 
-            // Dresult
-            // 
-            this.Dresult.DataPropertyName = "Dresult";
-            this.Dresult.HeaderText = "扫描结果";
-            this.Dresult.MinimumWidth = 8;
-            this.Dresult.Name = "Dresult";
-            this.Dresult.ReadOnly = true;
-            this.Dresult.Width = 120;
-            // 
-            // DRulesBtn1
-            // 
-            this.DRulesBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.DRulesBtn1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DRulesBtn1.Location = new System.Drawing.Point(707, 42);
-            this.DRulesBtn1.Name = "DRulesBtn1";
-            this.DRulesBtn1.Size = new System.Drawing.Size(70, 30);
-            this.DRulesBtn1.TabIndex = 12;
-            this.DRulesBtn1.Text = "取消";
-            this.DRulesBtn1.UseVisualStyleBackColor = true;
-            this.DRulesBtn1.Click += new System.EventHandler(this.DRulesBtn1_Click);
-            // 
-            // ruleId
-            // 
-            this.ruleId.DataPropertyName = "ruleId";
-            this.ruleId.HeaderText = "ruleId";
-            this.ruleId.MinimumWidth = 8;
-            this.ruleId.Name = "ruleId";
-            this.ruleId.ReadOnly = true;
-            this.ruleId.Visible = false;
-            this.ruleId.Width = 150;
-            // 
-            // RulesCol1
-            // 
-            this.RulesCol1.DataPropertyName = "RulesCol1";
-            this.RulesCol1.HeaderText = "规则名称";
-            this.RulesCol1.MinimumWidth = 8;
-            this.RulesCol1.Name = "RulesCol1";
-            this.RulesCol1.ReadOnly = true;
-            this.RulesCol1.Width = 240;
-            // 
-            // RulesCol2
-            // 
-            this.RulesCol2.DataPropertyName = "RulesCol2";
-            this.RulesCol2.HeaderText = "规则内容";
-            this.RulesCol2.MinimumWidth = 8;
-            this.RulesCol2.Name = "RulesCol2";
-            this.RulesCol2.ReadOnly = true;
-            this.RulesCol2.Width = 260;
-            // 
-            // RulesCol3
-            // 
-            this.RulesCol3.DataPropertyName = "RulesCol3";
-            this.RulesCol3.HeaderText = "备注";
-            this.RulesCol3.MinimumWidth = 8;
-            this.RulesCol3.Name = "RulesCol3";
-            this.RulesCol3.ReadOnly = true;
-            this.RulesCol3.Width = 260;
-            // 
-            // RulesCol4
-            // 
-            this.RulesCol4.DataPropertyName = "RulesCol4";
-            this.RulesCol4.HeaderText = "长度";
-            this.RulesCol4.MinimumWidth = 8;
-            this.RulesCol4.Name = "RulesCol4";
-            this.RulesCol4.ReadOnly = true;
-            this.RulesCol4.Width = 70;
-            // 
-            // RulesCol5
-            // 
-            this.RulesCol5.DataPropertyName = "RulesCol5";
-            this.RulesCol5.HeaderText = "更新时间";
-            this.RulesCol5.MinimumWidth = 8;
-            this.RulesCol5.Name = "RulesCol5";
-            this.RulesCol5.ReadOnly = true;
-            this.RulesCol5.Width = 160;
-            // 
-            // RulesCol6
-            // 
-            this.RulesCol6.DataPropertyName = "RulesCol6";
-            this.RulesCol6.HeaderText = "操作人员";
-            this.RulesCol6.MinimumWidth = 8;
-            this.RulesCol6.Name = "RulesCol6";
-            this.RulesCol6.ReadOnly = true;
-            this.RulesCol6.Width = 120;
-            // 
-            // dRuleslab
-            // 
-            this.dRuleslab.AutoSize = true;
-            this.dRuleslab.Location = new System.Drawing.Point(543, 7);
-            this.dRuleslab.Name = "dRuleslab";
-            this.dRuleslab.Size = new System.Drawing.Size(96, 28);
-            this.dRuleslab.TabIndex = 9;
-            this.dRuleslab.Text = "核对规则";
+            // dqSN
+            // 
+            this.dqSN.DataPropertyName = "dqSN";
+            this.dqSN.HeaderText = "条码";
+            this.dqSN.MinimumWidth = 8;
+            this.dqSN.Name = "dqSN";
+            this.dqSN.ReadOnly = true;
+            this.dqSN.Width = 240;
+            // 
+            // dqOUTBOX_NO
+            // 
+            this.dqOUTBOX_NO.DataPropertyName = "dqOUTBOX_NO";
+            this.dqOUTBOX_NO.HeaderText = "箱码";
+            this.dqOUTBOX_NO.MinimumWidth = 8;
+            this.dqOUTBOX_NO.Name = "dqOUTBOX_NO";
+            this.dqOUTBOX_NO.ReadOnly = true;
+            this.dqOUTBOX_NO.Width = 260;
+            // 
+            // dqCOUNT
+            // 
+            this.dqCOUNT.DataPropertyName = "dqCOUNT";
+            this.dqCOUNT.HeaderText = "扫描次数";
+            this.dqCOUNT.MinimumWidth = 8;
+            this.dqCOUNT.Name = "dqCOUNT";
+            this.dqCOUNT.ReadOnly = true;
+            this.dqCOUNT.Width = 120;
+            // 
+            // dqUPDATE_TIME
+            // 
+            this.dqUPDATE_TIME.DataPropertyName = "dqUPDATE_TIME";
+            this.dqUPDATE_TIME.HeaderText = "扫描时间";
+            this.dqUPDATE_TIME.MinimumWidth = 8;
+            this.dqUPDATE_TIME.Name = "dqUPDATE_TIME";
+            this.dqUPDATE_TIME.ReadOnly = true;
+            this.dqUPDATE_TIME.Width = 180;
+            // 
+            // dqNAME
+            // 
+            this.dqNAME.DataPropertyName = "dqNAME";
+            this.dqNAME.HeaderText = "扫描人";
+            this.dqNAME.MinimumWidth = 8;
+            this.dqNAME.Name = "dqNAME";
+            this.dqNAME.ReadOnly = true;
+            this.dqNAME.Width = 120;
+            // 
+            // dqRULE_NAME
+            // 
+            this.dqRULE_NAME.DataPropertyName = "dqRULE_NAME";
+            this.dqRULE_NAME.HeaderText = "规则名称";
+            this.dqRULE_NAME.MinimumWidth = 8;
+            this.dqRULE_NAME.Name = "dqRULE_NAME";
+            this.dqRULE_NAME.ReadOnly = true;
+            this.dqRULE_NAME.Width = 150;
+            // 
+            // dqRULE_VALUE
+            // 
+            this.dqRULE_VALUE.DataPropertyName = "dqRULE_VALUE";
+            this.dqRULE_VALUE.HeaderText = "规则内容";
+            this.dqRULE_VALUE.MinimumWidth = 8;
+            this.dqRULE_VALUE.Name = "dqRULE_VALUE";
+            this.dqRULE_VALUE.ReadOnly = true;
+            this.dqRULE_VALUE.Width = 180;
             // 
             // Main
             // 
@@ -1286,11 +1317,6 @@
         private System.Windows.Forms.DataGridView Datas;
         private System.Windows.Forms.Panel queryDataBox;
         private System.Windows.Forms.DataGridView QDDatas;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
         private System.Windows.Forms.Label QDlab1;
         private System.Windows.Forms.Label QDlab2;
         private System.Windows.Forms.TextBox QDInput1;
@@ -1330,5 +1356,12 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn RulesCol5;
         private System.Windows.Forms.DataGridViewTextBoxColumn RulesCol6;
         private System.Windows.Forms.Label dRuleslab;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqSN;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqOUTBOX_NO;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqCOUNT;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqUPDATE_TIME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqNAME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqRULE_NAME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dqRULE_VALUE;
     }
 }

+ 240 - 30
UAS_Tools_HY/Main.cs

@@ -1,4 +1,5 @@
-using System;
+using Microsoft.Office.Interop.Excel;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -7,12 +8,17 @@ using System.Globalization;
 using System.IO;
 using System.Linq;
 using System.Media;
+using System.Runtime.InteropServices;
 using System.Security.Principal;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using UAS_Tools_HY;
+using UAS_Tools_HY.Properties;
 using UAS_Tools_HY.PublicMethods;
+using Application = Microsoft.Office.Interop.Excel.Application;
+using DataTable = System.Data.DataTable;
 
 namespace UAS_MES_Tools
 {
@@ -27,6 +33,8 @@ namespace UAS_MES_Tools
 
         string curRule, curRuleLeng;
 
+        int ishaveInd;
+
         public Main(string account, string password)
         {
             _Account = account;
@@ -56,13 +64,16 @@ namespace UAS_MES_Tools
             settingLeftInput1.Text = BaseUtil.GetCacheData("SettingCount").ToString();
             settingLeftInput2.Text = BaseUtil.GetCacheData("SettingVolume").ToString();
 
+            dSum.Text = BaseUtil.GetCacheData("SettingVolume").ToString();
+
             settingRightInput1.Text = BaseUtil.GetCacheData("SettingNGPath").ToString();
             settingRightInput2.Text = BaseUtil.GetCacheData("SettingExportPath").ToString();
             
             QDcheckbox1.Checked = true;
-            QDdtp1.Value = QDdtp2.Value.AddDays(-1);
+            QDdtp2.Value = QDdtp1.Value.AddDays(1);
 
             rulesQuery_Click(null, null);
+            QDquery_Click(null, null);
         }
 
         private void SN_KeyDown(object sender, KeyEventArgs e)
@@ -73,16 +84,12 @@ namespace UAS_MES_Tools
 
             bool checkRes = true;
 
-            ShowMsg.Text = "Pass";
-            ShowMsg.BackColor = Color.LawnGreen;
             if (radio1.Checked)
             {
                 dt = ConnectDB.ExecuteSelect($@"SELECT COUNT(1) sum FROM dcrlogexcel WHERE item = '{SN.Text.Trim()}'");
                 if (dt.Rows[0]["sum"].ToString() == "0")
                 {
                     PlaySound("NG");
-                    ShowMsg.Text = "Fail";
-                    ShowMsg.BackColor = Color.Red;
                     MessageBox.Show($"{SN.Text.Trim()},没有DCR测试数据", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                     checkRes = false;
                     return;
@@ -92,42 +99,78 @@ namespace UAS_MES_Tools
             if (FormMethods.IsCheckSNRules(curRule, SN.Text.Trim(), curRuleLeng))
             {
                 PlaySound("NG");
-                ShowMsg.Text = "Fail";
-                ShowMsg.BackColor = Color.Red;
                 MessageBox.Show($"{SN.Text.Trim()},不符合条码规则", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 checkRes = false;
                 return;
             }
 
+            ishaveInd = -1;
             if (Datas.Rows.Count > 0)
             {
                 foreach (DataGridViewRow item in Datas.Rows)
                 {
                     if (SN.Text.Trim() == item.Cells[0].Value.ToString())
                     {
-                        int iCou = Convert.ToInt32(item.Cells[2].Value);
-                        iCou += 1;
-
-                        item.Cells[3].Value = currTime.Text;
-                        item.Cells[6].Value = checkRes ? "OK" : "NG";
+                        ishaveInd = Datas.Rows.IndexOf(item);
                     }
                 }
             }
 
+            if (ishaveInd >= 0)
+            {
+                int iCou = Convert.ToInt32(Datas.Rows[ishaveInd].Cells[2].Value);
+                iCou += 1;
+                Datas.Rows[ishaveInd].Cells[3].Value = currTime.Text;
+                Datas.Rows[ishaveInd].Cells[6].Value = checkRes ? "OK" : "NG";
+                PlaySound("OK");
+            }
+            else
+            {
+                DataGridViewRow row = new DataGridViewRow();
+                row.CreateCells(Datas);
+                row.Cells[0].Value = SN.Text.Trim();
+                row.Cells[1].Value = BoxNo.Text.Trim();
+                row.Cells[2].Value = 1;
+                row.Cells[3].Value = currTime.Text;
+                row.Cells[4].Value = _UserName;
+                row.Cells[5].Value = radio1.Checked ? "是" : "否";
+                row.Cells[6].Value = checkRes ? "OK" : "NG";
+                Datas.Rows.Add(row);
+                PlaySound("OK");
+                Datas.FirstDisplayedScrollingRowIndex = Datas.Rows.Count - 1;
+
+                if (ChangeDetail())
+                {
+                    SN.Text = "";
+                    BoxNo.Text = "";
+                    dCount.Text = "0";
+                    Datas.Rows.Clear();
+                    BoxNo.Focus();
+                    BoxNo.SelectAll();
+                }
+            }
+        }
 
-            DataGridViewRow row = new DataGridViewRow();
-            row.CreateCells(Datas);
-            row.Cells[0].Value = SN.Text.Trim();
-            row.Cells[1].Value = BoxNo.Text.Trim();
-            row.Cells[2].Value = 1;
-            row.Cells[3].Value = currTime.Text;
-            row.Cells[4].Value = _UserName;
-            row.Cells[5].Value = radio1.Checked ? "是" : "否";
-            row.Cells[6].Value = checkRes ? "OK": "NG";
-            Datas.Rows.Add(row);
-            PlaySound("OK");
+        private bool ChangeDetail()
+        {
+            int inputSum = Convert.ToInt32(dCount.Text);
+            dCount.Text = (inputSum + 1).ToString();
 
-            Datas.FirstDisplayedScrollingRowIndex = Datas.Rows.Count - 1;
+            if(Convert.ToInt32(dCount.Text) == Convert.ToInt32(dSum.Text))
+            {
+                foreach (DataGridViewRow item in Datas.Rows)
+                {
+                    int insertCount = ConnectDB.ExecuteInsert($@"INSERT INTO g_packing_sncheck (work_order,part_no,sn,outbox_no,
+                        count,update_time,update_name,check_id,rule_name,rule_value) 
+                        VALUES ( '', '', '{item.Cells[0].Value}', '{item.Cells[1].Value}',
+                        '{item.Cells[2].Value}',sysdate,'{_UserName}',packcheckid_seq.NEXTVAL,'{dRules.Text.Trim()}','{curRule}' )");
+                }
+                return true;
+            }
+            else
+            {
+                return false;
+            }
         }
 
         private void BoxNo_KeyDown(object sender, KeyEventArgs e)
@@ -161,6 +204,11 @@ namespace UAS_MES_Tools
                 MessageBox.Show("请维护箱内容量", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return true;
             }
+            if (!Regex.IsMatch(dSum.Text, @"^[1-9]\d*$"))
+            {
+                MessageBox.Show("箱内容量维护应为正整数", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return true;
+            }
             if (string.IsNullOrEmpty(dRules.Text))
             {
                 MessageBox.Show("请选择条码规则", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -189,6 +237,9 @@ namespace UAS_MES_Tools
             }
             BaseUtil.SetCacheData("SettingCount", settingLeftInput1.Text);
             BaseUtil.SetCacheData("SettingVolume", settingLeftInput2.Text);
+
+            dSum.Text = BaseUtil.GetCacheData("SettingVolume").ToString();
+
             MessageBox.Show("已提交扫描设置", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
 
@@ -207,24 +258,172 @@ namespace UAS_MES_Tools
 
         private void QDquery_Click(object sender, EventArgs e)
         {
-            if (string.IsNullOrEmpty(QDInput1.Text) && string.IsNullOrEmpty(QDInput2.Text) && !QDcheckbox1.Checked)
+            StringBuilder filterStr = new StringBuilder();
+            if (!string.IsNullOrEmpty(QDInput1.Text))
             {
-                MessageBox.Show("请添加筛选条件", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                return;
+                filterStr.Append($"WHERE instr(SN,'{QDInput1.Text}') > 0");
+            }
+            if (!string.IsNullOrEmpty(QDInput2.Text))
+            {
+                if (filterStr.Length == 0)
+                {
+                    filterStr.Append($"WHERE instr(OUTBOX_NO,'{QDInput2.Text}') > 0");
+                }
+                else
+                {
+                    filterStr.Append($" and instr(OUTBOX_NO, '{QDInput2.Text}') > 0");
+                }
             }
             if (QDcheckbox1.Checked)
             {
-
+                string dtp1 = QDdtp1.Value.ToString("yyyy-MM-dd 00:00:00");
+                string dtp2 = QDdtp2.Value.ToString("yyyy-MM-dd 00:00:00");
+                if (filterStr.Length == 0)
+                {
+                    filterStr.Append($"WHERE update_time > TO_DATE('{dtp1}','YYYY-MM-DD HH24:MI:SS') AND update_time <= TO_DATE('{dtp2}','YYYY-MM-DD HH24:MI:SS')");
+                }
+                else
+                {
+                    filterStr.Append($" AND update_time > TO_DATE('{dtp1}','YYYY-MM-DD HH24:MI:SS') AND update_time <= TO_DATE('{dtp2}','YYYY-MM-DD HH24:MI:SS')");
+                }
             }
+            dt = ConnectDB.ExecuteSelect($@"SELECT sn dqsn,outbox_no dqoutbox_no,count dqcount,
+                update_time dqupdate_time,update_name dqname,rule_name dqrule_name,rule_value dqrule_value
+                FROM g_packing_sncheck {filterStr.ToString()} ORDER BY update_time");
+            QDDatas.DataSource = dt;
         }
 
         private void QDexport_Click(object sender, EventArgs e)
         {
             if(QDDatas.Rows.Count == 0)
             {
-                MessageBox.Show("请筛选数据", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                MessageBox.Show("请先查询出导出数据", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return;
             }
+            if (string.IsNullOrEmpty(settingRightInput2.Text))
+            {
+                MessageBox.Show("请先在设置中选择导出路径", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+            Application excelApp = null;
+            Workbook workbook = null;
+            Worksheet worksheet = null;
+            Range range = null;
+            string tempTemplatePath = null;
+
+            try
+            {
+                string exportPath = Path.Combine(settingRightInput2.Text, DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + ".xlsx");
+
+                if (string.IsNullOrEmpty(settingRightInput2.Text) || !Directory.Exists(settingRightInput2.Text))
+                {
+                    MessageBox.Show($"输出目录不存在: {settingRightInput2.Text}", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                byte[] templateBytes = Resources.exportModel; // 假设Resources.exportModel是有效的资源
+                if (templateBytes == null || templateBytes.Length == 0)
+                {
+                    MessageBox.Show("未能加载模板文件", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                tempTemplatePath = Path.GetTempFileName().Replace(".tmp", ".xlsx");
+                File.WriteAllBytes(tempTemplatePath, templateBytes);
+
+                excelApp = new Application();
+                excelApp.Visible = false;
+                excelApp.DisplayAlerts = false;
+
+                workbook = excelApp.Workbooks.Open(tempTemplatePath);
+                object sheetIndex = 1;
+                worksheet = (Worksheet)workbook.Worksheets[sheetIndex];
+
+                int startRow = 2;
+                int dataRowsCount = QDDatas.Rows.Count;
+                for (int i = 0; i < QDDatas.Rows.Count; i++)
+                {
+                    worksheet.Cells[startRow + i, 1] = i + 1; // 改为从1开始编号,更符合Excel习惯
+                    worksheet.Cells[startRow + i, 2] = QDDatas.Rows[i].Cells[0].Value?.ToString();
+                }
+                int endRow = startRow + dataRowsCount - 1;
+                range = worksheet.Range[worksheet.Cells[startRow, 1], worksheet.Cells[endRow, 2]];
+                range.HorizontalAlignment = XlHAlign.xlHAlignCenter; // 水平居中
+                range.VerticalAlignment = XlVAlign.xlVAlignCenter;   // 垂直居中
+
+                worksheet.Columns.AutoFit();
+                // 修复SaveAs方法,使用正确的参数
+                workbook.SaveAs(
+                    Filename: exportPath,
+                    FileFormat: XlFileFormat.xlOpenXMLWorkbook,
+                    Password: Type.Missing,
+                    WriteResPassword: Type.Missing,
+                    ReadOnlyRecommended: Type.Missing,
+                    CreateBackup: Type.Missing,
+                    AccessMode: XlSaveAsAccessMode.xlExclusive,
+                    ConflictResolution: Type.Missing,
+                    AddToMru: false,
+                    TextCodepage: Type.Missing,
+                    TextVisualLayout: Type.Missing,
+                    Local: Type.Missing
+                );
+
+                MessageBox.Show($"Excel文件已成功导出到: {exportPath}", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"生成 Excel 文件时出错: {ex.Message}", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+            }
+            finally
+            {
+                // 正确释放COM对象
+                if (worksheet != null)
+                {
+                    try
+                    {
+                        Marshal.ReleaseComObject(worksheet);
+                    }
+                    catch { }
+                    worksheet = null;
+                }
+
+                if (workbook != null)
+                {
+                    try
+                    {
+                        workbook.Close(false);
+                        Marshal.ReleaseComObject(workbook);
+                    }
+                    catch { }
+                    workbook = null;
+                }
+
+                if (excelApp != null)
+                {
+                    try
+                    {
+                        excelApp.Quit();
+                        Marshal.ReleaseComObject(excelApp);
+                    }
+                    catch { }
+                    excelApp = null;
+                }
+
+                if (!string.IsNullOrEmpty(tempTemplatePath) && File.Exists(tempTemplatePath))
+                {
+                    try
+                    {
+                        File.Delete(tempTemplatePath);
+                    }
+                    catch (Exception ex)
+                    {
+
+                    }
+                }
+
+                GC.Collect();
+                GC.WaitForPendingFinalizers();
+            }
         }
 
 
@@ -431,6 +630,17 @@ namespace UAS_MES_Tools
 
         private void PlaySound(string type)
         {
+            if (type == "OK")
+            {
+                ShowMsg.Text = "Pass";
+                ShowMsg.BackColor = Color.LawnGreen;
+            }
+            else
+            {
+                ShowMsg.Text = "Fail";
+                ShowMsg.BackColor = Color.Red;
+            }
+
             Task.Run(() => {
                 if (type == "OK")
                 {

+ 11 - 5
UAS_Tools_HY/Main.resx

@@ -159,19 +159,25 @@
   <metadata name="RulesCol6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dqSN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dqOUTBOX_NO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dqCOUNT.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dqUPDATE_TIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dqNAME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dqRULE_NAME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dqRULE_VALUE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

+ 10 - 0
UAS_Tools_HY/Properties/Resources.Designer.cs

@@ -60,6 +60,16 @@ namespace UAS_Tools_HY.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Byte[] 类型的本地化资源。
+        /// </summary>
+        internal static byte[] exportModel {
+            get {
+                object obj = ResourceManager.GetObject("exportModel", resourceCulture);
+                return ((byte[])(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
         /// </summary>

+ 3 - 0
UAS_Tools_HY/Properties/Resources.resx

@@ -118,6 +118,9 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="exportModel" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Audio\导出模板.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
   <data name="NG" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\Audio\NG.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>

BIN
UAS_Tools_HY/Resources/Audio/导出模板.xlsx


+ 10 - 0
UAS_Tools_HY/UAS_Tools_HY.csproj

@@ -54,11 +54,20 @@
     <NoWin32Manifest>true</NoWin32Manifest>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="Microsoft.Office.Interop.Excel, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Office.Interop.Excel.16.0.18925.20022\lib\net40\Microsoft.Office.Interop.Excel.dll</HintPath>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </Reference>
     <Reference Include="Oracle.ManagedDataAccess">
       <HintPath>Packages\Oracle.ManagedDataAccess.dll</HintPath>
     </Reference>
+    <Reference Include="PresentationCore" />
     <Reference Include="System" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Security" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
     <Reference Include="Microsoft.CSharp" />
@@ -114,6 +123,7 @@
     <EmbeddedResource Include="RulesList.resx">
       <DependentUpon>RulesList.cs</DependentUpon>
     </EmbeddedResource>
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>

+ 4 - 0
UAS_Tools_HY/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Microsoft.Office.Interop.Excel" version="16.0.18925.20022" targetFramework="net48" />
+</packages>