Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 years ago
parent
commit
d4cb30a45f

+ 9 - 1
UAS-MES/CustomControl/ValueLabel/ValueLabel.Designer.cs

@@ -28,7 +28,15 @@
         /// </summary>
         private void InitializeComponent()
         {
-            components = new System.ComponentModel.Container();
+            this.SuspendLayout();
+            // 
+            // ValueLabel
+            // 
+            this.AutoSize = true;
+            this.MaximumSize = new System.Drawing.Size(200, 0);
+            this.Size = new System.Drawing.Size(20, 0);
+            this.ResumeLayout(false);
+
         }
         #endregion
     }

+ 16 - 0
UAS-MES/CustomControl/ValueLabel/ValueLabel.cs

@@ -4,9 +4,25 @@ namespace UAS_MES.CustomControl.ValueLabel
 {
     public partial class ValueLabel : Label
     {
+
+        string CutLength1;
+
         public ValueLabel()
         {
             InitializeComponent();
         }
+
+        public string CutLength
+        {
+            get
+            {
+                return CutLength1;
+            }
+
+            set
+            {
+                CutLength1 = value;
+            }
+        }
     }
 }

+ 123 - 0
UAS-MES/CustomControl/ValueLabel/ValueLabel.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 115 - 68
UAS-MES/Form1.Designer.cs

@@ -28,19 +28,22 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
             this.button1 = new System.Windows.Forms.Button();
             this.button2 = new System.Windows.Forms.Button();
             this.ct_coll = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.paintpanel = new System.Windows.Forms.Panel();
+            this.enterTextBox2 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.valueLabel1 = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.normalButton2 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.normalButton3 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.测试GetSNALL = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.TestDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.numOnlyTextBox1 = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.blurSearch1 = new UAS_MES.CustomControl.TextBoxWithIcon.BlurSearch();
-            this.normalButton3 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.normalButton2 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.ct_coll)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.TestDGV)).BeginInit();
             this.SuspendLayout();
@@ -71,26 +74,98 @@
             this.ct_coll.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.Cross;
             this.ct_coll.BackImageTransparentColor = System.Drawing.SystemColors.Control;
             this.ct_coll.BorderlineColor = System.Drawing.SystemColors.Control;
-            chartArea2.Name = "ChartArea1";
-            this.ct_coll.ChartAreas.Add(chartArea2);
-            legend2.Enabled = false;
-            legend2.Name = "Legend1";
-            this.ct_coll.Legends.Add(legend2);
-            this.ct_coll.Location = new System.Drawing.Point(709, 83);
+            chartArea1.Name = "ChartArea1";
+            this.ct_coll.ChartAreas.Add(chartArea1);
+            legend1.Enabled = false;
+            legend1.Name = "Legend1";
+            this.ct_coll.Legends.Add(legend1);
+            this.ct_coll.Location = new System.Drawing.Point(704, 0);
+            this.ct_coll.Margin = new System.Windows.Forms.Padding(2);
             this.ct_coll.Name = "ct_coll";
             this.ct_coll.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None;
-            series2.ChartArea = "ChartArea1";
-            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
-            series2.IsXValueIndexed = true;
-            series2.Label = "#PERCENT#VALX :#VAL";
-            series2.Legend = "Legend1";
-            series2.LegendText = "#VALX";
-            series2.Name = "Series1";
-            this.ct_coll.Series.Add(series2);
-            this.ct_coll.Size = new System.Drawing.Size(394, 398);
+            series1.ChartArea = "ChartArea1";
+            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
+            series1.IsXValueIndexed = true;
+            series1.Label = "#PERCENT#VALX :#VAL";
+            series1.Legend = "Legend1";
+            series1.LegendText = "#VALX";
+            series1.Name = "Series1";
+            this.ct_coll.Series.Add(series1);
+            this.ct_coll.Size = new System.Drawing.Size(214, 173);
             this.ct_coll.TabIndex = 5;
             this.ct_coll.Text = "chart1";
             // 
