static void Main() { using (var hook = new KeyboardHook { SelectedKey = Key.F1 }) { var app = new App(hook); app.InitializeComponent(); RNSMain.ConsoleCommand.Register(new AutoPluginCommand()); if (Properties.Settings.Default.AutoPlugin == null) Properties.Settings.Default.AutoPlugin = new System.Collections.Specialized.StringCollection(); app.Run(); } }
public App(KeyboardHook keyboardHook) { if (keyboardHook == null) throw new ArgumentNullException("keyboardHook"); keyboardHook.KeyCombinationPressed += KeyCombinationPressed; }