private void WithDraw_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show($"Вы уверены, что хотите вывести? Вы выведите {curSum.Text}$", "Вы уверены?", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { OnWithdraw?.Invoke(int.Parse(curSum.Text)); } }
public void Withdraw(int sum) { this.Amount -= sum; var eventArgs = new AccountEventArgs($"Withdraw from account {sum}$", sum, Amount, DateTime.Now); OnWithdraw?.Invoke(this, eventArgs); }
void Withdraw(string Address, decimal Amount) { OnWithdraw?.Invoke(this, new WithdrawEventArgs { Address = Address, Amount = Amount }); }