private void AddFundsButton_Click(object sender, RoutedEventArgs e) { Payment p = MyWallet.Get(SavedPaymentsDropdown.SelectedIndex); if (p != null) { AddFundsWindow win = new AddFundsWindow(p, PaymentInfo); win.Visibility = Visibility.Visible; } }
private void AddPaymentSourceButton_Click(object sender, RoutedEventArgs e) { Payment p = MyWallet.Get(PaymentSourceDropdown.SelectedIndex); double amount = double.Parse(PaymentAmountInput.Text); Current.AddPayment(new PaymentLine(p, amount)); PaymentAmountInput.Text = ""; TotalFundsAmountLabel.Content = $"${Current.GetTotalFunds()}"; if (TransactionGrid.ItemsSource == null) { TransactionGrid.ItemsSource = Current.Items; PaymentGrid.ItemsSource = Current.Payments; } }
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { Payment p = MyWallet.Get(SavedPaymentsDropdown.SelectedIndex); PaymentInfo.Text = p != null?p.ToString() : ""; }