wb_han пре 5 година
родитељ
комит
bc23b66e7d

+ 19 - 14
HOZProject/FormHOZMain.Designer.cs

@@ -37,13 +37,13 @@
             this.textBox2 = new System.Windows.Forms.TextBox();
             this.plPrarInfo = 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.lblFlowContent = new System.Windows.Forms.Label();
             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();
@@ -59,10 +59,10 @@
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
             this.groupBox1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             this.plSEM.SuspendLayout();
             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();
@@ -183,15 +183,6 @@
             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.Controls.Add(this.lblFlowContent);
@@ -266,28 +257,40 @@
             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;
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStop.Location = new System.Drawing.Point(521, 4);
+            this.pbStop.Location = new System.Drawing.Point(447, 4);
             this.pbStop.Name = "pbStop";
             this.pbStop.Size = new System.Drawing.Size(68, 71);
             this.pbStop.TabIndex = 8;
             this.pbStop.TabStop = false;
             this.pbStop.Click += new System.EventHandler(this.pbStop_Click);
+            this.pbStop.MouseEnter += new System.EventHandler(this.pbStop_MouseEnter);
+            this.pbStop.MouseLeave += new System.EventHandler(this.pbStop_MouseLeave);
             // 
             // pbPause
             // 
             this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
             this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbPause.Location = new System.Drawing.Point(447, 4);
+            this.pbPause.Location = new System.Drawing.Point(521, 4);
             this.pbPause.Name = "pbPause";
             this.pbPause.Size = new System.Drawing.Size(68, 71);
             this.pbPause.TabIndex = 8;
             this.pbPause.TabStop = false;
+            this.pbPause.Visible = false;
             // 
             // pbStart
             // 
@@ -300,6 +303,8 @@
             this.pbStart.TabIndex = 8;
             this.pbStart.TabStop = false;
             this.pbStart.Click += new System.EventHandler(this.pbStart_Click);
+            this.pbStart.MouseEnter += new System.EventHandler(this.pbStart_MouseEnter);
+            this.pbStart.MouseLeave += new System.EventHandler(this.pbStart_MouseLeave);
             // 
             // pbMax
             // 
@@ -437,12 +442,12 @@
             this.plFill.ResumeLayout(false);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             this.plSEM.ResumeLayout(false);
             this.plSEM.PerformLayout();
             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();

+ 39 - 3
HOZProject/FormHOZMain.cs

@@ -38,6 +38,11 @@ namespace HOZProject
         /// </summary>
         Form m_FormInit = null;
 
+        /// <summary>
+        /// 是否已保存
+        /// </summary>
+        public bool IsSave = false;
+
         /// <summary>
         /// 初始化用户控件
         /// </summary>
@@ -71,6 +76,13 @@ namespace HOZProject
             m_Ms = new Measure(ConfigurationManager.AppSettings["WebServerIP"].ToString(),
                 ConfigurationManager.AppSettings["WebServerPort"].ToString(),
                 ConfigurationManager.AppSettings["WebServerUrl"].ToString());
+
+            m_MeasureFile.MParam.AutoFocus.UP = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_UP"].ToString());
+            m_MeasureFile.MParam.AutoFocus.Down = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_Down"].ToString());
+            m_MeasureFile.MParam.AutoFocus.Step = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_Step"].ToString());
+            m_MeasureFile.MParam.AutoFocus.Range = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_Range"].ToString());
+            m_MeasureFile.MParam.AutoFocus.fStep = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_FStep"].ToString());
+
             m_Ms.InitMeas(m_MeasureFile);
             m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage); //注册事件
             m_Ms.SendCutHolesStatus += new CutHolesStatusHandler(displayCutHoleMessage); //注册事件
@@ -209,7 +221,7 @@ namespace HOZProject
         }
         #endregion
         
-        #region 窗体 最大化 最小化 关闭 按钮事件
+        #region 窗体中 线程开始 停止 最大化 最小化 关闭 按钮事件
         private void pbMin_MouseEnter(object sender, EventArgs e)
         {
             this.pbMin.BackgroundImage = global::HOZProject.Properties.Resources.Min_Blue;
@@ -240,6 +252,26 @@ namespace HOZProject
             this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
         }
 
