public MainViewModel(ISettingsRepository settingsRepository, IBeerRepository beerRepository, IInteractionService interactionService, IDrinkerCycleRepository drinkerCycleRepository, IHistoryNavigationService navigationService, IProgressService progressService) { _settingsRepository = settingsRepository; _beerRepository = beerRepository; _interactionService = interactionService; _drinkerCycleRepository = drinkerCycleRepository; _navigationService = navigationService; _progressService = progressService; _addBeer = new RelayCommand(AddBeer); _removeBeer = new RelayCommand(RemoveBeer, () => CanRemoveBeer); _addGroup = new RelayCommand(AddGroup, () => CanAddGroup); _refreshCommand = new RelayCommand(Refresh, () => CanRefresh); _openSettingsCommand = new RelayCommand(OpenSettings); Messenger.Default.Register<Messages>(this, EvaluateMessages); if (IsInDesignMode) { DrinkerCycles = _drinkerCycleRepository.GetSampleCycles(); UserInformation = settingsRepository.GetSampleUserInformations(); } else { Initialize(); } }
public SettingsViewModel(ISettingsRepository settingsRepository, IProgressService progressService, IHistoryNavigationService navigationService, IStorageService storageService) : base(settingsRepository, storageService) { _settingsRepository = settingsRepository; _progressService = progressService; _navigationService = navigationService; _saveSettings = new RelayCommand(SaveSettings, () => CanSaveSettings); }
public WizardViewModel(IInteractionService interactionService, ISettingsRepository settingsRepository, IStorageService storageService, IHistoryNavigationService navigationService, IProgressService progressService) : base(settingsRepository,storageService) { _interactionService = interactionService; _settingsRepository = settingsRepository; _navigationService = navigationService; _progressService = progressService; _exitWizard = new RelayCommand(ExitWizard, () => CanExitWizard); if (!IsInDesignMode) InitializeWizard(); }
public DrinkerCycleViewModel(IDrinkerCycleRepository drinkerCycleRepository, IProgressService progressService, IHistoryNavigationService navigationService) { _drinkerCycleRepository = drinkerCycleRepository; _progressService = progressService; _navigationService = navigationService; _authDrinker = new RelayCommand<Person>(AuthDrinker, CanAuthenticateDrinker); _removeDrinker = new RelayCommand<Person>(RemoveDrinker, CanRemoveDrinker); _leaveGroupCommand = new RelayCommand(LeaveGroup); if (IsInDesignMode) { DrinkerCycle = _drinkerCycleRepository.GetSampleCycles()[0]; } Messenger.Default.Register<DrinkerCycle>(this, Messages.Select, SelectDrinkerCycle); }