public SelectDateTimeViewModel(IMvxNavigationService navigationService) { Ensure.Argument.IsNotNull(navigationService, nameof(navigationService)); this.navigationService = navigationService; CloseCommand = new MvxAsyncCommand(close); SaveCommand = new MvxAsyncCommand(save); }
public NativeViewModel(IMvxNavigationService navigationService) { ForwardCommand = new MvxAsyncCommand( async() => await navigationService.Navigate <NativeViewModel>().ConfigureAwait(false)); CloseCommand = new MvxAsyncCommand( async() => await navigationService.Close(this).ConfigureAwait(false)); Description = $"View number {_counter++}"; }
public MainViewModel(IMvxNavigationService navigationService, ILoginService iLoginService) { _navigationService = navigationService; _iLoginService = iLoginService; CurrentMainViewCommand = new MvxAsyncCommand(CurrentMainView); TestIOSCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TestLoginViewModel>()); MenuViewCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ListTaskViewModel>()); }
public ContactDispatchViewModel( IMvxLogProvider logProvider , IMvxMessenger messenger , IMvxNavigationService navigationService) : base(logProvider, navigationService) { CloseViewModelCommand = new MvxAsyncCommand(async() => await NavigationService.Close(this)); _messenger = messenger; }
public DeliveryAddressViewModel(IMvxNavigationService navigationService, IAddressService addressService) { _navigationService = navigationService; _addressService = addressService; CloseCommand = new MvxAsyncCommand(async() => await _navigationService.Close(this)); AddressList = new MvxObservableCollection <Address>(); }
public override void Prepare(Note parameter) { model = parameter; this.Title = parameter.Title; this.Description = parameter.Description; UpdateNoteCommand = new MvxAsyncCommand(UpdateNote); RemoveNoteCommand = new MvxAsyncCommand(RemoveNote); }
public HomeViewModel( IMvxNavigationService mvxNavigationService ) { this.mvxNavigationService = mvxNavigationService; RoundButtonClickCommand = new MvxAsyncCommand(RoundButtonClick); RoundButtonText = AppResources.Click; }
public SelectCountryViewModel(IMvxNavigationService navigationService) { Ensure.Argument.IsNotNull(navigationService, nameof(navigationService)); this.navigationService = navigationService; CloseCommand = new MvxAsyncCommand(close); SelectCountryCommand = new MvxAsyncCommand <SelectableCountryViewModel>(selectCountry); }
public ListTaskViewModel(IMvxNavigationService navigationService, ITaskService iTaskService) { _navigationService = navigationService; _iTaskService = iTaskService; Items = new MvxObservableCollection <TaskItem>(); TaskCreateCommand = new MvxAsyncCommand <TaskItem>(TaskCreate); ShowAboutCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <AboutTaskViewModel>()); ShowMenuViewModelCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <MenuViewModel>()); }
public UserListViewModel(IMvxNavigationService navigationService, IUserService userService ) { _navigationService = navigationService; _userService = userService; AddUserCommand = new MvxAsyncCommand(AddUser); }
public MainViewModel( ITogglDataSource dataSource, ITimeService timeService, IRatingService ratingService, IUserPreferences userPreferences, IAnalyticsService analyticsService, IOnboardingStorage onboardingStorage, IInteractorFactory interactorFactory, IMvxNavigationService navigationService, IRemoteConfigService remoteConfigService, ISuggestionProviderContainer suggestionProviders, ISchedulerProvider schedulerProvider) { Ensure.Argument.IsNotNull(dataSource, nameof(dataSource)); Ensure.Argument.IsNotNull(timeService, nameof(timeService)); Ensure.Argument.IsNotNull(ratingService, nameof(ratingService)); Ensure.Argument.IsNotNull(userPreferences, nameof(userPreferences)); Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService)); Ensure.Argument.IsNotNull(interactorFactory, nameof(interactorFactory)); Ensure.Argument.IsNotNull(onboardingStorage, nameof(onboardingStorage)); Ensure.Argument.IsNotNull(navigationService, nameof(navigationService)); Ensure.Argument.IsNotNull(remoteConfigService, nameof(remoteConfigService)); Ensure.Argument.IsNotNull(suggestionProviders, nameof(suggestionProviders)); Ensure.Argument.IsNotNull(schedulerProvider, nameof(schedulerProvider)); this.dataSource = dataSource; this.timeService = timeService; this.userPreferences = userPreferences; this.analyticsService = analyticsService; this.interactorFactory = interactorFactory; this.navigationService = navigationService; this.onboardingStorage = onboardingStorage; this.schedulerProvider = schedulerProvider; SuggestionsViewModel = new SuggestionsViewModel(dataSource, interactorFactory, onboardingStorage, suggestionProviders); RatingViewModel = new RatingViewModel(timeService, dataSource, ratingService, analyticsService, onboardingStorage, navigationService, schedulerProvider); TimeEntriesLogViewModel = new TimeEntriesLogViewModel(timeService, dataSource, interactorFactory, onboardingStorage, analyticsService, navigationService); TimeEntriesViewModel = new TimeEntriesViewModel(dataSource, interactorFactory, analyticsService, schedulerProvider); LogEmpty = TimeEntriesViewModel.Empty.AsDriver(this.schedulerProvider); TimeEntriesCount = TimeEntriesViewModel.Count.AsDriver(this.schedulerProvider); ratingViewExperiment = new RatingViewExperiment(timeService, dataSource, onboardingStorage, remoteConfigService); RefreshCommand = new MvxCommand(Refresh); OpenReportsCommand = new MvxAsyncCommand(openReports); OpenSettingsCommand = new MvxAsyncCommand(openSettings); OpenSyncFailuresCommand = new MvxAsyncCommand(openSyncFailures); EditTimeEntryCommand = new MvxAsyncCommand(editTimeEntry, canExecuteEditTimeEntryCommand); StopTimeEntryCommand = new MvxAsyncCommand(stopTimeEntry, () => isStopButtonEnabled); StartTimeEntryCommand = new MvxAsyncCommand(startTimeEntry, () => CurrentTimeEntryId.HasValue == false); AlternativeStartTimeEntryCommand = new MvxAsyncCommand(alternativeStartTimeEntry, () => CurrentTimeEntryId.HasValue == false); ContinueTimeEntry = new InputAction <TimeEntryViewModel>(continueTimeEntry); SelectTimeEntry = new InputAction <TimeEntryViewModel>(timeEntrySelected); RefreshAction = new UIAction(refresh); }
public MainViewModel(ITranslationService translationService, IMvxNavigationService navigationService) { _translationService = translationService; _navigationService = navigationService; TranslateCommand = new MvxCommand(() => Translate(), () => true); ShowHistoryCommand = new MvxAsyncCommand(ShowHistoryTask); ShowAboutCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <AboutViewModel>()); }
public CounterViewModel(ICountersService service, IMvxNavigationService navigationService) { this.service = service; this.navigationService = navigationService; IncrementCommand = new MvxAsyncCommand(IncrementCounter); DeleteCommand = new MvxAsyncCommand(DeleteCounter); CancelCommand = new MvxAsyncCommand(Cancel); SaveCommand = new MvxAsyncCommand(Save); }
public TipViewModel(IMvxNavigationService navigationService, ICalculationService calculationService, IMonkeyService monkeyService) { _calculationService = calculationService; CommandShowList = new MvxAsyncCommand(asyc => CommandShowListFunction()); CommandCheckLeak = new MvxAsyncCommand(asyc => CommandCheckLeakFunction()); _navigationService = navigationService; _monkeyService = monkeyService; LeakReport = "---"; }
public LoginViewModel(IMvxNavigationService navigationService, IApiService apiService, IUserDialogs userDialogs) { _navigationService = navigationService; _apiService = apiService; _userDialogs = userDialogs; _registerCommand = new MvxAsyncCommand(Register, () => !IsLoading); _loginCommand = new MvxAsyncCommand(Login, () => !IsLoading); }
public NestedChildViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; CloseCommand = new MvxAsyncCommand(async() => await _navigationService.Close(this)); PopToChildCommand = new MvxCommand(() => _navigationService.ChangePresentation(new MvxPopPresentationHint(typeof(ChildViewModel)))); PopToRootCommand = new MvxCommand(() => _navigationService.ChangePresentation(new MvxPopToRootPresentationHint())); RemoveCommand = new MvxCommand(() => _navigationService.ChangePresentation(new MvxRemovePresentationHint(typeof(SecondChildViewModel)))); }
public MenuViewModel(IMvxNavigationService navigation, IUserDialogs dialogs) { _navigation = navigation; _dialogs = dialogs; CloseMenuCommand = new MvxAsyncCommand(() => _navigation.Close(this)); LogOutCommand = new MvxAsyncCommand(LogOut); }
public SessionsViewModel(IMvxNavigationService navigationService) { PlayTapped = new Command <Play>(OnItemSelected); AddPlayCommand = new MvxAsyncCommand(AddPlay); _navigationService = navigationService; Loader = new TaskLoaderNotifier <IEnumerable <SessionGroup> >(); Loader.RefreshCommand = Loader.ReloadCommand = new MvxAsyncCommand(Load); }
public LoginViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { ValidateUsernameCommand = new MvxCommand(ValidateUsername); ValidatePasswordCommand = new MvxCommand(ValidatePassword); LoginCommand = new MvxAsyncCommand(LoginAsync, () => IsValid); CancelCommand = new MvxAsyncCommand(CancelAsync); }
public MainViewModel( IMvxNavigationService navigationService, IRepository repository) { _navigationService = navigationService; _repository = repository; CreateUserCommand = new MvxAsyncCommand(NavigateAsync); }
public OverrideAttributeViewModel(ILoggerFactory logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { CloseCommand = new MvxAsyncCommand(() => NavigationService.Close(this)); ShowTabsCommand = new MvxAsyncCommand(() => NavigationService.Navigate <TabsRootViewModel>()); ShowSecondChildCommand = new MvxAsyncCommand(() => NavigationService.Navigate <SecondChildViewModel>()); }
public MapsViewModel(IMvxNavigationService navigationService, ITaskService iTaskService, IMvxMessenger messenger) { _navigationService = navigationService; _iTaskService = iTaskService; _messenger = messenger; _token = messenger.Subscribe <GoogleMapMessenger>(OnLosationMessage); BackTaskCommand = new MvxAsyncCommand(BackGoogleMap); SaveGoogleMapPointCommand = new MvxAsyncCommand(SaveGoogleMapPoint); }
public DatabaseViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; // Commands NavigateVaultView = new MvxAsyncCommand(() => _navigationService.Navigate <VaultViewModel>()); CreateVaultCommand = new MvxCommand <VaultParams>((s) => CreateVault(s), (s) => CanCreateVault(s)); }
public RootViewModel(IMvxViewModelLoader mvxViewModelLoader) { _mvxViewModelLoader = mvxViewModelLoader; try { var messenger = Mvx.Resolve <IMvxMessenger>(); var str = messenger.ToString(); } catch (Exception e) { Console.WriteLine(e.ToString()); } ShowChildCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ChildViewModel, SampleModel>(new SampleModel { Message = "Hey", Value = 1.23m })); ShowModalCommand = new MvxAsyncCommand(Navigate); ShowModalNavCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalNavViewModel>()); ShowTabsCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <TabsRootViewModel>()); ShowSplitCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SplitRootViewModel>()); ShowNativeCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <NativeViewModel>()); ShowOverrideAttributeCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <OverrideAttributeViewModel>()); ShowSheetCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SheetViewModel>()); ShowWindowCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <WindowViewModel>()); ShowMixedNavigationCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <MixedNavFirstViewModel>()); ShowDictionaryBindingCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <DictionaryBindingViewModel>()); ShowCollectionViewCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <CollectionViewModel>()); ShowSharedElementsCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SharedElementRootChildViewModel>()); ShowCustomBindingCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <CustomBindingViewModel>()); _counter = 3; }
public TrainingsListViewModel(ITrainingService trainingService, IMvxNavigationService navigationService, IMvxViewPresenter viewPresenter) { this.trainingService = trainingService; this.navigationService = navigationService; this.viewPresenter = viewPresenter; ShowTrainingDetailPageAsyncCommand = new MvxAsyncCommand(ShowTrainingDetailPageAsync); LoadAsyncCommand = new MvxAsyncCommand(async() => await LoadTrainings()); CreateTrainingCommand = new MvxAsyncCommand(async() => await this.CreateTraining()); DeleteTrainingCommand = new MvxAsyncCommand <int>(async(x) => await DeleteTrainingAsync(x)); }
public ModalNavViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; CloseCommand = new MvxAsyncCommand(async() => await _navigationService.Close(this)); ShowChildCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ChildViewModel>()); ShowNestedModalCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <NestedModalViewModel>()); }
public ChildViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; CloseCommand = new MvxAsyncCommand(async() => await _navigationService.Close(this)); ShowSecondChildCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SecondChildViewModel>()); ShowRootCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <RootViewModel>()); }
public SplitMasterViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; OpenDetailCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SplitDetailViewModel>()); OpenDetailNavCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SplitDetailNavViewModel>()); ShowRootViewModel = new MvxAsyncCommand(async() => await _navigationService.Navigate <RootViewModel>()); }
public ModalViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; ShowTabsCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TabsRootViewModel>()); CloseCommand = new MvxAsyncCommand(async() => await _navigationService.Close(this)); ShowNestedModalCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <NestedModalViewModel>()); }
public AccountsViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMusicProviderService musicProviderService, IAuthenticationService authenticationService, IMvxMessenger mvxMessenger) : base(logProvider, navigationService) { _musicProviderService = musicProviderService; _authenticationService = authenticationService; _mvxMessenger = mvxMessenger; CloseCommand = new MvxAsyncCommand(async() => await NavigationService.Close(this)); InvokeCommand = new MvxAsyncCommand <MusicProviderAccount>(OnAccountMusicProviderInvoke); }
public LoginViewModel() { LoginCommand = new MvxAsyncCommand(LoginAsync); RegisterCommand = new MvxCommand(() => ShowViewModel<RegisterViewModel>()); OpenModalCommand = new MvxCommand(() => ShowViewModel<ModalViewModel>()); }
public Tab2ViewModel() { LogoutCommand = new MvxAsyncCommand(LogoutAsync); }