shim 8 жил өмнө
parent
commit
f7c2eb1360

+ 10 - 12
UAS-MES/FunctionCode/Make/Make_LabelCheck.cs

@@ -189,23 +189,21 @@ namespace UAS_MES.FunctionCode.Make
                 }
             }
         }
-        private void recordResult(string SN, string time, string result) {
+        private void recordResult(string SN, string time, string result)
+        {
             if (showResult.Items.Count >= 10)
             {
                 //如果有10行的话,则删除最前一行
                 showResult.Items.RemoveAt(0);
             }
-            else
-            {
-                //创建一个item
-                ListViewItem lvi = new ListViewItem();
-                //分条赋值
-                lvi.SubItems[1].Text = SN;
-                lvi.SubItems[2].Text = time;
-                lvi.SubItems[3].Text = result;
-                //添加结果的信息进去
-                showResult.Items.Add(lvi);
-            }
+            //创建一个item
+            ListViewItem lvi = new ListViewItem();
+            //分条赋值
+            lvi.SubItems.Add(SN);
+            lvi.SubItems.Add(time);
+            lvi.SubItems.Add(result);
+            //添加结果的信息进去
+            showResult.Items.Add(lvi);
         }
         private void clear() {
             //清空变量的值

+ 63 - 57
UAS-MES/FunctionCode/Make/Make_PalletWeigh.Designer.cs

@@ -49,7 +49,6 @@
             this.label7 = new System.Windows.Forms.Label();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.label8 = new System.Windows.Forms.Label();
-            this.dataGridViewWithSerialNum1 = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.printNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -57,16 +56,17 @@
             this.pr_detailspec = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_salecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PA_PACKAGEQTY = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pa_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pa_weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.weight_time = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.weightedNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.startWeigh = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.stopWeigh = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.BaudRate = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.ComList = new UAS_MES.CustomControl.ComBoxWithFocus.SerialPortCombox();
+            this.showResult = new System.Windows.Forms.ListView();
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.panel4.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).BeginInit();
             this.SuspendLayout();
             // 
             // panel4
@@ -153,7 +153,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(1110, 126);
+            this.label1.Location = new System.Drawing.Point(988, 119);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(110, 31);
@@ -164,7 +164,7 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.Printer_label.Location = new System.Drawing.Point(1088, 31);
+            this.Printer_label.Location = new System.Drawing.Point(966, 24);
             this.Printer_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Printer_label.Name = "Printer_label";
             this.Printer_label.Size = new System.Drawing.Size(134, 31);
@@ -174,7 +174,7 @@
             // Printer
             // 
             this.Printer.Font = new System.Drawing.Font("宋体", 9F);
-            this.Printer.Location = new System.Drawing.Point(1340, 31);
+            this.Printer.Location = new System.Drawing.Point(1218, 24);
             this.Printer.Margin = new System.Windows.Forms.Padding(6);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(196, 33);
@@ -185,7 +185,7 @@
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.Font = new System.Drawing.Font("宋体", 9F);
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1340, 123);
+            this.PrintLabel.Location = new System.Drawing.Point(1218, 116);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(4);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(196, 26);
@@ -197,7 +197,7 @@
             this.autoPrint.Checked = true;
             this.autoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.autoPrint.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.autoPrint.Location = new System.Drawing.Point(1093, 214);
+            this.autoPrint.Location = new System.Drawing.Point(971, 207);
             this.autoPrint.Name = "autoPrint";
             this.autoPrint.Size = new System.Drawing.Size(136, 35);
             this.autoPrint.TabIndex = 166;
@@ -208,7 +208,7 @@
             // 
             this.printNum_label.AutoSize = true;
             this.printNum_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.printNum_label.Location = new System.Drawing.Point(1268, 215);
+            this.printNum_label.Location = new System.Drawing.Point(1146, 208);
             this.printNum_label.Name = "printNum_label";
             this.printNum_label.Size = new System.Drawing.Size(62, 31);
             this.printNum_label.TabIndex = 167;
@@ -278,7 +278,7 @@
             // 
             this.OperateResult.Location = new System.Drawing.Point(33, 574);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(663, 215);
+            this.OperateResult.Size = new System.Drawing.Size(663, 310);
             this.OperateResult.TabIndex = 175;
             this.OperateResult.Text = "";
             // 