+            // paintpanel
+            // 
+            this.paintpanel.Location = new System.Drawing.Point(46, 210);
+            this.paintpanel.Name = "paintpanel";
+            this.paintpanel.Size = new System.Drawing.Size(816, 335);
+            this.paintpanel.TabIndex = 13;
+            this.paintpanel.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
+            // 
+            // enterTextBox2
+            // 
+            this.enterTextBox2.AllPower = null;
+            this.enterTextBox2.BackColor = System.Drawing.Color.White;
+            this.enterTextBox2.ID = null;
+            this.enterTextBox2.Location = new System.Drawing.Point(273, 133);
+            this.enterTextBox2.Name = "enterTextBox2";
+            this.enterTextBox2.Power = null;
+            this.enterTextBox2.Size = new System.Drawing.Size(196, 21);
+            this.enterTextBox2.Str = null;
+            this.enterTextBox2.Str1 = null;
+            this.enterTextBox2.Str2 = null;
+            this.enterTextBox2.TabIndex = 16;
+            this.enterTextBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.enterTextBox2_KeyDown);
+            // 
+            // valueLabel1
+            // 
+            this.valueLabel1.AutoSize = true;
+            this.valueLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.valueLabel1.Location = new System.Drawing.Point(271, 170);
+            this.valueLabel1.Name = "valueLabel1";
+            this.valueLabel1.Size = new System.Drawing.Size(0, 21);
+            this.valueLabel1.TabIndex = 14;
+            this.valueLabel1.TextChanged += new System.EventHandler(this.valueLabel1_TextChanged);
+            // 
+            // normalButton2
+            // 
+            this.normalButton2.AllPower = null;
+            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
+            this.normalButton2.Image = null;
+            this.normalButton2.IsShowBorder = true;
+            this.normalButton2.Location = new System.Drawing.Point(273, 91);
+            this.normalButton2.Margin = new System.Windows.Forms.Padding(2);
+            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
+            this.normalButton2.Name = "normalButton2";
+            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
+            this.normalButton2.Power = null;
+            this.normalButton2.Size = new System.Drawing.Size(118, 22);
+            this.normalButton2.TabIndex = 12;
+            this.normalButton2.Text = "分配MAC地址和BT地址";
+            this.normalButton2.UseVisualStyleBackColor = false;
+            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click_1);
+            // 
+            // normalButton3
+            // 
+            this.normalButton3.AllPower = null;
+            this.normalButton3.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton3.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.DownImage")));
+            this.normalButton3.Image = null;
+            this.normalButton3.IsShowBorder = true;
+            this.normalButton3.Location = new System.Drawing.Point(445, 33);
+            this.normalButton3.Margin = new System.Windows.Forms.Padding(2);
+            this.normalButton3.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.MoveImage")));
+            this.normalButton3.Name = "normalButton3";
+            this.normalButton3.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.NormalImage")));
+            this.normalButton3.Power = null;
+            this.normalButton3.Size = new System.Drawing.Size(118, 22);
+            this.normalButton3.TabIndex = 11;
+            this.normalButton3.Text = "分配IMEI地址信息";
+            this.normalButton3.UseVisualStyleBackColor = false;
+            this.normalButton3.Click += new System.EventHandler(this.normalButton3_Click);
+            // 
             // 测试GetSNALL
             // 
             this.测试GetSNALL.AllPower = null;
@@ -98,12 +173,13 @@
             this.测试GetSNALL.DownImage = ((System.Drawing.Image)(resources.GetObject("测试GetSNALL.DownImage")));
             this.测试GetSNALL.Image = null;
             this.测试GetSNALL.IsShowBorder = true;
-            this.测试GetSNALL.Location = new System.Drawing.Point(362, 225);
+            this.测试GetSNALL.Location = new System.Drawing.Point(589, 44);
+            this.测试GetSNALL.Margin = new System.Windows.Forms.Padding(2);
             this.测试GetSNALL.MoveImage = ((System.Drawing.Image)(resources.GetObject("测试GetSNALL.MoveImage")));
             this.测试GetSNALL.Name = "测试GetSNALL";
             this.测试GetSNALL.NormalImage = ((System.Drawing.Image)(resources.GetObject("测试GetSNALL.NormalImage")));
             this.测试GetSNALL.Power = null;
