瀏覽代碼

fix the time problem of saving result file.

gsp 4 年之前
父節點
當前提交
6f199b0ec9
共有 3 個文件被更改,包括 13 次插入13 次删除
  1. 1 1
      HOZProject/FormHOZMain.cs
  2. 1 4
      MeasureData/MeasureFile.cs
  3. 11 8
      MeasureThread/Measure.cs

+ 1 - 1
HOZProject/FormHOZMain.cs

@@ -218,7 +218,7 @@ namespace HOZProject
         {
             try
             {
-               // DogDecrypting.decrypting(100);//参数为许可号
+                DogDecrypting.decrypting(100);//参数为许可号
                 //加载控件的点击事件
                 this.Click += new EventHandler(FormHOZMain_Click);
                 plFill.Click += new EventHandler(FormHOZMain_Click);

+ 1 - 4
MeasureData/MeasureFile.cs

@@ -199,10 +199,7 @@ namespace MeasureData
             {
                 return true;
             }
-            //else
-            //{
-            //    return SaveAs();
-            //}
+      
 
            
             CreateXml();

+ 11 - 8
MeasureThread/Measure.cs

@@ -622,17 +622,19 @@ namespace MeasureThread
                 SendCutHoleMsg(((int)currHole.STATE).ToString(), currHole.HoleName);
                 //开始测量
                 if (!HoleMeasure(currHole))
-                    {                   
-                        currHole.STATE = State.Failed;
-                        currHole.END = DateTime.Now;
-                        //m_measureFile.Save();
-                        SendCutHoleMsg(((int)currHole.STATE).ToString(), currHole.HoleName);
-                    }
+                {                   
+                    currHole.STATE = State.Failed;
+                    currHole.END = DateTime.Now;
+                        
+                    SendCutHoleMsg(((int)currHole.STATE).ToString(), currHole.HoleName);
+                   Thread.Sleep(3000);
+                   continue;
+                }
 
                 //保存文件,将测量状态更改
                 currHole.STATE = State.Success;
                 currHole.END = DateTime.Now;
-                //m_measureFile.Save();
+          
                 SendCutHoleMsg(((int)currHole.STATE).ToString(), currHole.HoleName);
 
                 if (key_stop)
@@ -645,7 +647,7 @@ namespace MeasureThread
                 Thread.Sleep(3000);
             }
 
-
+            m_measureFile.Save();  //save all the measure info into Xml file.
 
         }
 
@@ -1244,6 +1246,7 @@ namespace MeasureThread
                  + currHole.Position.Z.ToString() + ")", true);
                 Locate lo = new Locate(iSEM);
                 lo.LocateCutHolePosition(currHole, MParam.Tilt);
+
                 if (!m_focuse.SetMagnification(MParam.Location_Magnification))
                 {