Browse Source

添加线程Xml文件

wb_han 5 years ago
parent
commit
73b88e23dd

+ 6 - 1
HOZProject/App.config

@@ -3,9 +3,14 @@
     <startup> 
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
     </startup>
-
     <appSettings>
       <add key="Firm" value="厂商A,厂商B,厂商C,厂商D"/>
       <add key="Sample_Type" value="类型A,类型B,类型C"/>
+      <add key="WPZD" value="100,200,300"/>
+      <add key="WPZF" value="100,200,300"/>
+      <add key="WQGD" value="100,200,300"/>
+      <add key="WQGF" value="100,200,300"/>
+      <add key="WLZ" value="类型A,类型B,类型C"/>
+      <add key="ConfigFilePath" value="E:/ConfigFile"/>
     </appSettings>
 </configuration>

+ 15 - 13
HOZProject/FormHOZMain.Designer.cs

@@ -32,12 +32,12 @@
             this.plFill = new System.Windows.Forms.Panel();
             this.plProcess = new System.Windows.Forms.Panel();
             this.listmsg = new System.Windows.Forms.ListBox();
+            this.pbImage = new System.Windows.Forms.PictureBox();
             this.plSEM = new System.Windows.Forms.Panel();
             this.plLeft = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.plLeftContent = new System.Windows.Forms.Panel();
             this.plTop = new System.Windows.Forms.Panel();
-            this.pbImage = new System.Windows.Forms.PictureBox();
             this.pbStop = new System.Windows.Forms.PictureBox();
             this.pbPause = new System.Windows.Forms.PictureBox();
             this.pbStart = new System.Windows.Forms.PictureBox();
@@ -52,9 +52,9 @@
             this.pbOpen = new System.Windows.Forms.PictureBox();
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             this.plLeft.SuspendLayout();
             this.plTop.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).BeginInit();
@@ -119,6 +119,15 @@
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
+            // pbImage
+            // 
+            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pbImage.Location = new System.Drawing.Point(0, 0);
+            this.pbImage.Name = "pbImage";
+            this.pbImage.Size = new System.Drawing.Size(894, 568);
+            this.pbImage.TabIndex = 20;
+            this.pbImage.TabStop = false;
+            // 
             // plSEM
             // 
             this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -182,15 +191,6 @@
             this.plTop.Size = new System.Drawing.Size(1000, 80);
             this.plTop.TabIndex = 3;
             // 
-            // pbImage
-            // 
-            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pbImage.Location = new System.Drawing.Point(0, 0);
-            this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(894, 568);
-            this.pbImage.TabIndex = 20;
-            this.pbImage.TabStop = false;
-            // 
             // pbStop
             // 
             this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
@@ -229,7 +229,7 @@
             // pbMax
             // 
             this.pbMax.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Min_Gray;
+            this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Max_Gray;
             this.pbMax.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbMax.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbMax.Location = new System.Drawing.Point(935, 0);
@@ -238,6 +238,8 @@
             this.pbMax.TabIndex = 7;
             this.pbMax.TabStop = false;
             this.pbMax.Click += new System.EventHandler(this.pbMax_Click);
+            this.pbMax.MouseEnter += new System.EventHandler(this.pbMax_MouseEnter);
+            this.pbMax.MouseLeave += new System.EventHandler(this.pbMax_MouseLeave);
             // 
             // pbMin
             // 
@@ -357,10 +359,10 @@
             this.Load += new System.EventHandler(this.FormHOZMain_Load);
             this.plMain.ResumeLayout(false);
             this.plFill.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             this.plLeft.ResumeLayout(false);
             this.plLeft.PerformLayout();
             this.plTop.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).EndInit();

+ 14 - 1
HOZProject/FormHOZMain.cs

@@ -112,6 +112,7 @@ namespace HOZProject
             plTop.Click += new EventHandler(FormHOZMain_Click);
             plLeft.Click += new EventHandler(FormHOZMain_Click);
             plLeftContent.Click += new EventHandler(FormHOZMain_Click);
+            pbImage.Click += new EventHandler(FormHOZMain_Click);
 
             //加载窗口移动事件
             this.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
@@ -177,6 +178,16 @@ namespace HOZProject
             this.pbMin.BackgroundImage = global::HOZProject.Properties.Resources.Min_Gray;
         }
 
+        private void pbMax_MouseEnter(object sender, EventArgs e)
+        {
+            this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Max_Blue;
+        }
+
+        private void pbMax_MouseLeave(object sender, EventArgs e)
+        {
+            this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Max_Gray;
+        }
+
         private void pbClose_MouseEnter(object sender, EventArgs e)
         {
             this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Red;
@@ -254,7 +265,7 @@ namespace HOZProject
             if (uControl_Init == null)
             {
                 uControl_Init = new UControl_Init(this);
-                uControl_Init.Reloadconfig();
+                uControl_Init.ReloadConfig();
             }
             if (m_FormInit == null)
             {
@@ -427,5 +438,7 @@ namespace HOZProject
                 uControl_Init.ReadConfigInfo();
             }
         }
+
+        
     }
 }

+ 20 - 0
HOZProject/Properties/Resources.Designer.cs

@@ -210,6 +210,26 @@ namespace HOZProject.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Max_Blue {
+            get {
+                object obj = ResourceManager.GetObject("Max_Blue", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Max_Gray {
+            get {
+                object obj = ResourceManager.GetObject("Max_Gray", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 6 - 0
HOZProject/Properties/Resources.resx

@@ -199,4 +199,10 @@
   <data name="ImportConfigFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\ImportConfigFile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="Max_Blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Max_Blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Max_Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Max_Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 6 - 0
HOZProject/UnitControl.csproj

@@ -269,5 +269,11 @@
   <ItemGroup>
     <None Include="Resources\ImportConfigFile.png" />
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\Max_Blue.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\Max_Gray.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 8 - 8
HOZProject/UserControls/UControl_CutHole.cs

@@ -64,14 +64,14 @@ namespace HOZProject
             //UCTimeLine uControl_Process = new UCTimeLine();
             FormHOZMainObject.plProcess.Width = uControl_ParaInfo.Width;
             FormHOZMainObject.plProcess.Height = uControl_ParaInfo.Height;
-            if ((this.Location.Y + uControl_ParaInfo.Height) > FormHOZMainObject.Height)
-            {
-                uControl_ParaInfo.Location = new Point(this.Left, this.Bottom - this.Top);
-            }
-            else
-            {
-                uControl_ParaInfo.Location = new Point(this.Location.X, this.Location.Y);
-            }
+            //if ((this.Location.Y + uControl_ParaInfo.Height) > FormHOZMainObject.Height)
+            //{
+            //    uControl_ParaInfo.Location = new Point(this.Left, this.Bottom - this.Top);
+            //}
+            //else
+            //{
+            //    uControl_ParaInfo.Location = new Point(this.Location.X, this.Location.Y);
+            //}
             List<CutHole> cutHoleList = FormHOZMainObject.m_MeasureFile.ListCutHole;
             foreach (CutHole cutHoleItem in cutHoleList)
             {

+ 165 - 57
HOZProject/UserControls/UControl_Init.Designer.cs

@@ -29,7 +29,6 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UControl_Init));
-            this.btnClose = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.tbCutHoleFilePath = new System.Windows.Forms.TextBox();
@@ -58,37 +57,39 @@
             this.label61 = new System.Windows.Forms.Label();
             this.chkWPT = new System.Windows.Forms.CheckBox();
             this.btnCreateConfig = new System.Windows.Forms.Button();
-            this.btnReadConfig = new System.Windows.Forms.Button();
             this.txtWFIBF = new System.Windows.Forms.TextBox();
+            this.pbDelWLZ = new System.Windows.Forms.PictureBox();
+            this.pbDelWQGD = new System.Windows.Forms.PictureBox();
+            this.pbWQGFDel = new System.Windows.Forms.PictureBox();
+            this.pbDelWPZD = new System.Windows.Forms.PictureBox();
+            this.pbDelWPZF = new System.Windows.Forms.PictureBox();
+            this.pbDelWYP = new System.Windows.Forms.PictureBox();
+            this.pbDelWCS = new System.Windows.Forms.PictureBox();
             this.pbCutHoleAuto = new System.Windows.Forms.PictureBox();
             this.pbFIBTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbPTTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbCutHoleFile = new System.Windows.Forms.PictureBox();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWPZD)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWPZF)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWYP)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWCS)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleAuto)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             // 
