Beispiel #1
0
        private void Navigate()
        {
            App.Master.IsPresented = false;
            switch (this.PageName)
            {
            case "RutasPage":
                MainViewModel.GetInstace().Rutas = new RutasViewModel();
                App.Navigator.PushAsync(new RutasPage());
                break;

            case "ChoferesPage":
                MainViewModel.GetInstace().Choferes = new ChoferesViewModel();
                App.Navigator.PushAsync(new ChoferesPage());
                break;

            case "LoginPage":
                //persistenceService = new PersistenceService();
                PersistenceService.GetPersistenceService().RestoreKeysPersistance("usuario", "horaLogin", "guid");
                //persistenceService.RestoreKeysPersistance("usuario", "horaLogin");
                Application.Current.MainPage = new LoginPage();
                break;

            default:
                break;
            }
        }
        private void Navigate()
        {
            App.MasterChofer.IsPresented = false;
            switch (this.PageName)
            {
            case "ProfilePage":
                App.Navigator.PushAsync(new ProfilePage());
                break;

            case "PedidosPage":
                MainViewModel.GetInstace().Pedidos = new PedidosViewModel();
                //Application.Current.MainPage = new NavigationPage(new PedidosPage());
                App.Navigator.PushAsync(new PedidosPage());
                break;

            case "LoginPage":
                PersistenceService.GetPersistenceService().RestoreKeysPersistance("usuario", "horaLogin", "guid");
                Application.Current.MainPage = new LoginPage();
                break;

            default:
                break;
            }
        }