コード例 #1
0
        private void OnAuthFailed(object sender, Core.AccountInfoEventArgs e)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                MessageBox.Show("Authentication failed for " + e.Account.Name);

                AccountProps props = new AccountProps(e.Account);
                if (props.ShowDialog() == true)
                {
                    ServerView srv = null;

                    foreach (var acnt in mailView_.Servers)
                    {
                        if (acnt.Info == e.Account)
                        {
                            srv = acnt;

                            break;
                        }
                    }

                    mailView_.Servers.Remove(srv);
                    mailView_.Servers.Add(srv);

                    Properties.Settings.Default.Save();

                    srv.Reset();
                }
            }));
        }
コード例 #2
0
        private void Account_Delete(object sender, RoutedEventArgs e)
        {
            FrameworkElement ele  = sender as FrameworkElement;
            ServerView       acnt = ele.DataContext as ServerView;

            mailView_.Servers.Remove(acnt);

            Properties.Settings.Default.Save();
        }
コード例 #3
0
        private void Account_Edit(object sender, RoutedEventArgs e)
        {
            FrameworkElement ele  = sender as FrameworkElement;
            ServerView       acnt = ele.DataContext as ServerView;

            AccountProps props = new AccountProps(acnt.Info);

            if (props.ShowDialog() == true)
            {
                mailView_.Servers.Remove(acnt);
                mailView_.Servers.Add(acnt);

                Properties.Settings.Default.Save();

                acnt.Reset();
            }
        }