private async Task ShowProfiles() { MasterViewModel masterViewModel = this; masterViewModel.Busy(); masterViewModel.HideSideBar(); await Task.Delay(100); int num = await masterViewModel._navigationService.Navigate <ProfilesViewModel>((IMvxBundle)null, new CancellationToken()) ? 1 : 0; masterViewModel.NotBusy(); }
private async void ActiveProfileChangedMessageArrived() { MasterViewModel masterViewModel = this; masterViewModel.InitProfile(); masterViewModel.Busy(); List <Profile> allprofiles = masterViewModel._profileDataService.GetProfiles().ToList <Profile>(); Credentials credentials = ((ICredentialsDataService)Mvx.get_IoCProvider().Resolve <ICredentialsDataService>()).GetAllCredentials().FirstOrDefault <Credentials>((Func <Credentials, bool>)(x => allprofiles.All <Profile>((Func <Profile, bool>)(ap => ap.Id != x.UserId)))); if (credentials != null) { IMvxNavigationService navigationService = masterViewModel._navigationService; Profile profile = new Profile(); profile.Id = credentials.UserId; CancellationToken cancellationToken = new CancellationToken(); int num = await navigationService.Navigate <NewProfileViewModel, Profile>((M1)profile, (IMvxBundle)null, cancellationToken) ? 1 : 0; } masterViewModel.NotBusy(); }
private async Task SelectMenuItem(MenuItem menuItem) { MasterViewModel masterViewModel = this; if (!menuItem.IsEnabled) { return; } masterViewModel.HideSideBar(); if (menuItem.ViewModelType != (Type)null) { masterViewModel.Busy(); await masterViewModel.ShowViewModelFromMaster(menuItem.ViewModelType); masterViewModel.NotBusy(); } else if (menuItem.NavigationUrl != null) { masterViewModel.OpenUrl(menuItem.NavigationUrl); } masterViewModel.SelectedMenuItem = (MenuItem)null; }