Selaa lähdekoodia

处理.Abort() 报正在中止线程的问题

cxs 1 vuosi sitten
vanhempi
commit
4baa6664e3
1 muutettua tiedostoa jossa 20 lisäystä ja 21 poistoa
  1. 20 21
      OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

+ 20 - 21
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -236,15 +236,7 @@ namespace OTSMeasureApp
             {
                 log.Error(" OTSIncAMeasureAppForm_Load:" + ex.ToString());
             }
-            try
-            {
-                th.Abort();
-            }
-            catch
-            {
-
-            }
-
+            th.Abort();
             this.Activate();
         }
         public void ArrangWorkspaceWindow()
@@ -274,21 +266,28 @@ namespace OTSMeasureApp
         }
        static private void DoSplash()
         {
-            string path = @".\Config\SysData\OTSProgMgrParam.pmf";
-            XmlDocument xmlDocument = new XmlDocument();
-            xmlDocument.Load(path);
-            XmlNode node = xmlDocument.SelectSingleNode("XMLData");
-            XmlElement xe = (XmlElement)node;
-            string str = xe.GetAttribute("SysType");
-            if (str == "IncA")
+            try
             {
-                OTSSplashScreen_IncA sp = new OTSSplashScreen_IncA();
-                sp.ShowDialog();
+                string path = @".\Config\SysData\OTSProgMgrParam.pmf";
+                XmlDocument xmlDocument = new XmlDocument();
+                xmlDocument.Load(path);
+                XmlNode node = xmlDocument.SelectSingleNode("XMLData");
+                XmlElement xe = (XmlElement)node;
+                string str = xe.GetAttribute("SysType");
+                if (str == "IncA")
+                {
+                    OTSSplashScreen_IncA sp = new OTSSplashScreen_IncA();
+                    sp.ShowDialog();
+                }
+                else if (str == "CleannessA")
+                {
+                    OTSSplashScreen_Cleanness sp = new OTSSplashScreen_Cleanness();
+                    sp.ShowDialog();
+                }
             }
-            else if (str == "CleannessA")
+            catch
             {
-                OTSSplashScreen_Cleanness sp = new OTSSplashScreen_Cleanness();
-                sp.ShowDialog();
+
             }
         }