public ManualRibbonTabViewModel(ITurretService turretService, IDeviceService deviceService, IConfigService configService) { _turretService = turretService; _deviceService = deviceService; _configService = configService; PumpOnCommand = new DelegateCommand(() => _deviceService.PumpOn()); PumpOffCommand = new DelegateCommand(() => _deviceService.PumpOff()); ValveOnCommand = new DelegateCommand(() => _deviceService.ValveOn()); ValveOffCommand = new DelegateCommand(() => _deviceService.ValveOff()); WaterOnCommand = new DelegateCommand(() => _deviceService.WaterOn()); WaterOffCommand = new DelegateCommand(() => _deviceService.WaterOff()); CameraUpCommand = new DelegateCommand(() => _deviceService.TiltCameraAdd(10)); CameraDownCommand = new DelegateCommand(() => _deviceService.TiltCameraAdd(-10)); CameraCenterCommand = new DelegateCommand(() => _deviceService.TiltCameraSet(_configService.DeviceConfig.TiltCameraDefault)); NozzleUpCommand = new DelegateCommand(() => _deviceService.TiltNozzleAdd(-10)); NozzleDownCommand = new DelegateCommand(() => _deviceService.TiltNozzleAdd(10)); NozzleCenterCommand = new DelegateCommand(() => _deviceService.TiltNozzleSet(_configService.DeviceConfig.TiltNozzleDefault)); PanLeftCommand = new DelegateCommand(() => _deviceService.PanAdd(-50, 0)); PanRightCommand = new DelegateCommand(() => _deviceService.PanAdd(50, 0)); PanCenterCommand = new DelegateCommand(() => _deviceService.PanSet(0, 0)); }
public ModeBase() { _deviceService = ServiceLocator.Current.GetInstance <IDeviceService>(); _turretService = ServiceLocator.Current.GetInstance <ITurretService>(); _configService = ServiceLocator.Current.GetInstance <IConfigService>(); _plantService = ServiceLocator.Current.GetInstance <IPlantService>(); _physicsService = ServiceLocator.Current.GetInstance <IPhysicsService>(); }
public ManualWorkspaceViewModel(ITurretService turretService) { _turretService = turretService; }
public StandbyWorkspaceViewModel(ITurretService turretService) { _turretService = turretService; }
public CleaningWorkspaceViewModel(ITurretService turretService) { _turretService = turretService; }
public WateringWorkspaceViewModel(ITurretService turretService) { _turretService = turretService; }