-            // btnClose
-            // 
-            this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.btnClose.ForeColor = System.Drawing.Color.Black;
-            this.btnClose.Location = new System.Drawing.Point(541, 0);
-            this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(35, 33);
-            this.btnClose.TabIndex = 3;
-            this.btnClose.Text = "X";
-            this.btnClose.UseVisualStyleBackColor = true;
-            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
-            // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
-            this.label1.ForeColor = System.Drawing.Color.Black;
+            this.label1.ForeColor = System.Drawing.Color.LightGray;
             this.label1.Location = new System.Drawing.Point(15, 9);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(77, 14);
@@ -97,8 +98,8 @@
             // 
             // panel1
             // 
-            this.panel1.BackColor = System.Drawing.Color.White;
-            this.panel1.Controls.Add(this.btnClose);
+            this.panel1.BackColor = System.Drawing.Color.Black;
+            this.panel1.Controls.Add(this.pbClose);
             this.panel1.Controls.Add(this.label1);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
@@ -140,13 +141,14 @@
             this.chkManul.AutoSize = true;
             this.chkManul.Font = new System.Drawing.Font("宋体", 10F);
             this.chkManul.ForeColor = System.Drawing.Color.LightGray;
-            this.chkManul.Location = new System.Drawing.Point(106, 181);
+            this.chkManul.Location = new System.Drawing.Point(322, 182);
             this.chkManul.Margin = new System.Windows.Forms.Padding(2);
             this.chkManul.Name = "chkManul";
             this.chkManul.Size = new System.Drawing.Size(82, 18);
             this.chkManul.TabIndex = 15;
             this.chkManul.Text = "手动对焦";
             this.chkManul.UseVisualStyleBackColor = true;
+            this.chkManul.Visible = false;
             // 
             // label6
             // 
@@ -162,7 +164,6 @@
             // 
             // cbbWPZD
             // 
-            this.cbbWPZD.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbbWPZD.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWPZD.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWPZD.FormattingEnabled = true;
@@ -180,7 +181,6 @@
             // 
             // cbbWPZF
             // 
-            this.cbbWPZF.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbbWPZF.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWPZF.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWPZF.FormattingEnabled = true;
@@ -189,7 +189,7 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWPZF.Location = new System.Drawing.Point(434, 258);
+            this.cbbWPZF.Location = new System.Drawing.Point(408, 258);
             this.cbbWPZF.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWPZF.Name = "cbbWPZF";
             this.cbbWPZF.Size = new System.Drawing.Size(132, 21);
@@ -197,7 +197,6 @@
             // 
             // cbbWQGD
             // 
-            this.cbbWQGD.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbbWQGD.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWQGD.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWQGD.FormattingEnabled = true;
@@ -207,7 +206,7 @@
             "2000",
             "2500",
             "3000"});
-            this.cbbWQGD.Location = new System.Drawing.Point(106, 344);
+            this.cbbWQGD.Location = new System.Drawing.Point(106, 301);
             this.cbbWQGD.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWQGD.Name = "cbbWQGD";
             this.cbbWQGD.Size = new System.Drawing.Size(132, 21);
@@ -215,7 +214,6 @@
             // 
             // cbbWQGF
             // 
-            this.cbbWQGF.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbbWQGF.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWQGF.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWQGF.FormattingEnabled = true;
@@ -224,7 +222,7 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWQGF.Location = new System.Drawing.Point(434, 344);
+            this.cbbWQGF.Location = new System.Drawing.Point(408, 301);
             this.cbbWQGF.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWQGF.Name = "cbbWQGF";
             this.cbbWQGF.Size = new System.Drawing.Size(132, 21);
@@ -232,7 +230,6 @@
             // 
             // cbbWLZ
             // 
-            this.cbbWLZ.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbbWLZ.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWLZ.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWLZ.FormattingEnabled = true;
@@ -241,7 +238,7 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWLZ.Location = new System.Drawing.Point(434, 301);
+            this.cbbWLZ.Location = new System.Drawing.Point(408, 344);
             this.cbbWLZ.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWLZ.Name = "cbbWLZ";
             this.cbbWLZ.Size = new System.Drawing.Size(132, 21);
@@ -256,7 +253,7 @@
             this.cbbWXZ.Items.AddRange(new object[] {
             "截面观测",
             "表面观测"});
-            this.cbbWXZ.Location = new System.Drawing.Point(106, 301);
+            this.cbbWXZ.Location = new System.Drawing.Point(106, 344);
             this.cbbWXZ.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWXZ.Name = "cbbWXZ";
             this.cbbWXZ.Size = new System.Drawing.Size(132, 21);
@@ -267,7 +264,7 @@
             this.cbbWCS.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWCS.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWCS.FormattingEnabled = true;
-            this.cbbWCS.Location = new System.Drawing.Point(433, 215);
+            this.cbbWCS.Location = new System.Drawing.Point(407, 215);
             this.cbbWCS.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWCS.Name = "cbbWCS";
             this.cbbWCS.Size = new System.Drawing.Size(132, 21);
@@ -289,7 +286,7 @@
             this.label58.AutoSize = true;
             this.label58.Font = new System.Drawing.Font("宋体", 10F);
             this.label58.ForeColor = System.Drawing.Color.LightGray;
-            this.label58.Location = new System.Drawing.Point(42, 304);
+            this.label58.Location = new System.Drawing.Point(39, 347);
             this.label58.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label58.Name = "label58";
             this.label58.Size = new System.Drawing.Size(63, 14);
@@ -313,7 +310,7 @@
             this.label54.AutoSize = true;
             this.label54.Font = new System.Drawing.Font("宋体", 10F);
             this.label54.ForeColor = System.Drawing.Color.LightGray;
-            this.label54.Location = new System.Drawing.Point(339, 261);
+            this.label54.Location = new System.Drawing.Point(313, 261);
             this.label54.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label54.Name = "label54";
             this.label54.Size = new System.Drawing.Size(91, 14);