+        private void pbStart_MouseEnter(object sender, EventArgs e)
+        {
+            this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start_Green;
+        }
+
+        private void pbStart_MouseLeave(object sender, EventArgs e)
+        {
+            this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start;
+        }
+
+        private void pbStop_MouseEnter(object sender, EventArgs e)
+        {
+            this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop_Red;
+        }
+
+        private void pbStop_MouseLeave(object sender, EventArgs e)
+        {
+            this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
+        }
+
         private void pbClose_Click(object sender, EventArgs e)
         {
             this.Close();
@@ -302,7 +334,7 @@ namespace HOZProject
                     string dbFileName = "MeasureFile.db";
                     //要复制的文件路径
                     string pLocalFilePath = Application.StartupPath +"\\"+dbFileName;
-                    string pSaveFilePath = savePath + dbFileName;//指定存储的路径
+                    string pSaveFilePath = savePath + "\\" + dbFileName;//指定存储的路径
                     if (File.Exists(pLocalFilePath))//必须判断要复制的文件是否存在
                     {
                         //三个参数分别是源文件路径,存储路径,若存储路径有相同文件是否替换
@@ -310,6 +342,8 @@ namespace HOZProject
                     }
                     //将初始化中的参数,配置到测量参数中
                     m_MeasureFile.MParam = uControl_Init.GetMeasureParamInfo();
+                    //设置已保存状态
+                    IsSave = true;
                 }
             }
         }
@@ -550,7 +584,9 @@ namespace HOZProject
                     }
                 }
             }
-        } 
+        }
         #endregion
+
+       
     }
 }

+ 13 - 13
HOZProject/MeasureXML/MeasureStructXml.xml

@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <MeasureList>
   <MeasureFlow Name="测量流程">
-      <Step Index="0" Name="" Code="1-0" IsData="False" Type="Pt" IsShow="True" Title="PT沉积" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
-      <Step Index="1" Name="" Code="1-1" IsData="False" Type="State" IsShow="False" Title="移动至切割位置" Details="自动定位切割位置"></Step>
-      <Step Index="2" Name="" Code="1-2" IsData="False" Type="Photo" IsShow="True" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="0" Name="" Code="1-0" IsData="False" Type="Pt" IsShow="False" Title="PT沉积" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
+      <Step Index="1" Name="" Code="1-1" IsData="False" Type="State" IsShow="True" Title="移动至切割位置" Details="自动定位切割位置"></Step>
+      <Step Index="2" Name="" Code="1-2" IsData="False" Type="Photo" IsShow="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
       <Step Index="3" Name="" Code="1-3" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="4" Name="" Code="1-4" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
+      <Step Index="4" Name="" Code="1-4" IsData="False" Type="Photo" IsShow="False" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
       <Step Index="5" Name="" Code="1-5" IsData="True" Type="Photo" IsShow="True" Title="拍照保存照片" Details="控制SEM对分析位置拍照保存照片"></Step>
-      <Step Index="6" Name="" Code="1-6" IsData="False" Type="FIB" IsShow="True" Title="切换到FIB模式" Details="切换到FIB模式"></Step>
+      <Step Index="6" Name="" Code="1-6" IsData="False" Type="FIB" IsShow="False" Title="切换到FIB模式" Details="切换到FIB模式"></Step>
       <Step Index="7" Name="" Code="1-7" IsData="True" Type="FIB" IsShow="True" Title="FIB拍照保存照片" Details="FIB拍照保存照片"></Step>
-      <Step Index="8" Name="" Code="1-8" IsData="True" Type="Stage" IsShow="True" Title="样品台移动到指定位置" Details="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
-      <Step Index="9" Name="" Code="1-9" IsData="False" Type="Stage" IsShow="True" Title="验证移动位置" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="10" Name="" Code="1-10" IsData="False" Type="Photo" IsShow="True" Title="PT沉积" Details="根据配置文件进行PT沉积"></Step>
-      <Step Index="11" Name="" Code="1-11" IsData="True" Type="Position" IsShow="True" Title="保存六轴坐标" Details="将六轴坐标保存到数据库中"></Step>
+      <Step Index="8" Name="" Code="1-8" IsData="True" Type="Photo" IsShow="False" Title="样品台移动到指定位置" Details="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
+      <Step Index="9" Name="" Code="1-9" IsData="False" Type="Photo" IsShow="True" Title="验证移动位置" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="10" Name="" Code="1-10" IsData="False" Type="Photo" IsShow="False" Title="PT沉积" Details="根据配置文件进行PT沉积"></Step>
+      <Step Index="11" Name="" Code="1-11" IsData="True" Type="Photo" IsShow="True" Title="保存坐标" Details="将六轴坐标保存到数据库中"></Step>
 
       <Step Index="12" Name="" Code="1-12" IsData="False" Type="FIB" IsShow="True" Title="FIB进行切割" Details="控制FIB进行切割"></Step>
       <Step Index="13" Name="" Code="1-13" IsData="False" Type="FIB" IsShow="True" Title="设置FIB放大倍数" Details="控制SEM放大倍数"></Step>
