Пример #1
0
 public void Desconectar()
 {
     // Muestro Login View
     Sesion.Sesion_ViewController sesionViewController = GetViewController(MainStoryboard, "SesionViewController") as Sesion.Sesion_ViewController;
     sesionViewController.OnLoginSuccess += SesionViewController_OnLoginSuccess;
     Window.RootViewController            = sesionViewController;
 }
Пример #2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Conexion SQLite
            scon = new SQLite();

            // Localizacion
            loc = new Location();

            // Compruebo usuario
            if (string.IsNullOrWhiteSpace(UserDataDefaults.GetToken()))
            {
                // View login
                Sesion.Sesion_ViewController sesionViewController = GetViewController(MainStoryboard, "SesionViewController") as Sesion.Sesion_ViewController;
                sesionViewController.OnLoginSuccess += SesionViewController_OnLoginSuccess;
                Window.RootViewController            = sesionViewController;
            }
            else
            {
                // Muestro Tab View
                TabViewController tabViewController = GetViewController(MainStoryboard, "TabViewController") as TabViewController;
                Window.RootViewController = tabViewController;
            }

            return(true);
        }