private void OpenVibeClassification_FormClosing(object sender, FormClosingEventArgs e) { if (AsyncWorker.IsBusy) { AsyncWorker.CancelAsync(); } OpenVibeController.Stop(); }
void asyncWorker_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker bwAsync = sender as BackgroundWorker; while (!bwAsync.CancellationPending) { analog.Update(); } if (bwAsync.CancellationPending) { OpenVibeController.Stop(); e.Cancel = true; } }
void Clear() { if (OpenVibeController.IsRunning) { OpenVibeController.Stop(); } openVibeWorker.CancelAsync(); //InitOpenVibeWorker(); buttonStart.Text = "Start"; buttonStart.Enabled = true; of = null; tf = null; cf = null; ow = null; ew = null; cw = null; currentForm = null; currentWindow = null; }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { OpenVibeController.Stop(); }
private void buttonExit_Click(object sender, EventArgs e) { OpenVibeController.Stop(); Application.Exit(); }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { OpenVibeController.Stop(); Application.Exit(); }