Browse Source

valueLabel字符至一定长度自动换行

Hcsy 7 years ago
parent
commit
fbe08ebad4

+ 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

+ 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>