private void OnDownloadAccounts(object sender, ExecutedRoutedEventArgs e) { Account temp = new Account(); temp.Type = AccountType.Checking; OnlineAccountDialog od = new OnlineAccountDialog(this.myMoney, temp, this.Site); od.Owner = App.Current.MainWindow; od.ShowDialog(); }
private void OnButtonOnlineAccountDetails_Click(object sender, RoutedEventArgs e) { var saved = this.theAccount.OnlineAccount; OnlineAccountDialog online = new OnlineAccountDialog(this.money, this.editingAccount, this.serviceProvider); online.Owner = this; if (online.ShowDialog() == true) { // force update of this.editingAccount since the real account may have been modified // by the OnlineAccountDialog var temp = this.theAccount; TheAccount = null; TheAccount = temp; UpdateUI();// make sure 'this.comboBoxOnlineAccount' has the new account this.comboBoxOnlineAccount.SelectedItem = this.editingAccount.OnlineAccount; } else { this.editingAccount.OnlineAccount = saved; this.comboBoxOnlineAccount.SelectedItem = saved; } }