-            this.测试GetSNALL.Size = new System.Drawing.Size(132, 28);
+            this.测试GetSNALL.Size = new System.Drawing.Size(99, 22);
             this.测试GetSNALL.TabIndex = 10;
             this.测试GetSNALL.Text = "测试GetSNALL";
             this.测试GetSNALL.UseVisualStyleBackColor = false;
@@ -112,10 +188,11 @@
             // TestDGV
             // 
             this.TestDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.TestDGV.Location = new System.Drawing.Point(45, 131);
+            this.TestDGV.Location = new System.Drawing.Point(34, 105);
+            this.TestDGV.Margin = new System.Windows.Forms.Padding(2);
             this.TestDGV.Name = "TestDGV";
             this.TestDGV.RowTemplate.Height = 27;
-            this.TestDGV.Size = new System.Drawing.Size(240, 150);
+            this.TestDGV.Size = new System.Drawing.Size(154, 86);
             this.TestDGV.TabIndex = 9;
             // 
             // numOnlyTextBox1
@@ -123,11 +200,12 @@
             this.numOnlyTextBox1.AllPower = null;
             this.numOnlyTextBox1.BackColor = System.Drawing.Color.White;
             this.numOnlyTextBox1.ID = null;
-            this.numOnlyTextBox1.Location = new System.Drawing.Point(324, 58);
+            this.numOnlyTextBox1.Location = new System.Drawing.Point(243, 46);
+            this.numOnlyTextBox1.Margin = new System.Windows.Forms.Padding(2);
             this.numOnlyTextBox1.Name = "numOnlyTextBox1";
             this.numOnlyTextBox1.Negative = false;
             this.numOnlyTextBox1.Power = null;
-            this.numOnlyTextBox1.Size = new System.Drawing.Size(196, 25);
+            this.numOnlyTextBox1.Size = new System.Drawing.Size(148, 21);
             this.numOnlyTextBox1.Str = null;
             this.numOnlyTextBox1.Str1 = null;
             this.numOnlyTextBox1.Str2 = null;
@@ -137,54 +215,21 @@
             // 
             this.blurSearch1.Field = null;
             this.blurSearch1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.blurSearch1.Location = new System.Drawing.Point(45, 58);
-            this.blurSearch1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.blurSearch1.Location = new System.Drawing.Point(34, 46);
+            this.blurSearch1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.blurSearch1.Name = "blurSearch1";
-            this.blurSearch1.Size = new System.Drawing.Size(205, 34);
+            this.blurSearch1.Size = new System.Drawing.Size(154, 29);
             this.blurSearch1.TabIndex = 0;
             this.blurSearch1.TableName = null;
             // 
-            // normalButton3
-            // 
-            this.normalButton3.AllPower = null;
-            this.normalButton3.BackColor = System.Drawing.Color.Transparent;
-            this.normalButton3.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.DownImage")));
-            this.normalButton3.Image = null;
-            this.normalButton3.IsShowBorder = true;
-            this.normalButton3.Location = new System.Drawing.Point(362, 311);
-            this.normalButton3.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.MoveImage")));
-            this.normalButton3.Name = "normalButton3";
-            this.normalButton3.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.NormalImage")));
-            this.normalButton3.Power = null;
-            this.normalButton3.Size = new System.Drawing.Size(158, 28);
-            this.normalButton3.TabIndex = 11;
-            this.normalButton3.Text = "分配IMEI地址信息";
-            this.normalButton3.UseVisualStyleBackColor = false;
-            this.normalButton3.Click += new System.EventHandler(this.normalButton3_Click);
-            // 
-            // normalButton2
-            // 
-            this.normalButton2.AllPower = null;
-            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
-            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
-            this.normalButton2.Image = null;
-            this.normalButton2.IsShowBorder = true;
-            this.normalButton2.Location = new System.Drawing.Point(362, 381);
-            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
-            this.normalButton2.Name = "normalButton2";
-            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
-            this.normalButton2.Power = null;
-            this.normalButton2.Size = new System.Drawing.Size(158, 28);
-            this.normalButton2.TabIndex = 12;
-            this.normalButton2.Text = "分配MAC地址和BT地址";
-            this.normalButton2.UseVisualStyleBackColor = false;
-            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click_1);
-            // 
             // Form1
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1239, 737);
+            this.ClientSize = new System.Drawing.Size(929, 590);
+            this.Controls.Add(this.enterTextBox2);
+            this.Controls.Add(this.valueLabel1);
+            this.Controls.Add(this.paintpanel);
             this.Controls.Add(this.normalButton2);
             this.Controls.Add(this.normalButton3);
             this.Controls.Add(this.测试GetSNALL);
