public RepeatingWordsViewModel(INavigationService navigationServcie, IDialogService dialogService, IUnitOfWork unitOfWork, IAnimationService animationService, ITextToSpeech speechService, IFirstLanguage firstLanguageService) : base(navigationServcie, dialogService) { _animationService = animationService; _unitOfWork = unitOfWork; _firstLanguageService = firstLanguageService; _speechService = speechService; Model = new RepeatingWordsModel(); VoiceActingCommand = new Command(async() => await _speechService.Speak(Model.CurrentWord.EngWord)); EditCurrentWordCommand = new Command(async() => { _isEditing = true; await NavigationService.NavigateToAsync <CreateWordViewModel>(Model.CurrentWord); }); EnterTranslateCommand = new Command(async() => { await _animationService.AnimationFade(WorkContainerView, 0); await ShowEnterTranslate(); await _animationService.AnimationFade(WorkContainerView, 1); }); SelectFromWordsCommand = new Command(async() => { await _animationService.AnimationFade(WorkContainerView, 0); await ShowSelectFromWords(); await _animationService.AnimationFade(WorkContainerView, 1); }); LearningCardsCommand = new Command(async() => { await _animationService.AnimationFade(WorkContainerView, 0); await ShowLearningCards(); await _animationService.AnimationFade(WorkContainerView, 1); }); AppearingCommand = new Command(async() => await AppearingPage()); }
//ctor public SettingsViewModel(INavigationService navigationService, IDialogService dialogService, IThemeService themeService, IKeyboardTranscriptionService transcriptKeyboardService, IVolumeLanguageService volumeService, IFirstLanguage firstLanguageService) : base(navigationService, dialogService) { _themeService = themeService; _transcriptKeyboardService = transcriptKeyboardService; _volumeService = volumeService; _firstLanguageService = firstLanguageService; SetCurrentSettings(); SwitchThemeCommand = new Command(SwitchThemeApp); SwitchTranskriptionKeyboardCommand = new Command(SwitchTranscriptionKeyboard); ChangeFirstLanguageCommand = new Command(SwitchFirstLanguageShow); BackUpCommand = new Command(async() => { await ChooseCreateBackUp(); });; RestoreBackUpCommand = new Command(async() => { await RestoreBackup(); }); ChangeVoiceLanguageCommand = new Command(async() => await NavigationService.NavigateToAsync <VolumeLanguagesViewModel>(this)); }