@@ -325,7 +322,7 @@
             this.label46.AutoSize = true;
             this.label46.Font = new System.Drawing.Font("宋体", 10F);
             this.label46.ForeColor = System.Drawing.Color.LightGray;
-            this.label46.Location = new System.Drawing.Point(14, 347);
+            this.label46.Location = new System.Drawing.Point(11, 304);
             this.label46.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label46.Name = "label46";
             this.label46.Size = new System.Drawing.Size(91, 14);
@@ -337,7 +334,7 @@
             this.label42.AutoSize = true;
             this.label42.Font = new System.Drawing.Font("宋体", 10F);
             this.label42.ForeColor = System.Drawing.Color.LightGray;
-            this.label42.Location = new System.Drawing.Point(311, 347);
+            this.label42.Location = new System.Drawing.Point(285, 304);
             this.label42.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label42.Name = "label42";
             this.label42.Size = new System.Drawing.Size(119, 14);
@@ -349,7 +346,7 @@
             this.label38.AutoSize = true;
             this.label38.Font = new System.Drawing.Font("宋体", 10F);
             this.label38.ForeColor = System.Drawing.Color.LightGray;
-            this.label38.Location = new System.Drawing.Point(311, 304);
+            this.label38.Location = new System.Drawing.Point(285, 347);
             this.label38.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label38.Name = "label38";
             this.label38.Size = new System.Drawing.Size(119, 14);
@@ -361,13 +358,14 @@
             this.chkWIsP.AutoSize = true;
             this.chkWIsP.Font = new System.Drawing.Font("宋体", 10F);
             this.chkWIsP.ForeColor = System.Drawing.Color.LightGray;
-            this.chkWIsP.Location = new System.Drawing.Point(304, 181);
+            this.chkWIsP.Location = new System.Drawing.Point(104, 182);
             this.chkWIsP.Margin = new System.Windows.Forms.Padding(2);
             this.chkWIsP.Name = "chkWIsP";
             this.chkWIsP.Size = new System.Drawing.Size(96, 18);
             this.chkWIsP.TabIndex = 85;
             this.chkWIsP.Text = "是否仅拍照";
             this.chkWIsP.UseVisualStyleBackColor = true;
+            this.chkWIsP.CheckedChanged += new System.EventHandler(this.chkWIsP_CheckedChanged);
             // 
             // label48
             // 
@@ -386,7 +384,7 @@
             this.label56.AutoSize = true;
             this.label56.Font = new System.Drawing.Font("宋体", 10F);
             this.label56.ForeColor = System.Drawing.Color.LightGray;
-            this.label56.Location = new System.Drawing.Point(394, 218);
+            this.label56.Location = new System.Drawing.Point(368, 218);
             this.label56.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label56.Name = "label56";
             this.label56.Size = new System.Drawing.Size(35, 14);
@@ -422,7 +420,7 @@
             this.chkWPT.AutoSize = true;
             this.chkWPT.Font = new System.Drawing.Font("宋体", 10F);
             this.chkWPT.ForeColor = System.Drawing.Color.LightGray;
-            this.chkWPT.Location = new System.Drawing.Point(198, 181);
+            this.chkWPT.Location = new System.Drawing.Point(213, 182);
             this.chkWPT.Margin = new System.Windows.Forms.Padding(2);
             this.chkWPT.Name = "chkWPT";
             this.chkWPT.Size = new System.Drawing.Size(96, 18);
@@ -443,20 +441,6 @@
             this.btnCreateConfig.UseVisualStyleBackColor = true;
             this.btnCreateConfig.Click += new System.EventHandler(this.btnCreateConfig_Click);
             // 
-            // btnReadConfig
-            // 
-            this.btnReadConfig.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnReadConfig.ForeColor = System.Drawing.Color.Black;
-            this.btnReadConfig.Location = new System.Drawing.Point(12, 381);
-            this.btnReadConfig.Margin = new System.Windows.Forms.Padding(2);
-            this.btnReadConfig.Name = "btnReadConfig";
-            this.btnReadConfig.Size = new System.Drawing.Size(135, 41);
-            this.btnReadConfig.TabIndex = 101;
-            this.btnReadConfig.Text = "读取配置文件";
-            this.btnReadConfig.UseVisualStyleBackColor = true;
-            this.btnReadConfig.Visible = false;
-            this.btnReadConfig.Click += new System.EventHandler(this.btnReadConfig_Click);
-            // 
             // txtWFIBF
             // 
             this.txtWFIBF.Font = new System.Drawing.Font("宋体", 10F);
@@ -466,6 +450,97 @@
             this.txtWFIBF.Size = new System.Drawing.Size(346, 23);
             this.txtWFIBF.TabIndex = 103;
             // 
+            // pbDelWLZ
+            // 
+            this.pbDelWLZ.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWLZ.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWLZ.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWLZ.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWLZ.Location = new System.Drawing.Point(541, 344);
+            this.pbDelWLZ.Name = "pbDelWLZ";
+            this.pbDelWLZ.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWLZ.TabIndex = 111;
+            this.pbDelWLZ.TabStop = false;
+            this.pbDelWLZ.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbDelWQGD
+            // 
+            this.pbDelWQGD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWQGD.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWQGD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWQGD.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWQGD.Location = new System.Drawing.Point(239, 301);
+            this.pbDelWQGD.Name = "pbDelWQGD";
+            this.pbDelWQGD.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWQGD.TabIndex = 110;
+            this.pbDelWQGD.TabStop = false;
+            this.pbDelWQGD.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbWQGFDel
+            // 
+            this.pbWQGFDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbWQGFDel.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbWQGFDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbWQGFDel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbWQGFDel.Location = new System.Drawing.Point(541, 301);
+            this.pbWQGFDel.Name = "pbWQGFDel";
+            this.pbWQGFDel.Size = new System.Drawing.Size(25, 21);
+            this.pbWQGFDel.TabIndex = 109;
+            this.pbWQGFDel.TabStop = false;
+            this.pbWQGFDel.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbDelWPZD
+            // 
+            this.pbDelWPZD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWPZD.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWPZD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWPZD.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWPZD.Location = new System.Drawing.Point(239, 258);
+            this.pbDelWPZD.Name = "pbDelWPZD";
+            this.pbDelWPZD.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWPZD.TabIndex = 108;
+            this.pbDelWPZD.TabStop = false;
+            this.pbDelWPZD.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbDelWPZF
+            // 
+            this.pbDelWPZF.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWPZF.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWPZF.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWPZF.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWPZF.Location = new System.Drawing.Point(541, 258);
+            this.pbDelWPZF.Name = "pbDelWPZF";
+            this.pbDelWPZF.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWPZF.TabIndex = 107;
+            this.pbDelWPZF.TabStop = false;
+            this.pbDelWPZF.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbDelWYP
+            // 
+            this.pbDelWYP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWYP.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWYP.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWYP.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWYP.Location = new System.Drawing.Point(240, 215);
+            this.pbDelWYP.Name = "pbDelWYP";
+            this.pbDelWYP.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWYP.TabIndex = 106;
+            this.pbDelWYP.TabStop = false;
+            this.pbDelWYP.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
+            // pbDelWCS
+            // 
+            this.pbDelWCS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbDelWCS.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbDelWCS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbDelWCS.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbDelWCS.Location = new System.Drawing.Point(542, 215);
+            this.pbDelWCS.Name = "pbDelWCS";
+            this.pbDelWCS.Size = new System.Drawing.Size(25, 21);
+            this.pbDelWCS.TabIndex = 105;
+            this.pbDelWCS.TabStop = false;
+            this.pbDelWCS.Click += new System.EventHandler(this.DelComboBoxItem_Click);
+            // 
             // pbCutHoleAuto
             // 
             this.pbCutHoleAuto.BackColor = System.Drawing.Color.LightGray;
