public void CloseApplication()
 {
     SetWindowsHook.Stop();
     loopbackRecorder.StopRecording();
     devices.Dispose();
     streamingRequestListener.StopListening();
     notifyIcon.Visible = false;
     mainForm.Dispose();
 }
 public void OnSetHooks(bool setHooks)
 {
     if (setHooks)
     {
         SetWindowsHook.Start(devices);
     }
     else
     {
         SetWindowsHook.Stop();
     }
 }
Esempio n. 3
0
 private void ChkHook_CheckedChanged(object sender, EventArgs e)
 {
     if (chkHook.Checked)
     {
         SetWindowsHook.Start(devices);
     }
     else
     {
         SetWindowsHook.Stop();
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Close the application.
 /// </summary>
 public void CloseApplication()
 {
     SaveSettings();
     SetWindowsHook.Stop();
     loopbackRecorder?.StopRecording();
     devices?.Dispose();
     streamingRequestListener?.StopListening();
     if (notifyIcon != null)
     {
         notifyIcon.Visible = false;
     }
     if (mainForm != null)
     {
         mainForm.Dispose();
     }
 }