浏览代码

换提示音

shim 8 年之前
父节点
当前提交
0500152139
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

+ 8 - 4
UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

@@ -36,14 +36,16 @@ namespace UAS_MES.CustomControl.RichText
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
             {
                 FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
                 FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
             }
             }
             else if(color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             else if(color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
             {
                 //颜色是绿色,进行正确提示音
                 //颜色是绿色,进行正确提示音
                 FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
                 FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
             }
             }
-            thread.Start();
-            thread = new Thread(PlaySound);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -61,14 +63,16 @@ namespace UAS_MES.CustomControl.RichText
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
             {
                 FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
                 FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
             }
             }
             else if(color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             else if(color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
             {
                 //颜色是绿色,进行正确提示音
                 //颜色是绿色,进行正确提示音
                 FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
                 FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
             }
             }
-            thread.Start();
-            thread = new Thread(PlaySound);
         }
         }
 
 
         private void PlaySound()
         private void PlaySound()