@@ -518,16 +593,37 @@
             this.pbCutHoleFile.TabStop = false;
             this.pbCutHoleFile.Click += new System.EventHandler(this.pbCutHoleFile_Click);
             // 
+            // pbClose
+            // 
+            this.pbClose.BackColor = System.Drawing.Color.Black;
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(544, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 33);
+            this.pbClose.TabIndex = 106;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // UControl_Init
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.label50);
+            this.Controls.Add(this.pbDelWLZ);
+            this.Controls.Add(this.pbDelWQGD);
+            this.Controls.Add(this.pbWQGFDel);
+            this.Controls.Add(this.pbDelWPZD);
+            this.Controls.Add(this.pbDelWPZF);
+            this.Controls.Add(this.pbDelWYP);
+            this.Controls.Add(this.pbDelWCS);
             this.Controls.Add(this.pbCutHoleAuto);
             this.Controls.Add(this.txtWFIBF);
             this.Controls.Add(this.pbFIBTemplateFile);
-            this.Controls.Add(this.btnReadConfig);
             this.Controls.Add(this.btnCreateConfig);
             this.Controls.Add(this.cbbWPZD);
             this.Controls.Add(this.cbbWPZF);
@@ -538,7 +634,6 @@
             this.Controls.Add(this.cbbWCS);
             this.Controls.Add(this.cbbWYP);
             this.Controls.Add(this.label58);
-            this.Controls.Add(this.label50);
             this.Controls.Add(this.label54);
             this.Controls.Add(this.label46);
             this.Controls.Add(this.label42);
@@ -564,18 +659,24 @@
             this.Load += new System.EventHandler(this.UControl_Init_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWPZD)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWPZF)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWYP)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbDelWCS)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleAuto)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
-        private System.Windows.Forms.Button btnClose;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.PictureBox pbCutHoleFile;
@@ -607,10 +708,17 @@
         private System.Windows.Forms.Label label61;
         private System.Windows.Forms.CheckBox chkWPT;
         private System.Windows.Forms.Button btnCreateConfig;
-        private System.Windows.Forms.Button btnReadConfig;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.TextBox txtWFIBF;
         private System.Windows.Forms.PictureBox pbFIBTemplateFile;
         private System.Windows.Forms.PictureBox pbCutHoleAuto;
+        private System.Windows.Forms.PictureBox pbDelWCS;
+        private System.Windows.Forms.PictureBox pbClose;
+        private System.Windows.Forms.PictureBox pbDelWYP;
+        private System.Windows.Forms.PictureBox pbDelWPZD;
+        private System.Windows.Forms.PictureBox pbDelWPZF;
+        private System.Windows.Forms.PictureBox pbDelWQGD;
+        private System.Windows.Forms.PictureBox pbWQGFDel;
+        private System.Windows.Forms.PictureBox pbDelWLZ;
     }
 }

+ 248 - 38
HOZProject/UserControls/UControl_Init.cs

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
 using System.Windows.Forms;
 using MeasureData;
 using System.Configuration;
+using FileManager;
 
 namespace HOZProject
 {
@@ -17,6 +18,11 @@ namespace HOZProject
         #region 全局变量
         String[] sT;
         String[] firms;
+        String[] WPZD;
+        String[] WPZF;
+        String[] WQGD;
+        String[] WQGF;
+        String[] WLZ;
         Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
         private FormHOZMain formHOZMain;
         public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
@@ -25,22 +31,28 @@ namespace HOZProject
         public string ReadConfigPath { get => readConfigPath; set => readConfigPath = value; }
         #endregion
 
+        #region 构造方法
         public UControl_Init(FormHOZMain formHOZ)
         {
             InitializeComponent();
             FormHOZMainObject = formHOZ;
         }
+        #endregion
+
         private void UControl_Init_Load(object sender, EventArgs e)
         {
-            
+
         }
 
+        #region 关闭窗体
         private void btnClose_Click(object sender, EventArgs e)
         {
             Form fParent = this.ParentForm;
             fParent.Close();
         }
+        #endregion
 
+        #region 加载切孔文件,生成切孔列表
         private void pbCutHoleFile_Click(object sender, EventArgs e)
         {
             if (FormHOZMainObject.m_MeasureFile == null)
@@ -61,12 +73,14 @@ namespace HOZProject
                     string fileName = FormHOZMainObject.m_MeasureFile.FileName;
                     FormHOZMainObject.CreateCutHoleList(ListCutHole);
                     //显示导入的切孔数量
-                    lblCutHoleCount.Text = string.Format("成功导入{0}个切孔",ListCutHole.Count);
+                    lblCutHoleCount.Text = string.Format("成功导入{0}个切孔", ListCutHole.Count);
                     tbCutHoleFilePath.Text = filePath + fileName;
                 }
             }
         }
+        #endregion
 
+        #region 根据一个切孔文件,自动计算其他切孔信息
         /// <summary>
         /// 根据一个切孔,自动计算其他切孔信息
         /// </summary>
@@ -76,7 +90,9 @@ namespace HOZProject
         {
 
         }
+        #endregion
 
+        #region 加载PT模板文件,生成切孔列表
         private void pbTemplateFile_Click(object sender, EventArgs e)
         {
             string FilePathName;
@@ -97,7 +113,9 @@ namespace HOZProject
                 this.txtWPTF.Text = fileNameWithoutExtension;
             }
         }
+        #endregion
 
+        #region 加载FIB模板文件,生成切孔列表
         private void pbFIBTemplateFile_Click(object sender, EventArgs e)
         {
             string FilePathName;
@@ -118,6 +136,7 @@ namespace HOZProject
                 this.txtWFIBF.Text = fileNameWithoutExtension;
             }
         }
+        #endregion
 
         #region 创建与读取样品参数文件
         private void btnCreateConfig_Click(object sender, EventArgs e)
@@ -154,51 +173,201 @@ namespace HOZProject
             {
                 return;
             }