@@ -192,7 +237,6 @@
             this.Controls.Add(this.numOnlyTextBox1);
             this.Controls.Add(this.ct_coll);
             this.Controls.Add(this.blurSearch1);
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Form1";
             this.Tag = "123123";
             this.Text = "Form1";
@@ -218,5 +262,8 @@
         private CustomControl.ButtonUtil.NormalButton 测试GetSNALL;
         private CustomControl.ButtonUtil.NormalButton normalButton3;
         private CustomControl.ButtonUtil.NormalButton normalButton2;
+        private System.Windows.Forms.Panel paintpanel;
+        private CustomControl.ValueLabel.ValueLabel valueLabel1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox2;
     }
 }

+ 71 - 0
UAS-MES/Form1.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Runtime.InteropServices;
 using System.Text;
 using System.Text.RegularExpressions;
@@ -17,6 +18,17 @@ namespace UAS_MES
 {
     public partial class Form1 : Form
     {
+        DataHelper dh;
+        DataTable dt;
+        LogStringBuilder sql = new LogStringBuilder();
+        //经过的步骤
+        string PastStep = "";
+        //拆分后的经过的步骤
+        Dictionary<int, string> Step;
+        //屏幕高度
+        int ScreenWidth;
+        //屏幕宽度
+        int ScreenHeight;
         public Form1()
         {
             InitializeComponent();
@@ -45,6 +57,23 @@ namespace UAS_MES
             blurSearch1.Field = "ma_code";
             DataHelper dh = new DataHelper();
             ViewChart((DataTable)dh.ExecuteSql("select nvl(ms_nextstepcode ,'已完工')ms_nextstepcode ,count(*) from  makeserial left join makecraftdetail on ms_makecode=mcd_macode  and ms_nextstepcode =mcd_nextstepcode where ms_makecode='MB17050022' group by ms_nextstepcode", "select"), "TExt");
+            dt = (DataTable)dh.ExecuteSql("select ma_salecode,MA_STATUS from make where MA_SALECODE = 'TB17040014'", "select");
+            Step = new Dictionary<int, string>();
+            for (int i = 0; i < dt.Rows.Count + 2; i++)
+            {
+                if (i == 0)
+                {
+                    Step.Add(i, "开始");
+                }
+                else if (i == dt.Rows.Count + 1)
+                {
+                    Step.Add(i, "结束");
+                }
+                else {
+                    Step.Add(i, dt.Rows[i - 1]["MA_STATUS"].ToString());
+                }    
+            } 
+
         }
 
         private void ViewChart(DataTable _dt, string _title)
@@ -152,5 +181,47 @@ namespace UAS_MES
             Console.WriteLine(Code3);
             Console.WriteLine(ErrorMessage);
         }
+
+        private void panel1_Paint(object sender, PaintEventArgs e)
+        {
+            int rowspaint = 5;
+            //画板工具
+            Graphics g = e.Graphics;
+            //矩形
+            Rectangle r = new Rectangle(0,0,40,40);
+            r.Width = paintpanel.Width / 10;
+            r.Height = paintpanel.Height / 8;
+            int x = 40;
+            int y = paintpanel.Height / 8;
+            Pen p = new Pen(Color.Green, 15);
+            p.StartCap = LineCap.Triangle;
+            p.EndCap = LineCap.ArrowAnchor;
+
+            for (int i = 0; i < 2; i++) {
+                r.Location = new Point(x, y);
+                g.FillRectangle(Brushes.Green, r);
+                x += r.Width*2;
+            }
+
+            g.DrawLine(p, x + 10, y+r.Height/2 , x + this.Width / 5, y + r.Height / 2 );
+
+
+
+        }
+
+ 
+
+        private void enterTextBox2_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                valueLabel1.Text = enterTextBox2.Text.ToString();
+            }
+        }
+
+        private void valueLabel1_TextChanged(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 6 - 6
UAS-MES/Form1.resx

@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="测试GetSNALL.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +130,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="测试GetSNALL.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -143,7 +143,7 @@
         gg==
 </value>
   </data>
-  <data name="测试GetSNALL.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -194,7 +194,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton2.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="测试GetSNALL.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -206,7 +206,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton2.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="测试GetSNALL.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -219,7 +219,7 @@
         gg==
 </value>
   </data>
-  <data name="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="测试GetSNALL.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 66 - 80
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -54,7 +54,6 @@
             this.AutoBadCode = new System.Windows.Forms.CheckBox();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
-            this.pr_detail_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
@@ -76,12 +75,12 @@
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.panel1 = new System.Windows.Forms.Panel();
             this.ob_checkno = new System.Windows.Forms.Label();
-            this.ob_checkno_label = new System.Windows.Forms.Label();
             this.SendCheck = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ob_batchqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.ob_nowcheckqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
@@ -102,7 +101,7 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 5);
+            this.label1.Location = new System.Drawing.Point(13, 5);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
@@ -113,7 +112,7 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(386, 263);
+            this.bc_remark_label.Location = new System.Drawing.Point(383, 263);
             this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(92, 27);