-      <Step Index="14" Name="" Code="1-14" IsData="False" Type="Photo" IsShow="True" Title="保存照片" Details="保存照片"></Step>
-      <Step Index="15" Name="" Code="1-15" IsData="False" Type="Photo" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
-      <Step Index="16" Name="" Code="1-16" IsData="False" Type="State" IsShow="True" Title="FIB切割状态" Details="FIB切割成功或失败"></Step>
+      <Step Index="14" Name="" Code="1-14" IsData="False" Type="FIB" IsShow="True" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="15" Name="" Code="1-15" IsData="False" Type="FIB" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
+      <Step Index="16" Name="" Code="1-16" IsData="False" Type="FIB" IsShow="True" Title="FIB切割状态" Details="FIB切割成功或失败"></Step>
     
       <Step Index="17" Name="" Code="1-17" IsData="False" Type="Pt" IsShow="True" Title="拔出PT针" Details="根据样品类型决定是否撤出PT针"></Step>
 
@@ -28,7 +28,7 @@
       <Step Index="21" Name="" Code="1-21" IsData="False" Type="Photo" IsShow="True" Title="移动到切孔位置" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
       <Step Index="22" Name="" Code="1-22" IsData="False" Type="Photo" IsShow="True" Title="调整角度" Details="调整角度"></Step>
       <Step Index="23" Name="" Code="1-23" IsData="False" Type="Photo" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="24" Name="" Code="1-24" IsData="False" Type="State" IsShow="True" Title="自动调整SEM找切割位置" Details="自动调整SEM找切割位置"></Step>
+      <Step Index="24" Name="" Code="1-24" IsData="False" Type="Photo" IsShow="True" Title="自动调整SEM找切割位置" Details="自动调整SEM找切割位置"></Step>
     
       <Step Index="25" Name="" Code="1-25" IsData="False" Type="Photo" IsShow="True" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
       <Step Index="26" Name="" Code="1-26" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>

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

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

+ 6 - 0
HOZProject/Properties/Resources.resx

@@ -205,4 +205,10 @@
   <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>
+  <data name="Start_Green" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Start_Green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Stop_Red" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Stop_Red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 2 - 0
HOZProject/UnitControl.csproj

@@ -282,6 +282,8 @@
     <Content Include="MeasureXML\MeasureStructXml.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <None Include="Resources\Start_Green.png" />
+    <None Include="Resources\Stop_Red.png" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 10 - 0
HOZProject/UserControls/UCTimeLine.cs

@@ -316,5 +316,15 @@ namespace HOZProject
         /// </summary>
         /// <value>The Type.</value>
         public string Type { get; set; }
+        /// <summary>
+        /// Gets or sets the Show.
+        /// </summary>
+        /// <value>The Show.</value>
+        public bool IsShow { get; set; }
+        /// <summary>
+        /// Gets or sets the Index.
+        /// </summary>
+        /// <value>The Index.</value>
+        public int Index { get; set; }
     }
 }

+ 8 - 1
HOZProject/UserControls/UControl_CutHole.cs

@@ -53,7 +53,14 @@ namespace HOZProject
         {
             //显示处理信息
             ShowParaControl(UControl_ParaInfo.Name);
-            FormHOZMainObject.plPrarInfo.Visible = true;
+            if (FormHOZMainObject.plPrarInfo.Visible)
+            {
+                FormHOZMainObject.plPrarInfo.Visible = false;
+            }
+            else
+            {
+                FormHOZMainObject.plPrarInfo.Visible = true;
+            }
         }
 
         /// <summary>

+ 2 - 0
HOZProject/UserControls/UControl_Init.Designer.cs

@@ -121,6 +121,8 @@
             this.pbClose.TabIndex = 106;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