+            //编辑Config文件
+            EditConfig();
+        }
+
+        /// <summary>
+        /// 编辑confing 文件信息
+        /// </summary>
+        public void EditConfig()
+        {
+            //样品类型
             List<String> _sT = sT.ToList();
             if (_sT.IndexOf(cbbWYP.Text) < 0)
             {
                 _sT.Add(cbbWYP.Text);
-                sT = _sT.ToArray();
-                string wsT = "";
-                for (int i = 0; i < sT.Length; i++)
-                {
-                    wsT += sT[i] + ",";
-                }
-                wsT = wsT.Substring(0, wsT.Length - 1);
+                string wsT = string.Join(",", _sT.ToArray());
                 config.AppSettings.Settings["Sample_Type"].Value = wsT;
             }
+            //厂商
             List<String> _firms = firms.ToList();
             if (_firms.IndexOf(cbbWCS.Text) < 0)
             {
                 _firms.Add(cbbWCS.Text);
-                firms = _firms.ToArray();
-                string wFirms = "";
-                for (int i = 0; i < firms.Length; i++)
-                {
-                    wFirms += firms[i] + ",";
-                }
-                wFirms = wFirms.Substring(0, wFirms.Length - 1);
+                string wFirms = string.Join(",", _firms.ToArray());
                 config.AppSettings.Settings["Firm"].Value = wFirms;
             }
+            //拍照电压
+            List<String> _WPZD = WPZD.ToList();
+            if (_WPZD.IndexOf(cbbWPZD.Text) < 0)
+            {
+                _WPZD.Add(cbbWPZD.Text);
+                string wWPZD = string.Join(",", _WPZD.ToArray());
+                config.AppSettings.Settings["WPZD"].Value = wWPZD;
+            }
+            //拍照放大位数
+            List<String> _WPZF = WPZF.ToList();
+            if (_WPZF.IndexOf(cbbWPZF.Text) < 0)
+            {
+                _WPZF.Add(cbbWPZF.Text);
+                string wWPZF = string.Join(",", _WPZF.ToArray());
+                config.AppSettings.Settings["WPZF"].Value = wWPZF;
+            }
+            //定位切割电压
+            List<String> _WQGD = WQGD.ToList();
+            if (_WQGD.IndexOf(cbbWQGD.Text) < 0)
+            {
+                _WQGD.Add(cbbWQGD.Text);
+                string wWQGD = string.Join(",", _WQGD.ToArray());
+                config.AppSettings.Settings["WQGD"].Value = wWQGD;
+            }
+            //定位切割放大位数
+            List<String> _WQGF = WQGF.ToList();
+            if (_WQGF.IndexOf(cbbWQGF.Text) < 0)
+            {
+                _WQGF.Add(cbbWQGF.Text);
+                string wWQGF = string.Join(",", _WQGF.ToArray());
+                config.AppSettings.Settings["WQGF"].Value = wWQGF;
+            }
+            //拉直操作放大位数
+            List<String> _WLZ = WLZ.ToList();
+            if (_WLZ.IndexOf(cbbWLZ.Text) < 0)
+            {
+                _WLZ.Add(cbbWLZ.Text);
+                string wWLZ = string.Join(",", _WLZ.ToArray());
+                config.AppSettings.Settings["WLZ"].Value = wWLZ;
+            }
             config.Save(ConfigurationSaveMode.Modified);
             ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
+            ReloadConfig();
         }
-        public void Reloadconfig()
+
+        /// <summary>
+        /// 删除config文件节点中内容信息
+        /// </summary>
+        public bool DelConfigNodeContentInfo(string delControlName, string selName)
         {
-            String sample_Type = ConfigurationManager.AppSettings["Sample_Type"];
-            String firm = ConfigurationManager.AppSettings["Firm"];
-            sT = sample_Type.Split(',');
-            cbbWYP.Items.Clear();
-            for (int i = 0; i < sT.Length; i++)
+            try
             {
-                cbbWYP.Items.Add(sT[i]);
+                switch (delControlName)
+                {
+                    case "WYP":
+                        //样品类型
+                        List<String> _sT = sT.ToList();
+                        _sT.Remove(selName);
+                        string wsT = string.Join(",", _sT.ToArray());
+                        config.AppSettings.Settings["Sample_Type"].Value = wsT;
+                        break;
+                    case "WCS":
+                        //厂商
+                        List<String> _firms = firms.ToList();
+                        _firms.Remove(selName);
+                        string wFirms = string.Join(",", _firms.ToArray());
+                        config.AppSettings.Settings["Firm"].Value = wFirms;
+                        break;
+                    case "WPZD":
+                        //拍照电压
+                        List<String> _WPZD = WPZD.ToList();
+                        _WPZD.Remove(selName);
+                        string wWPZD = string.Join(",", _WPZD.ToArray());
+                        config.AppSettings.Settings["WPZD"].Value = wWPZD;
+                        break;
+                    case "WPZF":
+                        //拍照放大位数
+                        List<String> _WPZF = WPZF.ToList();
+                        _WPZF.Remove(selName);
+                        string wWPZF = string.Join(",", _WPZF.ToArray());
+                        config.AppSettings.Settings["WPZF"].Value = wWPZF;
+                        break;
+                    case "WQGD"://定位切割电压
+                        List<String> _WQGD = WQGD.ToList();
+                        _WQGD.Remove(selName);
+                        string wWQGD = string.Join(",", _WQGD.ToArray());
+                        config.AppSettings.Settings["WQGD"].Value = wWQGD;
+                        break;
+                    case "WQGF": //定位切割放大位数
+                        List<String> _WQGF = WQGF.ToList();
+                        _WQGF.Remove(selName);
+                        string wWQGF = string.Join(",", _WQGF.ToArray());
+                        config.AppSettings.Settings["WQGF"].Value = wWQGF;
+                        break;
+                    case "WLZ":
+                        //拉直操作放大位数
+                        List<String> _WLZ = WLZ.ToList();
+                        _WLZ.Remove(selName);
+                        string wWLZ = string.Join(",", _WLZ.ToArray());
+                        config.AppSettings.Settings["WLZ"].Value = wWLZ;
+                        break;
+                }
+                config.Save(ConfigurationSaveMode.Modified);
+                ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
+                return true;
             }
-            firms = firm.Split(',');
-            cbbWCS.Items.Clear();
-            for (int i = 0; i < firms.Length; i++)
+            catch (Exception ex)
+            {
+                LogManager.LogError(ex.Message);
+                return true;
+            }
+        }
+
+        /// <summary>
+        /// 绑定下拉菜单
+        /// </summary>
+        /// <param name="cb"></param>
+        /// <param name="strGroup"></param>
+        private void BindComboxData(ComboBox cb, string[] strGroup)
+        {
+            for (int i = 0; i < strGroup.Length; i++)
             {
-                cbbWCS.Items.Add(firms[i]);
+                if (!strGroup[i].Equals(""))
+                {
+                    cb.Items.Add(strGroup[i]);
+                }
             }
+        }
+
+        /// <summary>
+        /// 读取Config文件信息
+        /// </summary>
+        public void ReloadConfig()
+        {
+            cbbWYP.Items.Clear();
+            cbbWCS.Items.Clear();
+            cbbWPZD.Items.Clear();
+            cbbWPZF.Items.Clear();
+            cbbWQGD.Items.Clear();
+            cbbWQGF.Items.Clear();
+            cbbWLZ.Items.Clear();
+
+            string sample_Type = ConfigurationManager.AppSettings["Sample_Type"];
+            string firm = ConfigurationManager.AppSettings["Firm"];
+            string WPZDTemp = ConfigurationManager.AppSettings["WPZD"];
+            string WPZFTemp = ConfigurationManager.AppSettings["WPZF"];
+            string WQGDTemp = ConfigurationManager.AppSettings["WQGD"];
+            string WQGFTemp = ConfigurationManager.AppSettings["WQGF"];
+            string WLZTemp = ConfigurationManager.AppSettings["WLZ"];
+            //样品类型
+            sT = sample_Type.Split(',');
+            BindComboxData(cbbWYP, sT);
+            //厂商
+            firms = firm.Split(',');
+            BindComboxData(cbbWCS, firms);
+            //拍照电压
+            WPZD = WPZDTemp.Split(',');
+            BindComboxData(cbbWPZD, WPZD);
+            //拍照放大位数
+            WPZF = WPZFTemp.Split(',');
+            BindComboxData(cbbWPZF, WPZF);
+            //定位切割电压
+            WQGD = WQGDTemp.Split(',');
+            BindComboxData(cbbWQGD, WQGD);
+            //定位切割放大位数
+            WQGF = WQGFTemp.Split(',');
+            BindComboxData(cbbWQGF, WQGF);
+            //拉直操作放大位数
+            WLZ = WLZTemp.Split(',');
+            BindComboxData(cbbWLZ, WLZ);
 
             cbbWYP.SelectedIndex = 0;
             cbbWCS.SelectedIndex = 0;
@@ -210,11 +379,14 @@ namespace HOZProject
             cbbWQGF.SelectedIndex = 0;
         }
 
