Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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();
 }