private void OnOpenUserClick(object sender, EventArgs e) { try { OperationNode on = this.SelectedNode as OperationNode; if (on != null) { TaskNode tn = on.Parent as TaskNode; if (tn != null) { AccountEventArgs te = new AccountEventArgs(); te.Group = tn.Task.GroupName; te.Account = on.Operation.Account; OnOpenAccount(te); } } } catch (Exception ex) { ErrorHandler.ShowMessageBox(TaskConstants.EXCEPTION_MODULE, ex); } }
private void AccountNotification(AccountEventArgs args) { var onAccountNotification = OnAccountNotification; onAccountNotification?.Invoke(this, args); }
protected virtual void OnOpenAccount(AccountEventArgs e) { if (OpenAccountEvent != null) OpenAccountEvent(this, e); }
static void AccountDeletedEvent(object sender, AccountEventArgs args) { Console.WriteLine(""); Console.WriteLine("Account deleted event:" + Environment.NewLine + SerializeJson(args, true)); Console.WriteLine(""); }