+        /// <summary>
+        /// 根据所选路径,读取模板文件
+        /// </summary>
         public void ReadConfigInfo()
         {
             if (!ReadConfigPath.Equals(""))
             {
-                Reloadconfig();
+                ReloadConfig();
                 ConfigFile cfm = new ConfigFile();
                 cfm.Read(ReadConfigPath);
                 chkWIsP.Checked = cfm.Is_Photograph;
@@ -231,20 +403,58 @@ namespace HOZProject
                 cbbWCS.Text = cfm.Firm;
             }
         }
-        private void btnReadConfig_Click(object sender, EventArgs e)
+        #endregion
+
+        #region 删除下拉菜单选择项
+
+        private void DelComboBoxItem_Click(object sender, EventArgs e)
         {
-            //OpenFileDialog openFileDialog = new OpenFileDialog();
-            //openFileDialog.Filter = "样品参数文件|*.cfg";
-            //if (openFileDialog.ShowDialog() == DialogResult.OK)
-            //{
-            //    ConfigFile cfm = new ConfigFile();
-            //    cfm.Read(openFileDialog.FileName);
-            //}
-            ReadConfigInfo();
+            if (MessageBox.Show("是否删除所选项信息?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
+            {
+                PictureBox pbDel = (PictureBox)sender;
+                string ctrlName = pbDel.Name.Substring(5, pbDel.Name.Length - 5);
+                if (DelComboBoxItem(ctrlName))
+                {
+                    //重新加载
+                    ReloadConfig(); 
+                }
+            }
         }
 
+        /// <summary>
+        /// 删除下拉菜单选择项
+        /// </summary>
+        public bool DelComboBoxItem(string controlName)
+        {
+            string delName = controlName;
+            foreach (Control item in this.Controls)
+            {
+                if (item is ComboBox)
+                {
+                    if (item.Name.Contains(delName))
+                    {
+                        ComboBox cb = (ComboBox)item;
+                        return DelConfigNodeContentInfo(delName, cb.Text);
+                    }
+                }
+            }
+            return false;
+        }
         #endregion
 
-        
+        #region 根据是否仅拍照,进行逻辑判断
+        private void chkWIsP_CheckedChanged(object sender, EventArgs e)
+        {
+            if (chkWIsP.Checked)
+            {
+                chkWPT.Checked = false;
+                chkWPT.Visible = false;
+            }
+            else
+            {
+                chkWPT.Visible = true;
+            }
+        }
+        #endregion
     }
 }

+ 87 - 84
HOZProject/UserControls/UControl_Log.Designer.cs

@@ -28,43 +28,32 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
-            this.btnClose = new System.Windows.Forms.Button();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.dgvLog = new System.Windows.Forms.DataGridView();
-            this.panel2 = new System.Windows.Forms.Panel();
-            this.lblLogCount = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
             this.ColCutHoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ColStep = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ColTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ColState = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.panel2 = new System.Windows.Forms.Panel();
+            this.label2 = new System.Windows.Forms.Label();
+            this.lblLogCount = new System.Windows.Forms.Label();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).BeginInit();
             this.panel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             // 
-            // btnClose
-            // 
-            this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.btnClose.Location = new System.Drawing.Point(690, 0);
-            this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(28, 30);
-            this.btnClose.TabIndex = 3;
-            this.btnClose.Text = "X";
-            this.btnClose.UseVisualStyleBackColor = true;
-            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
-            // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
-            this.label1.ForeColor = System.Drawing.Color.Black;
+            this.label1.ForeColor = System.Drawing.Color.LightGray;
             this.label1.Location = new System.Drawing.Point(13, 8);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(63, 14);
@@ -73,8 +62,8 @@
             // 
             // panel1
             // 
-            this.panel1.BackColor = System.Drawing.Color.White;
-            this.panel1.Controls.Add(this.btnClose);
+            this.panel1.BackColor = System.Drawing.Color.Black;
+            this.panel1.Controls.Add(this.pbClose);
             this.panel1.Controls.Add(this.label1);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
@@ -88,46 +77,46 @@
             this.dgvLog.AllowUserToDeleteRows = false;
             this.dgvLog.AllowUserToResizeColumns = false;
             this.dgvLog.AllowUserToResizeRows = false;
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvLog.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.ColCutHoleName,
             this.ColStep,
             this.ColTime,
             this.ColState});
-            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle2;
             this.dgvLog.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvLog.EnableHeadersVisualStyles = false;
             this.dgvLog.Location = new System.Drawing.Point(0, 30);
             this.dgvLog.MultiSelect = false;
             this.dgvLog.Name = "dgvLog";
             this.dgvLog.ReadOnly = true;
-            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle11;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
             this.dgvLog.RowHeadersVisible = false;
             this.dgvLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
-            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle4;
             this.dgvLog.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.SystemColors.WindowText;
             this.dgvLog.RowTemplate.Height = 23;
             this.dgvLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@@ -140,39 +129,6 @@
             this.dgvLog.TabStop = false;
             this.dgvLog.SelectionChanged += new System.EventHandler(this.dgvLog_SelectionChanged);
             // 
-            // panel2
-            // 
-            this.panel2.BackColor = System.Drawing.Color.White;
-            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.panel2.Controls.Add(this.label2);
-            this.panel2.Controls.Add(this.lblLogCount);
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel2.Location = new System.Drawing.Point(0, 375);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(718, 23);
-            this.panel2.TabIndex = 5;
-            // 
-            // lblLogCount
-            // 
-            this.lblLogCount.AutoSize = true;
-            this.lblLogCount.Font = new System.Drawing.Font("宋体", 10F);
-            this.lblLogCount.ForeColor = System.Drawing.Color.Black;
-            this.lblLogCount.Location = new System.Drawing.Point(52, 4);
-            this.lblLogCount.Name = "lblLogCount";
-            this.lblLogCount.Size = new System.Drawing.Size(0, 14);
-            this.lblLogCount.TabIndex = 0;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("宋体", 10F);
-            this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(8, 4);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(49, 14);
-            this.label2.TabIndex = 1;
-            this.label2.Text = "共计:";
-            // 
             // ColCutHoleName
             // 
             this.ColCutHoleName.DataPropertyName = "CutHoleName";
