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(); } }
private void ChkHook_CheckedChanged(object sender, EventArgs e) { if (chkHook.Checked) { SetWindowsHook.Start(devices); } else { SetWindowsHook.Stop(); } }
/// <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(); } }