@@ -124,7 +123,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(288, 659);
+            this.ms_sncode_label.Location = new System.Drawing.Point(285, 659);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
@@ -135,7 +134,7 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_groupcode_label.Location = new System.Drawing.Point(7, 262);
+            this.bc_groupcode_label.Location = new System.Drawing.Point(4, 262);
             this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
             this.bc_groupcode_label.Size = new System.Drawing.Size(92, 27);
@@ -147,7 +146,7 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(7, 232);
+            this.label2.Location = new System.Drawing.Point(4, 225);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
@@ -158,7 +157,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(7, 312);
+            this.label3.Location = new System.Drawing.Point(4, 312);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
@@ -170,7 +169,7 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-            this.GoodProduct.Location = new System.Drawing.Point(11, 655);
+            this.GoodProduct.Location = new System.Drawing.Point(8, 655);
             this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(83, 35);
@@ -185,7 +184,7 @@
             this.Reject.AutoSize = true;
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-            this.Reject.Location = new System.Drawing.Point(121, 655);
+            this.Reject.Location = new System.Drawing.Point(118, 655);
             this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(107, 35);
@@ -203,7 +202,7 @@
             this.columnHeader1,
             this.columnHeader2});
             this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WaitRejectList.Location = new System.Drawing.Point(9, 389);
+            this.WaitRejectList.Location = new System.Drawing.Point(6, 389);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.WaitRejectList.Name = "WaitRejectList";
             this.WaitRejectList.Size = new System.Drawing.Size(353, 256);
@@ -239,7 +238,7 @@
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(7, 358);
+            this.label4.Location = new System.Drawing.Point(4, 358);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(92, 27);
@@ -251,7 +250,7 @@
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(491, 358);
+            this.label5.Location = new System.Drawing.Point(488, 358);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(92, 27);
@@ -262,7 +261,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(858, 232);
+            this.label6.Location = new System.Drawing.Point(855, 225);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(92, 27);
@@ -278,7 +277,7 @@
             this.columnHeader7,
             this.columnHeader8});
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChoosedRejectList.Location = new System.Drawing.Point(494, 389);
+            this.ChoosedRejectList.Location = new System.Drawing.Point(491, 389);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
             this.ChoosedRejectList.Size = new System.Drawing.Size(353, 256);
