Exemplo n.º 1
0
 private void SetupCommand()
 {
     ToggleHVCommand = new SimpleCommand<int>(this.ToggleHV);
     ConnectPeripheralCommand = new SimpleCommand<object>(o => this.ConnectPeripheral());
     FillExperimentalRunsCommand = new SimpleCommand<FillExperimentArgument>(o => this.FillExperimentalRuns(o), o => o.Setting != null);
     ClearExperimentalRunsCommand = new SimpleCommand<object>(o => { ExperimentalRuns.Clear(); QCData = new QCData(); });
     RunSingleCommand = new SimpleCommand<ExperimentalRun>(o => App.ExperimentServer.AddJobs(o));
     SaveExperimentCommand = new SimpleCommand<object>(o => this.SaveWithDialog());
     RunAllSimulationCommand = new SimpleCommand<object>(o => this.RunAllSimulation());
     RunAllCommand = new SimpleCommand<object>(o => this.RunAll());
     StopServerCommand = new SimpleCommand<object>(o => App.ExperimentServer.StopAndClearJob());
     FitChannel1Command = new SimpleCommand<object>(o => FitAllPeak(0), Async:true);
     FitChannel0Command = new SimpleCommand<object>(o => FitAllPeak(1), Async:true);
     FitAllChannelCommand = new SimpleCommand<object>(o => { FitAllPeak(0); FitAllPeak(1); }, Async:true);
     RunQCTestCommand = new SimpleCommand<object>(o => RunQCTest());
 }
Exemplo n.º 2
0
 public ExperimentSaveData()
 {
     Logs = new List<ExperimentLog>();
     QCData = new QCData();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Run Quality control test ie building QCData
 /// Look at class QCData on how to implement this
 /// </summary>
 private void RunQCTest()
 {
     QCData = new QCData(ExperimentalRuns);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        public MainViewModel()
        {
            //if (System.Diagnostics.Debugger.IsAttached)
            //{
            //    App.Settings.Reset();
            //}
            MCA = new DT5780();
            LinearMotor = LinearMotorWrapper.LinearMotor.GetInstance();
            Thermometer = new DigitalThermometer();

            //DAQThread = new MCACalibrator.Threads.DAQThread(MCA);
            MotorStatus = new MotorStatus(LinearMotor);
            PeripheralConnection = new PeripheralConnection();
            LogEntries = new BindingList<LogEntry>();
            ExperimentalRuns = new ObservableCollection<ExperimentalRun>();
            QCData = new QCData();

            MCASettings = App.Settings.MCASettings;

            StartHVPoller();
            StartMotorPoller();
            StartPeripheralConnectionPoller();
            SetupCommand();

            MotorCommand = new MotorCommand(this);
            SettingMaker = new SettingMaker(MCA, LinearMotor, Thermometer, MCASettings);
        }