浏览代码

测量线程增加图片路径和切孔名称。

@wang_qi0307 5 年之前
父节点
当前提交
79e1d4ce60
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      MeasureThread/Measure.cs

+ 7 - 3
MeasureThread/Measure.cs

@@ -362,6 +362,9 @@ namespace MeasureThread
         public event ThreadStatusHandler SendThreadStatus;  // 声明事件
         public event CutHolesStatusHandler SendCutHolesStatus;  // 声明事件
 
+        //定义一个全局的消息类
+        ThreadStatusEventArgs arg = new ThreadStatusEventArgs("0-0");
+
         //全局只有一个fatorySEM
         static FactoryHardware factorySEM = FactoryHardware.Instance;
         ISEMControl iSEM = factorySEM.ISEM;
@@ -467,7 +470,7 @@ namespace MeasureThread
 
         public void SendMsg(string step_code)
         {
-            ThreadStatusEventArgs arg = new ThreadStatusEventArgs(step_code);
+            arg.Step_Code = step_code;
             arg.Time = DateTime.Now;
             switch(step_code)
             {
@@ -481,6 +484,7 @@ namespace MeasureThread
                     arg.Picture_Information.Work_Status = "SEM";
                     arg.Picture_Information.Work_Distance = iSEM.GetWorkingDistance();
                     arg.Picture_Information.Magnification = iSEM.GetMagnification();
+                    arg.HoleName = cutHoles[m_nWorkHoleNo].HoleName;
                     break;
                 case "1-10":
                 case "1-18":
@@ -769,13 +773,13 @@ namespace MeasureThread
                     //3. 保存图片1
                     WorkingFolder = m_measureFile.FilePath;
                     String fileName1 = WorkingFolder + "\\" + m_nWorkHoleNo.ToString() + "Hole" + ImageName1;
-                    SendMsg("SEM拍照存储到" + fileName1);
+                    arg.Picture_Information.Picture_FullPath = fileName1;
                     if (!GetImage(ImageMode.SEM, fileName1))
                     {
                         SendMsg("SEM拍照失败");
                         return false;
                     }
-
+                    SendMsg("1-3");
                     Thread.Sleep(3000);
                 }