Esempio n. 1
0
        public CalibratorViewModel(EyeTrackerCalibrator calibrator, ICalibrationProfilesService calibrations)
        {
            calibrator.ThrowIfNull(nameof(calibrator));

            _calibrator = calibrator;
            _calibrator.StateChanged += (_, __) => _commands.TryRaiseCanExecuteChanged();

            var plans = new List <CalibrationPlan>()
            {
                CalibrationPlansFactory.CreateBasicPlan9(),
                CalibrationPlansFactory.CreateBasicPlan5(),
                CalibrationPlansFactory.CreateDiamondPlan12(),
            };

            PlansSelection = new SelectionViewModel <CalibrationPlan>(plans)
            {
                SelectedIndex = 0
            };

            Calibration            = new CalibrationViewModel(_calibrator);
            Calibration.Completed += Calibration_Completed;
            Calibration.Cancelled += Calibration_Cancelled;

            HeadPosition       = new HeadPositioningViewModel(_calibrator.HeadPositioning);
            StoredCalibrations = new StoredCalibrationsViewModel(calibrations);
            StoredCalibrations.CalibrationLoaded += StoredCalibrations_CalibrationLoaded;
        }
Esempio n. 2
0
 public CalibratorViewModelFactory(ICalibrationProfilesService calibrations)
 {
     _calibrations = calibrations;
 }
Esempio n. 3
0
 public StoredCalibrationsViewModel(ICalibrationProfilesService calibrations)
 {
     _service = calibrations;
 }