+            this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
             // 
             // tbCutHoleFilePath
             // 

+ 17 - 0
HOZProject/UserControls/UControl_Init.cs

@@ -77,6 +77,11 @@ namespace HOZProject
                     //显示导入的切孔数量
                     lblCutHoleCount.Text = string.Format("成功导入{0}个切孔", ListCutHole.Count);
                     tbCutHoleFilePath.Text = CutHoleFilePath;
+                    //保存测量文件
+                    if (FormHOZMainObject.IsSave)
+                    {
+                        FormHOZMainObject.m_MeasureFile.Save();
+                    }
                 }
             }
         }
@@ -621,5 +626,17 @@ namespace HOZProject
             }
             CreateCutHoleList();
         }
+
+        #region 关闭按钮 鼠标操作事件
+        private void pbClose_MouseEnter(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Red;
+        }
+
+        private void pbClose_MouseLeave(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+        } 
+        #endregion
     }
 }

+ 32 - 30
HOZProject/UserControls/UControl_Log.Designer.cs

@@ -28,10 +28,10 @@
         /// </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();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.pbClose = new System.Windows.Forms.PictureBox();
@@ -84,6 +84,8 @@
             this.pbClose.TabIndex = 107;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
+            this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
             // 
             // dgvLog
             // 
@@ -91,46 +93,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;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
             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;
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle6;
             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;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvLog.RowHeadersVisible = false;
             this.dgvLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
-            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle8;
             this.dgvLog.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.SystemColors.WindowText;
             this.dgvLog.RowTemplate.Height = 23;
             this.dgvLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;

+ 12 - 0
HOZProject/UserControls/UControl_Log.cs

@@ -45,5 +45,17 @@ namespace HOZProject
         {
             dgvLog.ClearSelection();
         }
+
+        #region 关闭按钮 鼠标操作事件
+        private void pbClose_MouseEnter(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Red;
+        }
+
+        private void pbClose_MouseLeave(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+        }
+        #endregion
     }
 }

+ 21 - 17
HOZProject/UserControls/UControl_ParaInfo.Designer.cs

@@ -54,6 +54,7 @@
             this.label6 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.plMeasureFlow = new System.Windows.Forms.Panel();
+            this.plTimeLine = new System.Windows.Forms.Panel();
             this.lvMeasureFlow = new System.Windows.Forms.ListView();
             this.imageList1 = new System.Windows.Forms.ImageList(this.components);
             this.panel3 = new System.Windows.Forms.Panel();
@@ -61,7 +62,6 @@
             this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.panel4 = new System.Windows.Forms.Panel();
             this.label8 = new System.Windows.Forms.Label();
-            this.plTimeLine = new System.Windows.Forms.Panel();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.plMeasureFlow.SuspendLayout();
@@ -123,12 +123,13 @@
             this.CkIsSwitch.Size = new System.Drawing.Size(15, 14);
             this.CkIsSwitch.TabIndex = 1;
             this.CkIsSwitch.UseVisualStyleBackColor = true;
+            this.CkIsSwitch.CheckedChanged += new System.EventHandler(this.CkIsSwitch_CheckedChanged);
             // 
             // lblCutHoleName
             // 
             this.lblCutHoleName.AutoSize = true;
             this.lblCutHoleName.Font = new System.Drawing.Font("宋体", 10F);
-            this.lblCutHoleName.ForeColor = System.Drawing.Color.Black;
+            this.lblCutHoleName.ForeColor = System.Drawing.Color.White;
             this.lblCutHoleName.Location = new System.Drawing.Point(26, 9);
             this.lblCutHoleName.Name = "lblCutHoleName";
             this.lblCutHoleName.Size = new System.Drawing.Size(63, 14);
@@ -137,7 +138,8 @@
             // 
             // panel1
             // 
-            this.panel1.BackColor = System.Drawing.Color.White;
+            this.panel1.BackColor = System.Drawing.Color.Black;
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel1.Controls.Add(this.pbClose);
             this.panel1.Controls.Add(this.lblCutHoleName);
             this.panel1.Controls.Add(this.CkIsSwitch);
@@ -153,12 +155,14 @@
             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.Location = new System.Drawing.Point(311, 0);
             this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(32, 30);
+            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);
+            this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
+            this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
             // 
             // lblX
             // 
@@ -331,6 +335,14 @@
             this.plMeasureFlow.Size = new System.Drawing.Size(345, 459);
             this.plMeasureFlow.TabIndex = 15;
             // 
+            // plTimeLine
+            // 
+            this.plTimeLine.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.plTimeLine.Location = new System.Drawing.Point(0, 30);
+            this.plTimeLine.Name = "plTimeLine";
+            this.plTimeLine.Size = new System.Drawing.Size(345, 383);
+            this.plTimeLine.TabIndex = 8;
+            // 
             // lvMeasureFlow
             // 
             this.lvMeasureFlow.Activation = System.Windows.Forms.ItemActivation.OneClick;
@@ -397,7 +409,7 @@
             // 
             // panel4
             // 
-            this.panel4.BackColor = System.Drawing.Color.White;
+            this.panel4.BackColor = System.Drawing.Color.Black;
             this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel4.Controls.Add(this.label8);
             this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
@@ -410,20 +422,12 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("宋体", 10F);
-            this.label8.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.label8.ForeColor = System.Drawing.Color.White;
             this.label8.Location = new System.Drawing.Point(5, 7);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(35, 14);
+            this.label8.Size = new System.Drawing.Size(63, 14);
             this.label8.TabIndex = 3;
-            this.label8.Text = "XXXX";
-            // 
-            // plTimeLine
-            // 
-            this.plTimeLine.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.plTimeLine.Location = new System.Drawing.Point(0, 30);
-            this.plTimeLine.Name = "plTimeLine";
-            this.plTimeLine.Size = new System.Drawing.Size(345, 383);
-            this.plTimeLine.TabIndex = 8;
+            this.label8.Text = "检测流程";
             // 
             // UControl_ParaInfo
             // 

+ 80 - 25
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -15,6 +15,7 @@ namespace HOZProject
 {
     public partial class UControl_ParaInfo : UserControl
     {
+        #region 参数定义
         /// <summary>
         /// 开始时间
         /// </summary>
@@ -35,7 +36,7 @@ namespace HOZProject
         private string cutHoleName;
         private FormHOZMain formHOZMain;
         private TimeLineItem[] tlItem = null;
-        private UCTimeLine uCTimeLine=null;
+        private UCTimeLine uCTimeLine = null;
         public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
         public string StartTime { get => startTime; set => startTime = value; }
         public string EndTime { get => endTime; set => endTime = value; }
@@ -43,7 +44,8 @@ namespace HOZProject
         public SemPosition Position { get => position; set => position = value; }
         public string CutHoleName { get => cutHoleName; set => cutHoleName = value; }
         public bool IsSwitch { get => isSwitch; set => isSwitch = value; }
-        public TimeLineItem[] TlItem { get => tlItem; set => tlItem = value; }
+        public TimeLineItem[] TlItem { get => tlItem; set => tlItem = value; } 
+        #endregion
 
         public UControl_ParaInfo(FormHOZMain formHOZ)
         {
@@ -53,6 +55,7 @@ namespace HOZProject
             ShowMeasureFlow();
         }
 
+        #region 关闭属性层
         private void btnClose_Click(object sender, EventArgs e)
         {
             foreach (Control item in FormHOZMainObject.plFill.Controls)
@@ -72,23 +75,20 @@ namespace HOZProject
                 }
             }
         }
+        #endregion
 
-        public void ShowUCTimeLine(TimeLineItem[] tlItem)
-        {
-            if (plTimeLine.Controls.Count == 0)
-            {
-                uCTimeLine = new UCTimeLine(tlItem, FormHOZMainObject.m_MeasureType);
-                uCTimeLine.Dock = DockStyle.Fill;
-                plTimeLine.Controls.Add(uCTimeLine);
-            }
-        }
-
+        #region 重绘时间轴
+        /// <summary>
+        /// 重绘时间轴
+        /// </summary>
         public void TimeLineInvalidate()
         {
             plTimeLine.Invalidate();
             uCTimeLine.Invalidate();
-        }
+        } 
+        #endregion
 
+        #region 显示切孔参数信息
         /// <summary>
         /// 显示切孔参数信息
         /// </summary>
@@ -107,8 +107,10 @@ namespace HOZProject
             lblShowState.Text = State;
             lblCutHoleName.Text = CutHoleName;
             CkIsSwitch.Checked = IsSwitch;
-        }
+        } 
+        #endregion
 
