コード例 #1
0
ファイル: SoundProvider.cs プロジェクト: schwarz/handle
 /// <summary>
 /// Plays sound to notify the user of an important message
 /// </summary>
 /// <param name="args"></param>
 public void Notify(MessageFilterEventArgs args)
 {
     if (this.settings.SoundPath != "")
     {
         try
         {
             ExtendedSoundPlayer sp = new ExtendedSoundPlayer(this.settings.SoundPath);
             sp.PlaySound();
         }
         catch (FileNotFoundException ex)
         {
             Console.WriteLine(ex.ToString());
         }
     }
     else
     {
         Console.WriteLine("Keine Sounddatei ausgewählt");
     }
 }
コード例 #2
0
ファイル: SoundProvider.cs プロジェクト: schwarz/handle
 /// <summary>
 /// Plays sound to notify the user of an important message
 /// </summary>
 /// <param name="args"></param>
 public void Notify(MessageFilterEventArgs args)
 {
     if (this.settings.SoundPath != "")
       {
     try
     {
       ExtendedSoundPlayer sp = new ExtendedSoundPlayer(this.settings.SoundPath);
       sp.PlaySound();
     }
     catch (FileNotFoundException ex)
     {
       Console.WriteLine(ex.ToString());
     }
       }
       else
       {
     Console.WriteLine("Keine Sounddatei ausgewählt");
       }
 }