Exemple #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var model = new MainModel();

            if (e.InitParams.Count != 0)
            {
                model.ServiceUri = e.InitParams["uri"];
            }

            if (IsolatedStorageSettings.ApplicationSettings.Contains("UserName")
                && IsolatedStorageSettings.ApplicationSettings.Contains("Password"))
            {
                model.UserName = IsolatedStorageSettings.ApplicationSettings["UserName"].ToString();
                model.Password = IsolatedStorageSettings.ApplicationSettings["Password"].ToString();

                model.SignIn();
            }

            this.RootVisual = new MainPage { Model = model };
        }
        private void UpdateUserListControl()
        {
            if (this.Model.IsAuthenticated)
            {
                var model = new UserListModel();

                model.Token = this.Model.Token;
                model.ServiceUri = this.Model.ServiceUri;

                this.UserListUserControl.Model = model;

                model.Update();
            }
        }