private void mClient_AccountRemoved(object sender, AccountOperationEventArgs e) { if (e.Account == this) { mClient.AccountRemoved -= mClient_AccountRemoved; mClient.UpdateAccountOperationStarted -= mClient_UpdateAccountOperationStarted; } }
void OnAccountAction(bool added, Account account) { AccountOperationEventArgs e = new AccountOperationEventArgs() { Account = account }; if (added && AccountAdded != null) { AccountAdded(this, e); } else if (!added && AccountRemoved != null) { AccountRemoved(this, e); } }