protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
Dispatcher.UnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Dispatcher_UnhandledException);
hotkey = new Hotkey();
hotkey.Ctrl = true;
hotkey.KeyCode = BlipFace.Properties.Settings.Default.HotKey;
hotkey.HotkeyPressed += new EventHandler(hotkey_HotkeyPressed);
BlipFace.Properties.Settings.Default.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Default_PropertyChanged);
try
{
hotkey.Enabled = true;
}
catch (HotkeyAlreadyInUseException)
{
MessageBox.Show("HotKey jest już zajęty. Zmień w ustawieniach HotKey na inny.");
}
}