Ejemplo n.º 1
0
 public MenuPageViewModel(ILoginViewModel loginViewModel, IApiService apiService)
 {
     this.loginViewModel  = loginViewModel;
     this.apiService      = apiService;
     this.apiService      = apiService;
     this.loginViewModel  = loginViewModel;
     subMenuItemViewModel = ServiceLocator.Current.GetInstance <ISubMenuItemViewModel>();
     MenuItems            = new ObservableCollection <MenuItemViewModel>();
     //ValidateOption();
     AppVersion = VersionTracking.CurrentVersion;
 }
Ejemplo n.º 2
0
        private async void Select()
        {
            INavigationService    navigationService = ServiceLocator.Current.GetInstance <INavigationService>();
            ISubMenuItemViewModel subMenuItem       = ServiceLocator.Current.GetInstance <ISubMenuItemViewModel>();

            subMenuItem.Title = Title;

            await navigationService.BackToRoot();

            switch (Page)
            {
            case AppPages.LandingPage:
                await navigationService.BackToRoot();

                break;

            case AppPages.MyAccount:
            case AppPages.MyHealth:
            case AppPages.CustomerService:
                await navigationService.Navigate(AppPages.SubMenuPage);

                break;

            case AppPages.NearbyClinicsPage:
                INearbyClinicsPageViewModel nearbyClinicsPageViewModel = ServiceLocator.Current.GetInstance <INearbyClinicsPageViewModel>();
                nearbyClinicsPageViewModel.CurrentLocation = null;
                nearbyClinicsPageViewModel.IsEmergency     = false;
                nearbyClinicsPageViewModel.TitlePage       = Title;
                IMedicalCenterCoordinationPageViewModel medicalCenter = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                medicalCenter.IsVisibleCoordination = true;

                await navigationService.Navigate(AppPages.NearbyClinicsPage);

                break;

            case AppPages.LoginPage:
                await navigationService.Navigate(AppPages.LoginPage);

                break;

            case AppPages.ServicesPage:
                IServicesPageViewModel servicesPageViewModel = ServiceLocator.Current.GetInstance <IServicesPageViewModel>();
                servicesPageViewModel.TitlePage = Title;
                await servicesPageViewModel.LoadPersons();

                break;
            }
        }