@@ -213,6 +169,53 @@
             this.ColState.Visible = false;
             this.ColState.Width = 180;
             // 
+            // panel2
+            // 
+            this.panel2.BackColor = System.Drawing.Color.White;
+            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel2.Controls.Add(this.label2);
+            this.panel2.Controls.Add(this.lblLogCount);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.panel2.Location = new System.Drawing.Point(0, 375);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(718, 23);
+            this.panel2.TabIndex = 5;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("宋体", 10F);
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(8, 4);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(49, 14);
+            this.label2.TabIndex = 1;
+            this.label2.Text = "共计:";
+            // 
+            // lblLogCount
+            // 
+            this.lblLogCount.AutoSize = true;
+            this.lblLogCount.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblLogCount.ForeColor = System.Drawing.Color.Black;
+            this.lblLogCount.Location = new System.Drawing.Point(52, 4);
+            this.lblLogCount.Name = "lblLogCount";
+            this.lblLogCount.Size = new System.Drawing.Size(0, 14);
+            this.lblLogCount.TabIndex = 0;
+            // 
+            // pbClose
+            // 
+            this.pbClose.BackColor = System.Drawing.Color.Black;
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(686, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 30);
+            this.pbClose.TabIndex = 107;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // UControl_Log
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -229,13 +232,12 @@
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).EndInit();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
 
         }
 
         #endregion
-
-        private System.Windows.Forms.Button btnClose;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Panel panel2;
@@ -246,5 +248,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ColStep;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColTime;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColState;
+        private System.Windows.Forms.PictureBox pbClose;
     }
 }

+ 0 - 3
HOZProject/UserControls/UControl_Log.resx

@@ -117,9 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="btnClose.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 45 - 42
HOZProject/UserControls/UControl_ParaInfo.Designer.cs

@@ -29,17 +29,17 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
+            System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem(new string[] {
             "aaa",
             "aaa",
             "Time"}, 0, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))));
-            System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
+            System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem(new string[] {
             "bbb"}, 1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))));
-            System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(new string[] {
+            System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem(new string[] {
             "ccc"}, 2, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))));
-            System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem(new string[] {
+            System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem(new string[] {
             "ddd"}, 3, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))));
-            System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem(new string[] {
+            System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem(new string[] {
             "eee"}, 4, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))));
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UControl_ParaInfo));
             this.lblLocation = new System.Windows.Forms.Label();
@@ -49,7 +49,6 @@
             this.CkIsSwitch = new System.Windows.Forms.CheckBox();
             this.lblCutHoleName = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
-            this.btnClose = new System.Windows.Forms.Button();
             this.lblX = new System.Windows.Forms.Label();
             this.lblShowStartTime = new System.Windows.Forms.Label();
             this.lblShowEndTime = new System.Windows.Forms.Label();
@@ -76,10 +75,12 @@
             this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.panel4 = new System.Windows.Forms.Panel();
             this.label8 = new System.Windows.Forms.Label();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
             this.panel3.SuspendLayout();
             this.panel4.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             // 
             // lblLocation
@@ -149,33 +150,21 @@
             // panel1
             // 
             this.panel1.BackColor = System.Drawing.Color.White;
-            this.panel1.Controls.Add(this.btnClose);
+            this.panel1.Controls.Add(this.pbClose);
             this.panel1.Controls.Add(this.lblCutHoleName);
             this.panel1.Controls.Add(this.CkIsSwitch);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(312, 30);
+            this.panel1.Size = new System.Drawing.Size(345, 30);
             this.panel1.TabIndex = 2;
             // 
-            // btnClose
-            // 
-            this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.btnClose.Location = new System.Drawing.Point(284, 0);
-            this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(28, 30);
-            this.btnClose.TabIndex = 3;
-            this.btnClose.Text = "X";
-            this.btnClose.UseVisualStyleBackColor = true;
-            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
-            // 
             // lblX
             // 
             this.lblX.AutoSize = true;
             this.lblX.Font = new System.Drawing.Font("宋体", 10F);
             this.lblX.ForeColor = System.Drawing.Color.LightGray;
-            this.lblX.Location = new System.Drawing.Point(106, 43);
+            this.lblX.Location = new System.Drawing.Point(103, 43);
             this.lblX.Name = "lblX";
             this.lblX.Size = new System.Drawing.Size(0, 14);
             this.lblX.TabIndex = 3;
@@ -218,7 +207,7 @@
             this.lblY.AutoSize = true;
             this.lblY.Font = new System.Drawing.Font("宋体", 10F);
             this.lblY.ForeColor = System.Drawing.Color.LightGray;
-            this.lblY.Location = new System.Drawing.Point(184, 43);
+            this.lblY.Location = new System.Drawing.Point(181, 43);
             this.lblY.Name = "lblY";
             this.lblY.Size = new System.Drawing.Size(0, 14);
             this.lblY.TabIndex = 4;
@@ -228,7 +217,7 @@
             this.lblZ.AutoSize = true;
             this.lblZ.Font = new System.Drawing.Font("宋体", 10F);
             this.lblZ.ForeColor = System.Drawing.Color.LightGray;
-            this.lblZ.Location = new System.Drawing.Point(265, 43);
+            this.lblZ.Location = new System.Drawing.Point(262, 43);
             this.lblZ.Name = "lblZ";
             this.lblZ.Size = new System.Drawing.Size(0, 14);
             this.lblZ.TabIndex = 5;
@@ -238,7 +227,7 @@
             this.lblM.AutoSize = true;
             this.lblM.Font = new System.Drawing.Font("宋体", 10F);
             this.lblM.ForeColor = System.Drawing.Color.LightGray;
-            this.lblM.Location = new System.Drawing.Point(265, 66);
+            this.lblM.Location = new System.Drawing.Point(262, 66);
             this.lblM.Name = "lblM";
             this.lblM.Size = new System.Drawing.Size(0, 14);
             this.lblM.TabIndex = 8;
@@ -248,7 +237,7 @@
             this.lblT.AutoSize = true;
             this.lblT.Font = new System.Drawing.Font("宋体", 10F);
             this.lblT.ForeColor = System.Drawing.Color.LightGray;
-            this.lblT.Location = new System.Drawing.Point(184, 66);
+            this.lblT.Location = new System.Drawing.Point(181, 66);
             this.lblT.Name = "lblT";
             this.lblT.Size = new System.Drawing.Size(0, 14);
             this.lblT.TabIndex = 7;
@@ -258,7 +247,7 @@
             this.lblR.AutoSize = true;
             this.lblR.Font = new System.Drawing.Font("宋体", 10F);
             this.lblR.ForeColor = System.Drawing.Color.LightGray;
