public MissionDetailsPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { Mission = new MissionDTO(); Title = "Mission"; // Reload the page if the mission was edited MessagingCenter.Subscribe <NewMissionPageViewModel, MissionDTO>(this, MessagingCenterMessages.NewMission, async(sender, mission) => { try { IsBusy = true; if (Mission?.Id == mission.Id) { await ReloadPage(mission.Id); } } catch (Exception ex) { base.DisplayExceptionMessage(ex); } finally { IsBusy = false; } }); }
public ViewModelBase( INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) { NavigationService = navigationService; ModalNavigationService = modalNavigationService; DialogService = dialogService; AppService = appService; }
public NewMissionPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { try { IsBusy = true; MaxX = Preferences.Get(Settings.GridMaxX, 0); MaxY = Preferences.Get(Settings.GridMaxY, 0); Model = new MissionRequestDTO { MaxX = MaxX, MaxY = MaxY }; } catch (Exception ex) { base.DisplayExceptionMessage(ex); } finally { IsBusy = false; } }
public MissionsPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { Missions = new ObservableCollection <MissionDTO>(); // Reload the list if a new mission was created MessagingCenter.Subscribe <NewMissionPageViewModel, MissionDTO>(this, MessagingCenterMessages.NewMission, async(sender, mission) => { try { IsBusy = true; await ReloadPage(); } catch (Exception ex) { base.DisplayExceptionMessage(ex); } finally { IsBusy = false; } }); }
public MainMasterDetailPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { }
public SettingsPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { MaxX = Preferences.Get(Settings.GridMaxX, 0); MaxY = Preferences.Get(Settings.GridMaxY, 0); }
public LoginPageViewModel(INavigationService navigationService, IModalNavigationService modalNavigationService, IPageDialogService dialogService, IAppService appService) : base(navigationService, modalNavigationService, dialogService, appService) { Username = "******"; Password = "******"; }