private static void RunForm() { _instance = new WindowsAPIAdapter(); _instance.CreateHandle(); Instancied.Set(); Application.Run(_instance); }
private static void RunForm() { _instance = new WindowsAPIAdapter(); _instance.CreateHandle(); if (_exceptionEventHandler != null) { Application.ThreadException += _exceptionEventHandler; } Application.Run(_instance); }
private static void RunForm() { Log.Information("Starting WindowsAPIAdapter thread"); if (_exceptionEventHandler != null) { Application.ThreadException += _exceptionEventHandler; } _instance = new WindowsAPIAdapter(); _instance.CreateHandle(); Log.Information("Handle created. Running the application."); Application.Run(_instance); Log.Information("End of the WindowsAPIAdapter thread"); }
private static void RunForm() { _instance = new WindowsAPIAdapter(); _instance.CreateHandle(); if (_exceptionEventHandler != null) Application.ThreadException += _exceptionEventHandler; Application.Run(_instance); }
private void HandleHotkeyPress(object sender, WindowsAPIAdapter.KeyPressedEventArgs e) { using (AppLogger.Log.DebugCall()) { if (e.HotKeys != AppConfigs.Configuration.PlaybackHotKeys && e.HotKeys != AppConfigs.Configuration.RecordingHotKeys) { AppLogger.Log.Debug("Not the registered Hotkeys", e.HotKeys); return; } try { if (e.HotKeys == AppConfigs.Configuration.PlaybackHotKeys) { CycleActiveDevice(AudioDeviceType.Playback); } else if (e.HotKeys == AppConfigs.Configuration.RecordingHotKeys) { CycleActiveDevice(AudioDeviceType.Recording); } } catch (Exception ex) { ErrorTriggered?.Invoke(this, new ExceptionEvent(ex)); } } }