Beispiel #1
0
 // Raise the Overdrawn event.
 protected virtual void OnOverdrawn(OverdrawnEventArgs args)
 {
     if (Overdrawn != null)
     {
         Overdrawn(this, args);
     }
 }
 // The event handler with event args.
 private void OverdrawnHandler(object sender, OverdrawnEventArgs args)
 {
     string message =
         "The account is overdrawn." + Environment.NewLine +
         "Current Balance: " + args.CurrentBalance.ToString("C") + Environment.NewLine +
         "Debit Amount: " + args.DebitAmount.ToString("C");
     MessageBox.Show(message);
 }
Beispiel #3
0
        // The event handler with event args.
        private void OverdrawnHandler(object sender, OverdrawnEventArgs args)
        {
            string message =
                "The account is overdrawn." + Environment.NewLine +
                "Current Balance: " + args.CurrentBalance.ToString("C") + Environment.NewLine +
                "Debit Amount: " + args.DebitAmount.ToString("C");

            MessageBox.Show(message);
        }
 // Raise the Overdrawn event.
 protected virtual void OnOverdrawn(OverdrawnEventArgs args)
 {
     if (Overdrawn != null) Overdrawn(this, args);
 }