public GuestBookViewModel() { AddGuestCommand = new MvxCommand(AddGuest); }
public MainViewModel() { ShowInitialViewModelsCommand = new MvxCommand(ShowInitialViewModels); }
public Tab1ViewModel() { OpenChildCommand = new MvxCommand(() => ShowViewModel <TabChildViewModel>()); OpenModalCommand = new MvxCommand(() => ShowViewModel <ModalViewModel>()); }
public ChooseZipViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; ShowDetailsCommand = new MvxCommand <string>(OnShowDetailsCommandExecute, CanExecuteShowDetailsCommand); }
public override void Start() { _navigateToFirstViewCommand = new MvxCommand(async() => await NavigateToFirstView()); base.Start(); }
public CommentsNewsViewModel() { Comments = new ObservableCollection <CommentsNewsItemViewModel>(); SendCommentCommand = new MvxCommand(SendCommentExecute); Title = "Comments"; }
public FirstViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; GoToCmd = new MvxCommand(() => { _navigationService.Navigate <SecondViewModel>(); }); }
public SettingsViewModel() { LogOutCommand = new MvxCommand(LogOutAction); }
public HomeViewModel() { FindCoffee = new MvxCommand(ExecuteFindCoffee); }
public ItemViewModel(MvxCommand <ItemViewModel> deleteCommand) { DeleteCommand = deleteCommand; }
public UserCredentialsViewModel() { Title = "Login"; ForgotPasswordCommand = new MvxCommand(ShowForgotPasswordVm); LoginCommand = new MvxCommand(Login, CanExecuteLogin); }
public PlayerViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; SaveCommand = new MvxCommand(Save); }
public DayPageViewModel() { ShowAverage(); FilterCommand = new MvxCommand(execute: ShowFilter); SelectedTime = DateTime.Now.TimeOfDay; }
public PickerViewModel(IList <string> values, Action <string> selectionChanged) { Values = values; SelectValue = new MvxCommand <string>(selectionChanged); }
public MainViewModel(IRepository repository, IAzureClientService clientService) { _repository = repository; _clientService = clientService; ShowInitialViewModelsCommand = new MvxCommand(ShowInitialViewModels); }
public FirstViewModel() { MyCommand = new MvxCommand(() => Hello = "Command run", () => Hello.Length == 0); }
public MenuItem(string title, HomeViewModel parent, string viewModelUrl) { Title = title; // Will change to navigate to type once https://github.com/MvvmCross/MvvmCross/pull/2148 is in. ShowCommand = new MvxCommand(() => parent._navigationService.Navigate(viewModelUrl)); }
private void InitializeCommands() { _navigateToRideDetailsCommand = new MvxCommand <int>(NavigateToRideDetails); _navigateToRideDetailsAlternativeCommand = new MvxCommand <Ride>(ride => this.NavigateToRideDetails(ride.RideId)); }
public HomeViewModel() { ScanAsTaskCommand = new MvxCommand(DoScanAsTask); ScanAsMessageCommand = new MvxCommand(DoScanAsMessage); WriteTextCommand = new MvxCommand(DoWriteText); }
public RootViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMvxViewModelLoader mvxViewModelLoader) : base(logProvider, navigationService) { _mvxViewModelLoader = mvxViewModelLoader; try { var messenger = Mvx.IoCProvider.Resolve <IMvxMessenger>(); var str = messenger.ToString(); } catch (Exception e) { Console.WriteLine(e.ToString()); } ShowChildCommand = new MvxAsyncCommand(async() => { var result = await NavigationService.Navigate <ChildViewModel, SampleModel, SampleModel>(new SampleModel { Message = "Hey", Value = 1.23m }); var testIfReturn = result; }); ShowModalCommand = new MvxAsyncCommand(Navigate); ShowModalNavCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalNavViewModel>()); ShowTabsCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <TabsRootViewModel>()); ShowPagesCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <PagesRootViewModel>()); 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>()); ShowFluentBindingCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <FluentBindingViewModel>()); RegisterAndResolveWithReflectionCommand = new MvxAsyncCommand(RegisterAndResolveWithReflection); RegisterAndResolveWithNoReflectionCommand = new MvxAsyncCommand(RegisterAndResolveWithNoReflection); _counter = 3; TriggerVisibilityCommand = new MvxCommand(() => IsVisible = !IsVisible); FragmentCloseCommand = new MvxAsyncCommand(() => NavigationService.Navigate <FragmentCloseViewModel>()); ShowLocationCommand = new MvxAsyncCommand(() => NavigationService.Navigate <LocationViewModel>()); }
public MyElementViewModel(MySource source) { Source = source; BCommand = new MvxCommand(ExecuteBCommand); }
public AccentColorMenuData() { ChangeAccentCommand = new MvxCommand <object>(DoChangeTheme); }
public PayHistoryPdfViewModel(IFileManager downloadManager) { this.downloadManager = downloadManager; backToPayHistoryCommand = new MvxCommand(() => { ShowViewModel <PayHistoryViewModel>(); }); fileOpenInCommand = new MvxCommand(() => { downloadManager.OpenIn(PdfUrl, PdfName); }); }
private void CreateCommands() { ShowVideosCommand = new MvxCommand(ShowVideosCommandExecute); }
public MenuItem(string title, MainMenuViewModel parent, Type viewModelType) { Title = title; ViewModelType = viewModelType; ShowCommand = new MvxCommand(() => parent.ShowViewModel(ViewModelType)); }
public NotificationViewModel(IReqDB dbss, IDialogService dialog, ICalendar calendar, IToast toast, INetwork net) { dbs = dbss; this.dialog = dialog; this.calendar = calendar; ReloadCommand.Execute(null); SelectMessage = new MvxCommand <Req>(async selectedItem => { string ifloc = "Not Needed"; string ifcal = "Not Needed"; if (selectedItem.ReqLoc == true) { ifloc = "Needed"; } if (selectedItem.ReqCal == true) { ifcal = "Needed"; } string mes = selectedItem.ReqFrom + "\n" + "Calendar: " + ifcal + "\n" + "Location: " + ifloc + "\n" + "Other Info:" + selectedItem.ReqExtra; List <string> Answer = await dialog.Show(mes, "Status Request", "Send", "Dismiss"); if (Answer[0] == "true") { Message.Remove(selectedItem); await DeleteReq(selectedItem.Id); toast.Show("Status Response Sent"); string calend = ""; // Calander Events for Today string wifi = ""; // Wifi Access point of person // Don't send location or Calendar if ((MyGlobals.SelPer.PLocCheck == false || ifloc == "Not Needed") && (MyGlobals.SelPer.PCalCheck == false || ifcal == "Not Needed")) { calend = ""; wifi = ""; } // Don't send Calendar else if (MyGlobals.SelPer.PCalCheck == false || ifcal == "Not Needed") { calend = ""; wifi = net.SSID(); } // Don't send Location else if (MyGlobals.SelPer.PLocCheck == false || ifloc == "Not Needed") { calend = calendar.returnEvents(); wifi = ""; } // Send both. else { calend = calendar.returnEvents(); wifi = net.SSID(); } MyGlobals.answer = new Answ { AnsFrom = selectedItem.ReqTo, AnsTo = selectedItem.ReqFrom, AnsLoc = wifi, AnsCal = calend, AnsExtra = Answer[1] }; ShowViewModel <RedirectViewModel>(); } else if (Answer[0] == "false") { Message.Remove(selectedItem); await DeleteReq(selectedItem.Id); toast.Show("Status Request Deleted"); } }); }
public MenuViewModel() { ShowProfileCommand = new MvxCommand(ShowProfile); }
public LoginViewModel() { LoginCommand = new MvxAsyncCommand(LoginAsync); RegisterCommand = new MvxCommand(() => ShowViewModel <RegisterViewModel>()); OpenModalCommand = new MvxCommand(() => ShowViewModel <ModalViewModel>()); }
public override void Prepare() { base.Prepare(); DataEmptyActionButtonClickCommand = new MvxCommand(OnDataEmptyActionButtonClicked); }
public StartupViewModel() { GoToNextPageCommand = new MvxCommand(GoToNextPage); }
public FirstViewModel() { //SetTime= new MvxCommand(()=>{SetTimeString();}); SetTime= new MvxCommand(()=>{GotoList();}); }