Пример #1
0
 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"); }
     }
 }