-            this.lblR.Location = new System.Drawing.Point(106, 66);
+            this.lblR.Location = new System.Drawing.Point(103, 66);
             this.lblR.Name = "lblR";
             this.lblR.Size = new System.Drawing.Size(0, 14);
             this.lblR.TabIndex = 6;
@@ -337,7 +326,7 @@
             this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.panel2.Location = new System.Drawing.Point(0, 183);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(312, 459);
+            this.panel2.Size = new System.Drawing.Size(345, 459);
             this.panel2.TabIndex = 15;
             // 
             // listView1
@@ -356,23 +345,23 @@
             this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
             this.listView1.HotTracking = true;
             this.listView1.HoverSelection = true;
-            listViewItem1.StateImageIndex = 0;
-            listViewItem2.StateImageIndex = 0;
-            listViewItem3.StateImageIndex = 0;
-            listViewItem4.StateImageIndex = 0;
-            listViewItem5.StateImageIndex = 0;
+            listViewItem6.StateImageIndex = 0;
+            listViewItem7.StateImageIndex = 0;
+            listViewItem8.StateImageIndex = 0;
+            listViewItem9.StateImageIndex = 0;
+            listViewItem10.StateImageIndex = 0;
             this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
-            listViewItem1,
-            listViewItem2,
-            listViewItem3,
-            listViewItem4,
-            listViewItem5});
+            listViewItem6,
+            listViewItem7,
+            listViewItem8,
+            listViewItem9,
+            listViewItem10});
             this.listView1.LabelWrap = false;
             this.listView1.Location = new System.Drawing.Point(0, 30);
             this.listView1.MultiSelect = false;
             this.listView1.Name = "listView1";
             this.listView1.ShowGroups = false;
-            this.listView1.Size = new System.Drawing.Size(312, 383);
+            this.listView1.Size = new System.Drawing.Size(345, 383);
             this.listView1.SmallImageList = this.imageList1;
             this.listView1.TabIndex = 7;
             this.listView1.TabStop = false;
@@ -398,7 +387,7 @@
             this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.panel3.Location = new System.Drawing.Point(0, 413);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(312, 46);
+            this.panel3.Size = new System.Drawing.Size(345, 46);
             this.panel3.TabIndex = 5;
             // 
             // label1
@@ -427,7 +416,7 @@
             this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel4.Location = new System.Drawing.Point(0, 0);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(312, 30);
+            this.panel4.Size = new System.Drawing.Size(345, 30);
             this.panel4.TabIndex = 6;
             // 
             // label8
@@ -441,6 +430,19 @@
             this.label8.TabIndex = 3;
             this.label8.Text = "XXXX";
             // 
+            // pbClose
+            // 
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(313, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 30);
+            this.pbClose.TabIndex = 108;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // UControl_ParaInfo
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -469,7 +471,7 @@
             this.Controls.Add(this.lblStartTime);
             this.Controls.Add(this.lblLocation);
             this.Name = "UControl_ParaInfo";
-            this.Size = new System.Drawing.Size(312, 642);
+            this.Size = new System.Drawing.Size(345, 642);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             this.panel2.ResumeLayout(false);
@@ -477,6 +479,7 @@
             this.panel3.PerformLayout();
             this.panel4.ResumeLayout(false);
             this.panel4.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -490,7 +493,6 @@
         private System.Windows.Forms.CheckBox CkIsSwitch;
         private System.Windows.Forms.Label lblCutHoleName;
         private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Button btnClose;
         private System.Windows.Forms.Label lblX;
         private System.Windows.Forms.Label lblShowStartTime;
         private System.Windows.Forms.Label lblShowEndTime;
@@ -517,5 +519,6 @@
         private System.Windows.Forms.ProgressBar progressBar1;
         private System.Windows.Forms.Panel panel4;
         private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.PictureBox pbClose;
     }
 }

+ 4 - 3
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -71,10 +71,11 @@ namespace HOZProject
         /// </summary>
         public void ShowParaInfo()
         {
+            int multiple = 1000;
             //设置Position参数
-            lblX.Text = Position.X.ToString();
-            lblY.Text = Position.Y.ToString();
-            lblZ.Text = Position.Z.ToString();
+            lblX.Text = (Position.X * multiple).ToString("f3");
+            lblY.Text = (Position.Y * multiple).ToString("f3");
+            lblZ.Text = (Position.Z * multiple).ToString("f3");
             lblR.Text = Position.R.ToString();
             lblT.Text = Position.T.ToString();
             lblM.Text = Position.M.ToString();

+ 1 - 1
HOZProject/UserControls/UControl_ParaInfo.resx

@@ -125,7 +125,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAS
-        GAAAAk1TRnQBSQFMAgEBBQEAATABAAEwAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        GAAAAk1TRnQBSQFMAgEBBQEAATgBAAE4AQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
         AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
         AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
         AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

+ 18 - 14
HOZProject/UserControls/UControl_Process.Designer.cs

@@ -46,15 +46,16 @@
             this.label1 = new System.Windows.Forms.Label();
             this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.imageList1 = new System.Windows.Forms.ImageList(this.components);
-            this.btnClose = new System.Windows.Forms.Button();
             this.listView1 = new System.Windows.Forms.ListView();
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.panel2 = new System.Windows.Forms.Panel();
             this.label2 = new System.Windows.Forms.Label();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             // 
             // panel1
@@ -97,17 +98,6 @@
             this.imageList1.Images.SetKeyName(3, "start32.png");
             this.imageList1.Images.SetKeyName(4, "stop32.png");
             // 
-            // btnClose
-            // 
-            this.btnClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.btnClose.Location = new System.Drawing.Point(250, 0);
-            this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(28, 28);
-            this.btnClose.TabIndex = 2;
-            this.btnClose.Text = "X";
-            this.btnClose.UseVisualStyleBackColor = true;
-            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
-            // 
             // listView1
             // 
             this.listView1.Activation = System.Windows.Forms.ItemActivation.OneClick;
@@ -150,8 +140,8 @@
             // panel2
             // 
             this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel2.Controls.Add(this.pbClose);
             this.panel2.Controls.Add(this.label2);
-            this.panel2.Controls.Add(this.btnClose);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Name = "panel2";
@@ -168,6 +158,19 @@
             this.label2.TabIndex = 3;
             this.label2.Text = "XXXX";
             // 
+            // pbClose
+            // 
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(246, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 28);
+            this.pbClose.TabIndex = 108;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // UControl_Process
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -181,6 +184,7 @@
             this.panel1.PerformLayout();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -191,12 +195,12 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.ProgressBar progressBar1;
         private System.Windows.Forms.ImageList imageList1;
-        private System.Windows.Forms.Button btnClose;
         private System.Windows.Forms.ListView listView1;
         private System.Windows.Forms.ColumnHeader columnHeader1;
         private System.Windows.Forms.ColumnHeader columnHeader2;
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private System.Windows.Forms.Panel panel2;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.PictureBox pbClose;
     }
 }

+ 1 - 1
HOZProject/UserControls/UControl_Process.resx

@@ -125,7 +125,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAS
-        GAAAAk1TRnQBSQFMAgEBBQEAARgBAAEYAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        GAAAAk1TRnQBSQFMAgEBBQEAASABAAEgAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
         AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
         AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
         AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA