浏览代码

alter the measure flow ,and regulate the HMI .

gsp 4 年之前
父节点
当前提交
969e0bc127

+ 1 - 1
HOZProject/FormHOZMain.Designer.cs

@@ -506,8 +506,8 @@
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "FormHOZMain";
             this.Text = "FormHOZMain";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormHOZMain_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormHOZMain_FormClosing);
-           
             this.Load += new System.EventHandler(this.FormHOZMain_Load);
             this.Load += new System.EventHandler(this.FormHOZMain_Load);
+            this.LocationChanged += new System.EventHandler(this.FormHOZMain_LocationChanged);
             this.Paint += new System.Windows.Forms.PaintEventHandler(this.FormHOZMain_Paint);
             this.Paint += new System.Windows.Forms.PaintEventHandler(this.FormHOZMain_Paint);
             this.Resize += new System.EventHandler(this.FormHOZMain_Resize);
             this.Resize += new System.EventHandler(this.FormHOZMain_Resize);
             this.plMain.ResumeLayout(false);
             this.plMain.ResumeLayout(false);

+ 21 - 5
HOZProject/FormHOZMain.cs

@@ -305,6 +305,10 @@ namespace HOZProject
             }
             }
             logwin = new OTSMeasureOutputNlog();
             logwin = new OTSMeasureOutputNlog();
             logwin.Show();
             logwin.Show();
+            logwin.Height = this.Height;
+            logwin.Left = this.Left - logwin.Width;
+            logwin.Top = this.Top;
+           
             NLog.Config.LoggingRule lr = NLog.LogManager.Configuration.LoggingRules.FirstOrDefault(
             NLog.Config.LoggingRule lr = NLog.LogManager.Configuration.LoggingRules.FirstOrDefault(
                 r => r.Targets.Any(
                 r => r.Targets.Any(
                     t => "control" == t.Name
                     t => "control" == t.Name
@@ -321,7 +325,7 @@ namespace HOZProject
 
 
             log = NLog.LogManager.GetCurrentClassLogger();
             log = NLog.LogManager.GetCurrentClassLogger();
             ConfigurationParameter();
             ConfigurationParameter();
-
+            this.Left= this.Location.X + logwin.Width / 2;
         }
         }
         #endregion
         #endregion
 
 
@@ -657,6 +661,7 @@ namespace HOZProject
             }
             }
             m_FormInit.ShowDialog();
             m_FormInit.ShowDialog();
             ConfigurationParameter();
             ConfigurationParameter();
+            m_FormInit.Left = this.Left;
         }
         }
 
 
         private void pictureBox1_Click(object sender, EventArgs e)
         private void pictureBox1_Click(object sender, EventArgs e)
@@ -1083,10 +1088,10 @@ namespace HOZProject
         {
         {
             #region 初始化参数的默认值
             #region 初始化参数的默认值
                 // add by zjx 2020-12-20 厂商参数
                 // add by zjx 2020-12-20 厂商参数
-                m_MeasureFile.MParam.VendorType0 = Convert.ToString(ConfigurationManager.AppSettings["VendorType0"]);
-                m_MeasureFile.MParam.VendorType1 = Convert.ToString(ConfigurationManager.AppSettings["VendorType1"]);
-                m_MeasureFile.MParam.VendorType2 = Convert.ToString(ConfigurationManager.AppSettings["VendorType2"]);
-                m_MeasureFile.MParam.VendorType3 = Convert.ToString(ConfigurationManager.AppSettings["VendorType3"]);
+                //m_MeasureFile.MParam.VendorType0 = Convert.ToString(ConfigurationManager.AppSettings["VendorType0"]);
+                //m_MeasureFile.MParam.VendorType1 = Convert.ToString(ConfigurationManager.AppSettings["VendorType1"]);
+                //m_MeasureFile.MParam.VendorType2 = Convert.ToString(ConfigurationManager.AppSettings["VendorType2"]);
+                //m_MeasureFile.MParam.VendorType3 = Convert.ToString(ConfigurationManager.AppSettings["VendorType3"]);
                 // add by zjx 2020-12-20 厂商参数 end 
                 // add by zjx 2020-12-20 厂商参数 end 
                 // add by zjx 2020-12-21 校正角度
                 // add by zjx 2020-12-21 校正角度
                 m_MeasureFile.MParam.CorrectionType0 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType0"]);
                 m_MeasureFile.MParam.CorrectionType0 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType0"]);
@@ -1170,5 +1175,16 @@ namespace HOZProject
                 }
                 }
             }
             }
         }
         }
+
+        private void FormHOZMain_LocationChanged(object sender, EventArgs e)
+        {
+            if (logwin != null)
+            {
+             logwin.Left = this.Left-logwin.Width;
+            logwin.Top = this.Top;
+
+            }
+           
+        }
     }
     }
 }
 }

+ 2 - 1
HOZProject/Program.cs

@@ -24,7 +24,8 @@ namespace HOZProject
             System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 
             System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 
             if (createdNew) //赋予了线程初始所属权,也就是首次使用互斥体 
             if (createdNew) //赋予了线程初始所属权,也就是首次使用互斥体 
             {
             {
-                Application.Run(new FormHOZMain());
+                FormHOZMain mainForm = new FormHOZMain();
+                Application.Run(mainForm);
                 //Application.Run(new FormUnitControl());
                 //Application.Run(new FormUnitControl());
                 instance.ReleaseMutex();
                 instance.ReleaseMutex();
             }
             }

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

@@ -121,6 +121,7 @@
             this.label26 = new System.Windows.Forms.Label();
             this.label26 = new System.Windows.Forms.Label();
             this.tbScanSpeedFocus = new System.Windows.Forms.TextBox();
             this.tbScanSpeedFocus = new System.Windows.Forms.TextBox();
             this.tbScanSpeedHigh = new System.Windows.Forms.TextBox();
             this.tbScanSpeedHigh = new System.Windows.Forms.TextBox();
+            this.label27 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
@@ -1230,12 +1231,25 @@
             this.tbScanSpeedHigh.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
             this.tbScanSpeedHigh.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
             this.tbScanSpeedHigh.Visible = false;
             this.tbScanSpeedHigh.Visible = false;
             // 
             // 
+            // label27
+            // 
+            this.label27.AutoSize = true;
+            this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label27.ForeColor = System.Drawing.Color.Black;
+            this.label27.Location = new System.Drawing.Point(362, 189);
+            this.label27.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label27.Name = "label27";
+            this.label27.Size = new System.Drawing.Size(39, 20);
+            this.label27.TabIndex = 156;
+            this.label27.Text = "厂商";
+            // 
             // UControl_Init
             // UControl_Init
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.label27);
             this.Controls.Add(this.tbScanSpeedHigh);
             this.Controls.Add(this.tbScanSpeedHigh);
             this.Controls.Add(this.tbScanSpeedFocus);
             this.Controls.Add(this.tbScanSpeedFocus);
             this.Controls.Add(this.tbScanSpeedNormal);
             this.Controls.Add(this.tbScanSpeedNormal);
@@ -1438,5 +1452,6 @@
         private System.Windows.Forms.Label label26;
         private System.Windows.Forms.Label label26;
         private System.Windows.Forms.TextBox tbScanSpeedFocus;
         private System.Windows.Forms.TextBox tbScanSpeedFocus;
         private System.Windows.Forms.TextBox tbScanSpeedHigh;
         private System.Windows.Forms.TextBox tbScanSpeedHigh;
+        private System.Windows.Forms.Label label27;
     }
     }
 }
 }

+ 10 - 5
HOZProject/UserControls/UControl_Init.cs

@@ -987,6 +987,8 @@ namespace HOZProject
 
 
             //增加一个测量文件的参数修改
             //增加一个测量文件的参数修改
             SaveMeasureFile();
             SaveMeasureFile();
+            Form fParent = this.ParentForm;
+            fParent.Close();
         }
         }
         #endregion
         #endregion
 
 
@@ -1563,7 +1565,7 @@ namespace HOZProject
         {
         {
             if (cbbWYP.Text == "0")
             if (cbbWYP.Text == "0")
             {
             {
-                cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType0;//厂商
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType0;//厂商
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType0;//拉直放大倍数
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType0;//拉直放大倍数
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType0;//定位电压
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType0;//定位电压
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType0;//定位放大倍数
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType0;//定位放大倍数
@@ -1571,11 +1573,12 @@ namespace HOZProject
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType0;//拍照放大倍数
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType0;//拍照放大倍数
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType0;//能谱电压值
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType0;//能谱电压值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType0;//能谱电流值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType0;//能谱电流值
+                label27.Text = "0-AA Hole";
             }
             }
             else
             else
                         if (cbbWYP.Text == "1")
                         if (cbbWYP.Text == "1")
             {
             {
-                cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType1;//厂商
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType1;//厂商
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType1;//拉直放大倍数
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType1;//拉直放大倍数
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType1;//定位电压
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType1;//定位电压
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType1;//定位放大倍数
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType1;//定位放大倍数
@@ -1583,11 +1586,12 @@ namespace HOZProject
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType1;//拍照放大倍数
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType1;//拍照放大倍数
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType1;//能谱电压值
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType1;//能谱电压值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType1;//能谱电流值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType1;//能谱电流值
+                label27.Text = "1-AA区";
             }
             }
             else
             else
                         if (cbbWYP.Text == "2")
                         if (cbbWYP.Text == "2")
             {
             {
-                cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType2;//厂商
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType2;//厂商
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType2;//拉直放大倍数
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType2;//拉直放大倍数
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType2;//定位电压
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType2;//定位电压
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType2;//定位放大倍数
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType2;//定位放大倍数
@@ -1595,11 +1599,12 @@ namespace HOZProject
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType2;//拍照放大倍数
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType2;//拍照放大倍数
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType2;//能谱电压值
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType2;//能谱电压值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType2;//能谱电流值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType2;//能谱电流值
+                label27.Text = "2-Pad bending";
             }
             }
             else
             else
                         if (cbbWYP.Text == "3")
                         if (cbbWYP.Text == "3")
             {
             {
-                cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType3;//厂商
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType3;//厂商
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType3;//拉直放大倍数
                 cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType3;//拉直放大倍数
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType3;//定位电压
                 cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType3;//定位电压
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType3;//定位放大倍数
                 cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType3;//定位放大倍数
@@ -1607,8 +1612,8 @@ namespace HOZProject
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType3;//拍照放大倍数
                 cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType3;//拍照放大倍数
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType3;//能谱电压值
                 cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType3;//能谱电压值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType3;//能谱电流值
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType3;//能谱电流值
+                label27.Text = "3-DDIC";
             }
             }
         }
         }
-
     }
     }
 }
 }

+ 5 - 5
MeasureData/MeasureFile.cs

@@ -246,13 +246,13 @@ namespace MeasureData
 
 
             SaveFileDialog sfd = new SaveFileDialog();
             SaveFileDialog sfd = new SaveFileDialog();
             sfd.Title = "保存测量文件";
             sfd.Title = "保存测量文件";
-            sfd.InitialDirectory = @"D:\FIB AUTO\";
+            sfd.InitialDirectory = @"D:\FIB_AUTO\";
             sfd.Filter = "测量文件(*.msf)|*.msf";
             sfd.Filter = "测量文件(*.msf)|*.msf";
 
 
-            if (Directory.Exists(this.FilePath))
-            {
-                sfd.InitialDirectory = this.FilePath;
-            }
+            //if (Directory.Exists(this.FilePath))
+            //{
+            //    sfd.InitialDirectory = this.FilePath;
+            //}
 
 
             if (sfd.ShowDialog() == DialogResult.OK)
             if (sfd.ShowDialog() == DialogResult.OK)
             {
             {

文件差异内容过多而无法显示
+ 342 - 292
MeasureThread/Measure.cs


部分文件因为文件数量过多而无法显示