private void CheckAudio_FormClosing(object sender, FormClosingEventArgs e) { if (StartForm.CloseApplicationAll || Continue) { Clear(); return; } if (StartForm.CloseApplication()) { Clear(); Application.Exit(); } else { e.Cancel = true; } }
private void Task_FormClosing(object sender, FormClosingEventArgs e) { if (Continue) { return; } if (StartForm.CloseApplicationAll) { recorder.StopTask(); return; } if (StartForm.CloseApplication()) { recorder.StopTask(); Application.Exit(); } else { e.Cancel = true; } }