瀏覽代碼

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

cxs 1 年之前
父節點
當前提交
ca4411b5fc

+ 3 - 55
OTSIncAMeasureApp/10-OTSSplashScreen/OTSSplashScreen_Cleanness.Designer.cs

@@ -22,13 +22,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OTSSplashScreen_Cleanness));
-            this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.label3 = new System.Windows.Forms.Label();
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
-            this.label4 = new System.Windows.Forms.Label();
             this.richTextBox3 = new System.Windows.Forms.RichTextBox();
             this.label5 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
@@ -36,35 +33,6 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             this.SuspendLayout();
             // 
-            // label2
-            // 
-            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.label2.AutoSize = true;
-            this.label2.BackColor = System.Drawing.Color.Transparent;
-            this.label2.CausesValidation = false;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.ForeColor = System.Drawing.SystemColors.InfoText;
-            this.label2.Location = new System.Drawing.Point(265, 297);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(76, 39);
-            this.label2.TabIndex = 1;
-            this.label2.Text = "Fast";
-            this.label2.Click += new System.EventHandler(this.label2_Click);
-            // 
-            // label1
-            // 
-            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.label1.AutoSize = true;
-            this.label1.BackColor = System.Drawing.Color.Transparent;
-            this.label1.CausesValidation = false;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.ForeColor = System.Drawing.SystemColors.InfoText;
-            this.label1.Location = new System.Drawing.Point(29, 297);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(146, 39);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "Accurate";
-            // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.SystemColors.Menu;
@@ -119,20 +87,6 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.richTextBox1.Text = "update log";
             this.richTextBox1.Click += new System.EventHandler(this.richTextBox1_Click);
             // 
-            // label4
-            // 
-            this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.label4.AutoSize = true;
-            this.label4.BackColor = System.Drawing.Color.Transparent;
-            this.label4.CausesValidation = false;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.ForeColor = System.Drawing.SystemColors.InfoText;
-            this.label4.Location = new System.Drawing.Point(443, 297);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(185, 39);
-            this.label4.TabIndex = 8;
-            this.label4.Text = "Convenient";
-            // 
             // richTextBox3
             // 
             this.richTextBox3.BackColor = System.Drawing.SystemColors.Menu;
@@ -168,10 +122,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             // 
             this.label7.AutoSize = true;
             this.label7.BackColor = System.Drawing.Color.Transparent;
-            this.label7.Font = new System.Drawing.Font("华文中宋", 42F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(58, 129);
+            this.label7.Font = new System.Drawing.Font("华文中宋", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(76, 196);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(646, 64);
+            this.label7.Size = new System.Drawing.Size(554, 55);
             this.label7.TabIndex = 12;
             this.label7.Text = "O T S C l e a n n e s s";
             // 
@@ -186,13 +140,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.Controls.Add(this.label7);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.richTextBox3);
-            this.Controls.Add(this.label4);
             this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.pictureBox2);
             this.Controls.Add(this.pictureBox1);
-            this.Controls.Add(this.label1);
-            this.Controls.Add(this.label2);
             this.Cursor = System.Windows.Forms.Cursors.Default;
             this.DoubleBuffered = true;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
@@ -214,13 +165,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
         }
 
         #endregion
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label1;
         private System.Windows.Forms.PictureBox pictureBox1;
         private System.Windows.Forms.PictureBox pictureBox2;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.RichTextBox richTextBox1;
-        private System.Windows.Forms.Label label4;
         private System.Windows.Forms.RichTextBox richTextBox3;
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Label label7;

+ 9 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -236,7 +236,15 @@ namespace OTSMeasureApp
             {
                 log.Error(" OTSIncAMeasureAppForm_Load:" + ex.ToString());
             }
-            th.Abort();
+            try
+            {
+                th.Abort();
+            }
+            catch
+            {
+
+            }
+
             this.Activate();
         }
         public void ArrangWorkspaceWindow()