Exemple #1
0
        protected override void OnStart()
        {
            var main = MainViewModel.GetInstance();

            MessagingCenter.Subscribe <Pessoa>(this, "SucessoLogin",
                                               (usuario) =>
            {
                main.LoadUser(usuario);

                MainPage = new Views.Main.MasterDetail(usuario);
            });
        }
Exemple #2
0
        public App()
        {
            InitializeComponent();

            var data = new DataAccess();

            var user = data.First();

            if (user != null && user.Lembrar_me)
            {
                var main = MainViewModel.GetInstance();
                main.LoadUser(user);

                App.UserCurrent = user;
                MainPage        = new Views.Main.MasterDetail(user);
            }
            else
            {
                MainPage = new ViewLoginView();
            }
        }