예제 #1
0
파일: Form1.cs 프로젝트: danarcher/Vocals
 private void ApplyToggleListening()
 {
     if (currentOptions.toggleListening)
     {
         try
         {
             ghk.register();
         }
         catch
         {
             richTextBox.AppendText("Couldn't register hotkey.\r\n");
         }
     }
     else
     {
         try
         {
             ghk.unregister();
         }
         catch
         {
             richTextBox.AppendText("Couldn't unregister hotkey.\r\n");
         }
     }
 }
예제 #2
0
 private void applyToggleListening()
 {
     if (currentOptions.toggleListening)
     {
         try { ghk.register(); } catch { Console.WriteLine("Error registering key properly"); }
     }
     else
     {
         try { ghk.unregister(); } catch { Console.WriteLine("Error registering key properly"); }
     }
 }