@@ -286,34 +286,19 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.label8.Location = new System.Drawing.Point(1123, 308);
+            this.label8.Location = new System.Drawing.Point(1001, 301);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(77, 39);
             this.label8.TabIndex = 176;
             this.label8.Text = "已称";
             // 
-            // dataGridViewWithSerialNum1
-            // 
-            this.dataGridViewWithSerialNum1.AllowUserToAddRows = false;
-            this.dataGridViewWithSerialNum1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.dataGridViewWithSerialNum1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.pa_outboxcode,
-            this.pa_weight,
-            this.weight_time});
-            this.dataGridViewWithSerialNum1.Location = new System.Drawing.Point(818, 390);
-            this.dataGridViewWithSerialNum1.Margin = new System.Windows.Forms.Padding(4);
-            this.dataGridViewWithSerialNum1.Name = "dataGridViewWithSerialNum1";
-            this.dataGridViewWithSerialNum1.RowTemplate.Height = 23;
-            this.dataGridViewWithSerialNum1.Size = new System.Drawing.Size(764, 422);
-            this.dataGridViewWithSerialNum1.TabIndex = 177;
-            // 
             // printNum
             // 
             this.printNum.AllPower = null;
             this.printNum.BackColor = System.Drawing.Color.White;
             this.printNum.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.printNum.ID = null;
-            this.printNum.Location = new System.Drawing.Point(1340, 214);
+            this.printNum.Location = new System.Drawing.Point(1218, 207);
             this.printNum.Name = "printNum";
             this.printNum.Negative = false;
             this.printNum.Power = null;
@@ -391,29 +376,13 @@
             this.PA_PACKAGEQTY.Size = new System.Drawing.Size(0, 39);
             this.PA_PACKAGEQTY.TabIndex = 184;
             // 
-            // pa_outboxcode
-            // 
-            this.pa_outboxcode.HeaderText = "栈板号";
-            this.pa_outboxcode.Name = "pa_outboxcode";
-            // 
-            // pa_weight
-            // 
-            this.pa_weight.HeaderText = "重量";
-            this.pa_weight.Name = "pa_weight";
-            // 
-            // weight_time
-            // 
-            this.weight_time.HeaderText = "称量时间";
-            this.weight_time.Name = "weight_time";
-            this.weight_time.Width = 140;
-            // 
             // weightedNum
             // 
             this.weightedNum.AllPower = null;
             this.weightedNum.BackColor = System.Drawing.Color.White;
             this.weightedNum.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.weightedNum.ID = null;
-            this.weightedNum.Location = new System.Drawing.Point(1340, 308);
+            this.weightedNum.Location = new System.Drawing.Point(1218, 301);
             this.weightedNum.Name = "weightedNum";
             this.weightedNum.Negative = false;
             this.weightedNum.Power = null;
@@ -431,7 +400,7 @@
             this.startWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.DownImage")));
             this.startWeigh.Image = null;
             this.startWeigh.IsShowBorder = true;
-            this.startWeigh.Location = new System.Drawing.Point(696, 21);
+            this.startWeigh.Location = new System.Drawing.Point(649, 21);
             this.startWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.MoveImage")));
             this.startWeigh.Name = "startWeigh";
             this.startWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("startWeigh.NormalImage")));
@@ -449,7 +418,7 @@
             this.stopWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.DownImage")));
             this.stopWeigh.Image = null;
             this.stopWeigh.IsShowBorder = true;
-            this.stopWeigh.Location = new System.Drawing.Point(854, 21);
+            this.stopWeigh.Location = new System.Drawing.Point(793, 21);
             this.stopWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.MoveImage")));
             this.stopWeigh.Name = "stopWeigh";
             this.stopWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("stopWeigh.NormalImage")));
@@ -465,7 +434,7 @@
             this.BaudRate.AllPower = null;
             this.BaudRate.BackColor = System.Drawing.Color.White;
             this.BaudRate.ID = null;
-            this.BaudRate.Location = new System.Drawing.Point(818, 133);
+            this.BaudRate.Location = new System.Drawing.Point(671, 133);
             this.BaudRate.Margin = new System.Windows.Forms.Padding(4);
             this.BaudRate.Name = "BaudRate";
             this.BaudRate.Negative = false;
@@ -479,17 +448,55 @@
             // 
             // ComList
             // 
