protected void LiveDAQCtrlCHandler(object sender, ConsoleCancelEventArgs args) { //Announce that the event handler has been invoked. ctrllog.TraceInformation("Interrupting the {0} action", NC.App.Opstate.Action); args.Cancel = true; // Set the Cancel property to true to prevent the process from terminating NC.App.Opstate.SOH = NCC.OperatingState.Cancelling; CurState.Cancel(); }
public bool StartHVCalib() { ResetForMeasurement(); bool res = false; if (ctrlHVCalib == null) { ctrlHVCalib = new HVControl(this); } if (CurState.State == DAQInstrState.HVCalib) { CurState.Cancel(); } else { res = ctrlHVCalib.HVStartCalibration((NC.App.Opstate.Measurement.AcquireState.lm.Feedback ? 1 : 0)); } return(res); }
public bool StartHVCalib() { ResetForMeasurement(); bool res = false; if (ctrlHVCalib == null) { ctrlHVCalib = new HVControl(this); } if (CurState.State == DAQInstrState.HVCalib) // one already in progress { CurState.Cancel(); } else { res = ctrlHVCalib.HVStartCalibration(); } return(res); }
public void StopCurrentAction() { ctrllog.TraceInformation("Stopping the {0} action ({1} instruments{2})", NC.App.Opstate.Action, Instruments.Active.Count, (Instruments.Active.Count == 1 ? String.Empty : "s")); NC.App.Opstate.SOH = NCC.OperatingState.Stopping; CurState.Cancel(); }