Browse Source

修改进程启动延迟提示音问题

章政 8 years ago
parent
commit
778ed7973f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

+ 3 - 2
UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

@@ -14,6 +14,7 @@ namespace UAS_MES.CustomControl.RichText
         public RichTextAutoBottom()
         {
             InitializeComponent();
+            thread = new Thread(PlaySound);
             TextChanged += RichTextBox_TextChange;
         }
 
@@ -35,8 +36,8 @@ namespace UAS_MES.CustomControl.RichText
             //如果颜色是红色则进行提示音
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
-                thread = new Thread(PlaySound);
                 thread.Start();
+                thread = new Thread(PlaySound);
             }
         }
 
@@ -54,8 +55,8 @@ namespace UAS_MES.CustomControl.RichText
             //如果颜色是红色则进行提示音
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
-                thread = new Thread(PlaySound);
                 thread.Start();
+                thread = new Thread(PlaySound);
             }
         }