상속: System.Windows.Forms.Form
예제 #1
0
 private static void RunForm()
 {
     _instance = new WindowsAPIAdapter();
     _instance.CreateHandle();
     Instancied.Set();
     Application.Run(_instance);
 }
예제 #2
0
 private static void RunForm()
 {
     _instance = new WindowsAPIAdapter();
     _instance.CreateHandle();
     if (_exceptionEventHandler != null)
     {
         Application.ThreadException += _exceptionEventHandler;
     }
     Application.Run(_instance);
 }
예제 #3
0
        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");
        }
예제 #4
0
 private static void RunForm()
 {
     _instance = new WindowsAPIAdapter();
     _instance.CreateHandle();
     if (_exceptionEventHandler != null)
         Application.ThreadException += _exceptionEventHandler;
     Application.Run(_instance);
 }
예제 #5
0
        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));
                }
            }
        }
예제 #6
0
 private static void RunForm()
 {
     _instance = new WindowsAPIAdapter();
     _instance.CreateHandle();
     Instancied.Set();
     Application.Run(_instance);
 }