示例#1
0
文件: Form1.cs 项目: imiyu/DiscUsage
        // BalanceChanged is called by the Account Com object
        // whenever the balance of the account has been changed.
        // Fire the AccountChanged event to notify the main form
        // that the balance has changed.
        public void BalanceChanged(int newBalance)
        {
            AccountChangedEventArgs args = new AccountChangedEventArgs(newBalance);

            if (AccountChanged != null)
            {
                AccountChanged(this, args);
            }
        }
示例#2
0
文件: Form1.cs 项目: imiyu/DiscUsage
 // Called when the notification object fires the event indicating that the account balance
 // has been changed.  Update the balance field in the user interface with the new balance.
 private void AccountChangedMsg(Object sender, AccountChangedEventArgs args)
 {
     balanceTextBox.Text = args.NewBalance.ToString(CultureInfo.InvariantCulture);
 }