@@ -313,7 +312,7 @@
             // 
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(105, 361);
+            this.AutoBadCode.Location = new System.Drawing.Point(208, 361);
             this.AutoBadCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AutoBadCode.Name = "AutoBadCode";
             this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
@@ -325,7 +324,7 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(7, 109);
+            this.ma_qty_label.Location = new System.Drawing.Point(383, 60);
             this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty_label.Name = "ma_qty_label";
             this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
@@ -336,29 +335,18 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(427, 59);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(4, 123);
             this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
             this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.ma_prodcode_label.TabIndex = 7;
             this.ma_prodcode_label.Text = "产品编号";
             // 
-            // pr_detail_label
-            // 
-            this.pr_detail_label.AutoSize = true;
-            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(769, 59);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
-            this.pr_detail_label.TabIndex = 6;
-            this.pr_detail_label.Text = "产品名称";
-            // 
             // ms_makecode_label
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(7, 59);
+            this.ms_makecode_label.Location = new System.Drawing.Point(4, 59);
             this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
@@ -369,7 +357,7 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(427, 109);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(209, 16);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
@@ -380,7 +368,7 @@
             // 
             this.mc_restqty_label.AutoSize = true;
             this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mc_restqty_label.Location = new System.Drawing.Point(769, 109);
+            this.mc_restqty_label.Location = new System.Drawing.Point(22, 16);
             this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Size = new System.Drawing.Size(92, 27);
@@ -394,7 +382,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(685, 657);
+            this.Save.Location = new System.Drawing.Point(682, 657);
             this.Save.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
@@ -412,7 +400,7 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(128, 312);
+            this.bc_code.Location = new System.Drawing.Point(125, 312);
             this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
@@ -430,13 +418,13 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(127, 59);
+            this.ma_code.Location = new System.Drawing.Point(124, 59);
             this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(207, 26);
+            this.ma_code.Size = new System.Drawing.Size(157, 26);
             this.ma_code.TabIndex = 67;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
@@ -447,7 +435,7 @@
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(341, 60);
+            this.LockMakeCode.Location = new System.Drawing.Point(298, 61);
             this.LockMakeCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
@@ -459,7 +447,7 @@
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(892, 109);
+            this.mcd_remainqty.Location = new System.Drawing.Point(145, 16);
             this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
@@ -470,7 +458,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(892, 59);
+            this.pr_detail.Location = new System.Drawing.Point(506, 123);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
@@ -480,7 +468,7 @@
             // 
             this.ma_qty.AutoSize = true;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(129, 109);
+            this.ma_qty.Location = new System.Drawing.Point(505, 60);
             this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
@@ -490,7 +478,7 @@
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(549, 109);
+            this.mcd_inqty.Location = new System.Drawing.Point(331, 16);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
@@ -501,7 +489,7 @@
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(549, 59);
+            this.ma_prodcode.Location = new System.Drawing.Point(126, 123);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
@@ -511,7 +499,7 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(862, 262);
+            this.OperateResult.Location = new System.Drawing.Point(859, 262);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(275, 383);
@@ -525,7 +513,7 @@
             this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
-            this.CleanInfo.Location = new System.Drawing.Point(960, 657);
+            this.CleanInfo.Location = new System.Drawing.Point(957, 657);
             this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
@@ -540,7 +528,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(393, 470);
+            this.ChooseedReject.Location = new System.Drawing.Point(390, 470);
             this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
@@ -551,7 +539,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(393, 549);
+            this.WaitReject.Location = new System.Drawing.Point(390, 549);
             this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(67, 29);