-            this.ComList.Location = new System.Drawing.Point(816, 185);
+            this.ComList.Location = new System.Drawing.Point(669, 185);
+            this.ComList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.ComList.Name = "ComList";
             this.ComList.Size = new System.Drawing.Size(182, 30);
             this.ComList.TabIndex = 188;
             this.ComList.Visible = false;
             // 
+            // showResult
+            // 
+            this.showResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader3,
+            this.columnHeader4});
+            this.showResult.Location = new System.Drawing.Point(829, 406);
+            this.showResult.Name = "showResult";
+            this.showResult.Size = new System.Drawing.Size(585, 478);
+            this.showResult.TabIndex = 190;
+            this.showResult.UseCompatibleStateImageBehavior = false;
+            this.showResult.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "";
+            this.columnHeader1.Width = 69;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "栈板号";
+            this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader2.Width = 150;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "重量";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 159;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "称量时间";
+            this.columnHeader4.Width = 96;
+            // 
             // Make_PalletWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1628, 825);
+            this.ClientSize = new System.Drawing.Size(1451, 896);
+            this.Controls.Add(this.showResult);
             this.Controls.Add(this.BaudRate);
             this.Controls.Add(this.ComList);
             this.Controls.Add(this.stopWeigh);
@@ -502,7 +509,6 @@
             this.Controls.Add(this.pa_totalqty);
             this.Controls.Add(this.pa_makecode);
             this.Controls.Add(this.printNum);
-            this.Controls.Add(this.dataGridViewWithSerialNum1);
             this.Controls.Add(this.label8);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label7);
@@ -529,7 +535,6 @@
             this.SizeChanged += new System.EventHandler(this.Make_PalletWeigh_SizeChanged);
             this.panel4.ResumeLayout(false);
             this.panel4.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -557,7 +562,6 @@
         private System.Windows.Forms.Label label7;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.Windows.Forms.Label label8;
-        private CustomControl.DataGrid_View.DataGridViewWithSerialNum dataGridViewWithSerialNum1;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox printNum;
         private CustomControl.ValueLabel.ValueLabel pa_makecode;
         private CustomControl.ValueLabel.ValueLabel pa_totalqty;
@@ -565,13 +569,15 @@
         private CustomControl.ValueLabel.ValueLabel pr_detailspec;
         private CustomControl.ValueLabel.ValueLabel pa_salecode;
         private CustomControl.ValueLabel.ValueLabel PA_PACKAGEQTY;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pa_outboxcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pa_weight;
-        private System.Windows.Forms.DataGridViewTextBoxColumn weight_time;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox weightedNum;
         private CustomControl.ButtonUtil.NormalButton startWeigh;
         private CustomControl.ButtonUtil.NormalButton stopWeigh;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox BaudRate;
         private CustomControl.ComBoxWithFocus.SerialPortCombox ComList;
+        private System.Windows.Forms.ListView showResult;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
     }
 }

+ 17 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -138,7 +138,7 @@ namespace UAS_MES.FunctionCode.Make
                             //刷新称重计数+1
                             weightedNum.Text = int.Parse(weightedNum.Text) + 1 + "";
                             //刷新grid的历史称重信息;
-
+                            recordResult(palletcode.Text,weight.Text, System.DateTime.Now.ToString());
                             //清空输入框中的值,扫描框置空定焦
                             palletcode.Text = "";
                         }
@@ -231,5 +231,21 @@ namespace UAS_MES.FunctionCode.Make
                 thread.Interrupt();
             }
         }
+        private void recordResult(string palletcode, string weigh, string time)
+        {
+            if (showResult.Items.Count >= 50)
+            {
+                //如果有10行的话,则删除最前一行
+                showResult.Items.RemoveAt(0);
+            }
+            //创建一个item
+            ListViewItem lvi = new ListViewItem();
+            //分条赋值
+            lvi.SubItems.Add(palletcode);
+            lvi.SubItems.Add(weigh);
+            lvi.SubItems.Add(time);
+            //添加结果的信息进去
+            showResult.Items.Add(lvi);
+        }
     }
 }

+ 0 - 18
UAS-MES/FunctionCode/Make/Make_PalletWeigh.resx

@@ -117,24 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="pa_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="weight_time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="weight_time.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" />
   <data name="startWeigh.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>