Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Payment p = MyWallet.Get(SavedPaymentsDropdown.SelectedIndex);

            PaymentInfo.Text = p != null?p.ToString() : "";
        }