Inheritance: System.Windows.Controls.UserControl
コード例 #1
0
 protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
 {
     if (_login != null)
     {
         LayoutRoot.Children.Remove(_login);
         _login = null;
         e.Cancel = true;
     }
     else
     {
         base.OnBackKeyPress(e);
     }
 }
コード例 #2
0
 public void LoginCallback(bool verified)
 {
     if (verified)
     {
         LoginText.Text = "logout";
         CoreServices.Instance.MyPosts.Refresh();
         CoreServices.Instance.MyReplies.Refresh();
         IncrementRefresher();
         IncrementRefresher();
     }
     LayoutRoot.Children.Remove(_login);
     _login = null;
 }
コード例 #3
0
        private void RefreshClick(object sender, EventArgs e)
        {
            if (!CoreServices.Instance.LoginVerified && _login == null)
            {
                _login = new LoginControl(LoginCallback);
                LayoutRoot.Children.Add(_login);
                return;
            }

            MessageList messages;
            switch (Pivot.SelectedIndex)
            {
                case 0:
                    messages = CoreServices.Instance.Inbox;
                    break;
                case 1:
                    messages = CoreServices.Instance.Outbox;
                    break;
                case 2:
                    messages = CoreServices.Instance.Archive;
                    break;

                default:
                    messages = CoreServices.Instance.Inbox;
                    break;
            }

            messages.PropertyChanged += BoxLoaded;
            messages.Refresh();
            ProgressBar.Visibility = Visibility.Visible;
        }
コード例 #4
0
 protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
 {
     if (!CoreServices.Instance.LoginVerified)
     {
         _login = new LoginControl(LoginCallback);
         LayoutRoot.Children.Add(_login);
     }
     else
     {
         LoadPage();
     }
     base.OnNavigatedTo(e);
 }
コード例 #5
0
 public void LoginCallback(bool verified)
 {
     if (verified)
     {
         LoadPage();
     }
     LayoutRoot.Children.Remove(_login);
     _login = null;
 }
コード例 #6
0
 private void Login_Click(object sender, RoutedEventArgs e)
 {
     if (!CoreServices.Instance.LoginVerified)
     {
         _login = new LoginControl(LoginCallback);
         LayoutRoot.Children.Add(_login);
     }
     else
     {
         CoreServices.Instance.Logout();
         LoginText.Text = "login";
     }
 }