private void buttonSwitch_Switch_ValueChanged(object sender, EventArgs e) { if (buttonSwitch_Switch.Value) { ApplyConfigAndStartTask(); } else { _scopeTask.Stop(); _funcTask.Stop(); } }
private void OscilloscopeSoftPanelForm_FormClosing(object sender, FormClosingEventArgs e) { _scopeTask?.Stop(); _funcTask?.Stop(); _globalInfo.AITask.Stop(); }