@@ -564,7 +552,7 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(497, 264);
+            this.bc_remark.Location = new System.Drawing.Point(494, 264);
             this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
@@ -579,7 +567,7 @@
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-            this.bc_groupcode.Location = new System.Drawing.Point(128, 264);
+            this.bc_groupcode.Location = new System.Drawing.Point(125, 264);
             this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
             this.bc_groupcode.Size = new System.Drawing.Size(234, 26);
@@ -592,7 +580,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(403, 659);
+            this.ms_sncode.Location = new System.Drawing.Point(400, 659);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
@@ -608,15 +596,18 @@
             // 
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel1.Controls.Add(this.ob_checkno);
-            this.panel1.Controls.Add(this.ob_checkno_label);
             this.panel1.Controls.Add(this.SendCheck);
             this.panel1.Controls.Add(this.ob_batchqty);
             this.panel1.Controls.Add(this.ob_batchqty_label);
             this.panel1.Controls.Add(this.ob_nowcheckqty);
             this.panel1.Controls.Add(this.ob_nowcheckqty_label);
-            this.panel1.Location = new System.Drawing.Point(12, 157);
+            this.panel1.Controls.Add(this.mcd_remainqty);
+            this.panel1.Controls.Add(this.mc_restqty_label);
+            this.panel1.Controls.Add(this.mcd_inqty);
+            this.panel1.Controls.Add(this.mcd_inqty_label);
+            this.panel1.Location = new System.Drawing.Point(716, 57);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1125, 60);
+            this.panel1.Size = new System.Drawing.Size(419, 158);
             this.panel1.TabIndex = 71;
             // 
             // ob_checkno
@@ -624,26 +615,15 @@
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_checkno.ForeColor = System.Drawing.Color.Black;
-            this.ob_checkno.Location = new System.Drawing.Point(137, 17);
+            this.ob_checkno.Location = new System.Drawing.Point(380, 113);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 27);
             this.ob_checkno.TabIndex = 76;
             this.ob_checkno.Tag = "ob_checkno";
+            this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
-            // ob_checkno_label
-            // 
-            this.ob_checkno_label.AutoSize = true;
-            this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno_label.ForeColor = System.Drawing.Color.Black;
-            this.ob_checkno_label.Location = new System.Drawing.Point(24, 17);
-            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_checkno_label.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(92, 27);
-            this.ob_checkno_label.TabIndex = 72;
-            this.ob_checkno_label.Text = "抽检批号";
-            // 
             // SendCheck
             // 
             this.SendCheck.AllPower = null;
@@ -652,7 +632,7 @@
             this.SendCheck.Enabled = false;
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(975, 16);
+            this.SendCheck.Location = new System.Drawing.Point(305, 113);
             this.SendCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
             this.SendCheck.Name = "SendCheck";
@@ -669,7 +649,7 @@
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(779, 17);
+            this.ob_batchqty.Location = new System.Drawing.Point(145, 65);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 27);
@@ -681,19 +661,19 @@
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty_label.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty_label.Location = new System.Drawing.Point(646, 17);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(22, 65);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(112, 27);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(92, 27);
             this.ob_batchqty_label.TabIndex = 74;
-            this.ob_batchqty_label.Text = "抽检批数";
+            this.ob_batchqty_label.Text = "抽检批数";
             // 
             // ob_nowcheckqty
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(430, 17);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(331, 65);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 27);
@@ -705,12 +685,23 @@
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_nowcheckqty_label.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(286, 17);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(209, 65);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(112, 27);
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(92, 27);
             this.ob_nowcheckqty_label.TabIndex = 72;
-            this.ob_nowcheckqty_label.Text = "已采集数量";
+            this.ob_nowcheckqty_label.Text = "当前批数";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(383, 123);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.TabIndex = 6;
+            this.pr_detail_label.Text = "产品名称";
             // 
             // Make_TestCollection
             // 