+        #region 绑定流程信息
         /// <summary>
         /// 绑定流程信息
         /// </summary>
@@ -124,9 +126,18 @@ namespace HOZProject
                 ShowUCTimeLine(TlItem);
             }
         }
+        public void ShowUCTimeLine(TimeLineItem[] tlItem)
+        {
+            if (plTimeLine.Controls.Count == 0)
+            {
+                uCTimeLine = new UCTimeLine(tlItem, FormHOZMainObject.m_MeasureType);
+                uCTimeLine.Dock = DockStyle.Fill;
+                plTimeLine.Controls.Add(uCTimeLine);
+            }
+        }
         private TimeLineItem[] GetMeasureFlowStructInfo()
         {
-            string xmlfullname = Application.StartupPath+ @"\MeasureXML\MeasureStructXml.xml";
+            string xmlfullname = Application.StartupPath + @"\MeasureXML\MeasureStructXml.xml";
             XmlNodeList nodeList = XmlManager.GetXmlMeasureFlowNodeInfo(xmlfullname);
             if (nodeList != null)
             {
@@ -134,22 +145,66 @@ namespace HOZProject
             }
             return null;
         }
-
         private TimeLineItem[] XmlConvertTimeListItem(XmlNodeList nodeList)
         {
-            TimeLineItem[] timeLineItem = new TimeLineItem[nodeList.Count];
+            List<TimeLineItem> timeLineList = new List<TimeLineItem>();
             for (int i = 0; i < nodeList.Count; i++)
             {
-                TimeLineItem tlItem = new TimeLineItem();
-                tlItem.Details = nodeList[i].Attributes["Details"].Value;
-                tlItem.Code = nodeList[i].Attributes["Code"].Value;
-                tlItem.State = -1;
-                tlItem.Title = nodeList[i].Attributes["Title"].Value;
-                tlItem.IsData = Convert.ToBoolean(nodeList[i].Attributes["IsData"].Value);
-                tlItem.Type = nodeList[i].Attributes["Type"].Value;
-                timeLineItem[i] = tlItem;
+                if (Convert.ToBoolean(nodeList[i].Attributes["IsShow"].Value))
+                {
+                    TimeLineItem tlItem = new TimeLineItem();
+                    tlItem.Details = nodeList[i].Attributes["Details"].Value;
+                    tlItem.Code = nodeList[i].Attributes["Code"].Value;
+                    tlItem.State = -1;
+                    tlItem.Title = nodeList[i].Attributes["Title"].Value;
+                    tlItem.IsData = Convert.ToBoolean(nodeList[i].Attributes["IsData"].Value);
+                    tlItem.Type = nodeList[i].Attributes["Type"].Value;
+                    tlItem.IsShow = Convert.ToBoolean(nodeList[i].Attributes["IsShow"].Value);
+                    tlItem.Index = Convert.ToInt32(nodeList[i].Attributes["Index"].Value);
+                    timeLineList.Add(tlItem);
+                }
             }
+            TimeLineItem[] timeLineItem = new TimeLineItem[timeLineList.Count];
+            //按照Index进行升序
+            timeLineItem = timeLineList.OrderBy(i => i.Index).ToArray();
+            //清空时间轴列表
+            timeLineList.Clear();
             return timeLineItem;
+        } 
+        #endregion
+
+        #region 关闭按钮 鼠标操作事件
+        private void pbClose_MouseEnter(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Red;
         }
+
+        private void pbClose_MouseLeave(object sender, EventArgs e)
+        {
+            pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+        }
+        #endregion
+
+        #region 设置切孔是否检测
+        private void CkIsSwitch_CheckedChanged(object sender, EventArgs e)
+        {
+            //设置切孔是否检测
+            List<CutHole> cutHoles = formHOZMain.m_MeasureFile.ListCutHole;
+            foreach (CutHole item in cutHoles)
+            {
+                if (item.HoleName == CutHoleName)
+                {
+                    item.SWITCH = CkIsSwitch.Checked;
+                    //是否已保存
+                    if (formHOZMain.IsSave)
+                    {
+                        //保存测量文件
+                        formHOZMain.m_MeasureFile.Save();
+                    }
+                    break;
+                }
+            }
+        } 
+        #endregion
     }
 }

+ 1 - 1
HOZProject/UserControls/UControl_ParaInfo.resx

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