private void Close_Click(object sender, RoutedEventArgs e) { //instance the event args and pass it each value MoneyUpdateEventArgs args = new MoneyUpdateEventArgs(sMoney); //raise the event with the updated arguments MoneyProfileUpdated(this, args); //close window; this.Close(); }
private void GotoMoney_ButtonClicked(object sender, MoneyUpdateEventArgs e) { Consoletxtblock.Text += "Go to Money Button Clicked..." + Environment.NewLine; string money = MoneyTextBox.Text; money = money.Replace("$", string.Empty); string newmoney = e.Money; newmoney = newmoney.Replace("$", string.Empty); double moneyvalue = Convert.ToDouble(money); double newmoneyvalue = Convert.ToDouble(newmoney); double endmoney = moneyvalue + newmoneyvalue; MoneyTextBox.Text = endmoney + "$"; MessageBox.Show("Money transfer completed with success!"); }
private void AddFunds_ButtonClicked(object sender, MoneyUpdateEventArgs e) { moneyTxtBox.Text = e.Money; MessageBox.Show("Money transfer completed with success!"); //show tranfer message; }