@@ -725,10 +716,8 @@
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ma_qty);
-            this.Controls.Add(this.mcd_inqty);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.ChoosedRejectList);
@@ -743,11 +732,9 @@
             this.Controls.Add(this.Reject);
             this.Controls.Add(this.GoodProduct);
             this.Controls.Add(this.label3);
-            this.Controls.Add(this.mc_restqty_label);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.bc_groupcode);
             this.Controls.Add(this.bc_remark_label);
-            this.Controls.Add(this.mcd_inqty_label);
             this.Controls.Add(this.ms_sncode_label);
             this.Controls.Add(this.bc_groupcode_label);
             this.Controls.Add(this.ms_sncode);
@@ -774,7 +761,6 @@
 
         #endregion
         private System.Windows.Forms.Label ma_prodcode_label;
-        private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private System.Windows.Forms.Label mcd_inqty_label;
         private System.Windows.Forms.Label ma_qty_label;
@@ -824,7 +810,7 @@
         private CustomControl.ValueLabel.ValueLabel ob_nowcheckqty;
         private System.Windows.Forms.Label ob_nowcheckqty_label;
         private CustomControl.ButtonUtil.NormalButton SendCheck;
-        private System.Windows.Forms.Label ob_checkno_label;
         private System.Windows.Forms.Label ob_checkno;
+        private System.Windows.Forms.Label pr_detail_label;
     }
 }

+ 12 - 4
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -481,16 +481,23 @@ namespace UAS_MES.Make
         {
             sql.Clear();
             string condition = "";
-            if (int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text) + 1 == int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text))
+            int nowcheckqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
+            int batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+            if (nowcheckqty + 1 == batchqty)
             {
-                condition = "and ob_status='UNCHECK' and ob_checkno='" + ob_checkno.Text+ "'";
+                condition = "and ob_status='UNCHECK' and ob_checkno='" + ob_checkno.Text + "'";
             }
-            else {
+            else
+            {
+                if (nowcheckqty > batchqty)
+                {
+                    OperateResult.AppendText(">>已采集批数已超过抽检批数\n", Color.Red);
+                }
                 condition = "and ob_status='ENTERING' ";
             }
             sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
             sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + ma_prodcode.Text + "' and ");
-            sql.Append("ob_stepcode='" + User.CurrentStepCode + "' "+condition);
+            sql.Append("ob_stepcode='" + User.CurrentStepCode + "' " + condition);
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.SetFormValue(this.Controls, dt);
             if (ob_batchqty.Text != "")
@@ -531,6 +538,7 @@ namespace UAS_MES.Make
             ob_batchqty.Text = "";
             SendCheck.Enabled = false;
             ms_sncode.Focus();
+            LogicHandler.InsertMakeProcess(LastSncode, ma_code.Text, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
         }
 
         private void ob_checkno_TextChanged(object sender, EventArgs e)

+ 1 - 1
UAS-MES/PublicMethod/AutoSizeFormClass.cs

@@ -26,7 +26,7 @@ namespace UAS_MES.PublicMethod
         public void controllInitializeSize(Control mForm)
         {
             controlRect cR;
-            mForm.Width = Screen.PrimaryScreen.WorkingArea.Width - SystemInf.NavWidth;
+            mForm.Width = Screen.PrimaryScreen.WorkingArea.Width - SystemInf.NavWidth-5;
             mForm.Height = Screen.PrimaryScreen.WorkingArea.Height - 100;
             cR.Left = mForm.Left; cR.Top = mForm.Top; cR.Width = mForm.Width; cR.Height = mForm.Height;
             oldCtrl.Add(cR);//第一个为"窗体本身",只加入一次即可

+ 3 - 0
UAS-MES/UAS-MES.csproj

@@ -882,6 +882,9 @@
     <EmbeddedResource Include="CustomControl\TimePickerWithCombo\TimePickerWithCombo.resx">
       <DependentUpon>TimePickerWithCombo.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\ValueLabel\ValueLabel.resx">
+      <DependentUpon>ValueLabel.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="DbFind.resx">
       <DependentUpon>DbFind.cs</DependentUpon>
     </EmbeddedResource>