void accountTree_OpenOperationConfigEvent(object sender, AccountEventArgs e) { try { //get the top form MainForm mainform = this.TopLevelControl as MainForm; if (mainform != null) mainform.OpenOperationConfigFile(e.Group, e.Account); } catch (Exception ex) { Program.ShowMessageBox("FrmAccountManager", ex); } }
private void accountTree_AccountNodeSelectedEvent(object sender, Johnny.Kaixin.Controls.AccountTree.AccountEventArgs e) { try { //get the top form MainForm mainform = this.TopLevelControl as MainForm; if (mainform != null) { mainform.AccountNodeSelected(e.Account); } } catch (Exception ex) { Program.ShowMessageBox("FrmAccountManager", ex); } }
void accountTree_OpenUserEvent(object sender, Johnny.Kaixin.Controls.AccountTree.AccountEventArgs e) { try { //get the top form MainForm mainform = this.TopLevelControl as MainForm; if (mainform != null) { mainform.ShowUserDetail(e.Group, e.Account); } } catch (Exception ex) { Program.ShowMessageBox("FrmAccountManager", ex); } }
protected virtual void OnAccountNodeSelected(AccountEventArgs e) { if (AccountNodeSelectedEvent != null) AccountNodeSelectedEvent(this, e); }
protected virtual void OnOpenInBrowser(AccountEventArgs e) { if (OpenInBrowserEvent != null) OpenInBrowserEvent(this, e); }
protected virtual void OnOpenOperationConfig(AccountEventArgs e) { if (OpenOperationConfigEvent != null) OpenOperationConfigEvent(this, e); }
private void OnOpenInBrowserClick(object sender, EventArgs e) { try { AccountNode un = this.SelectedNode as AccountNode; if (un != null) { AccountEventArgs te = new AccountEventArgs(); te.Account = un.Account; OnOpenInBrowser(te); } } catch (Exception ex) { ErrorHandler.ShowMessageBox(TreeConstants.EXCEPTION_MODULE, ex); } }
private void OnOpenOperationConfigClick(object sender, EventArgs e) { try { AccountNode an = this.SelectedNode as AccountNode; if (an != null) { AccountEventArgs te = new AccountEventArgs(); GroupNode gn = an.Parent as GroupNode; te.Group = gn.GroupName; te.Account = an.Account; OnOpenOperationConfig(te); } } catch (Exception ex) { ErrorHandler.ShowMessageBox(TreeConstants.EXCEPTION_MODULE, ex); } }
private void OnAfterSelect(object sender, TreeViewEventArgs e) { try { if (this.SelectedNode is GroupNode) { GroupNode bn = this.SelectedNode as GroupNode; if (bn != null) { GroupEventArgs ge = new GroupEventArgs(); ge.Group = bn.GroupName; ge.Accounts = new Collection<AccountInfo>(); foreach (AccountNode accountnode in bn.Nodes) { ge.Accounts.Add(accountnode.Account); } OnGroupNodeSelected(ge); } } else if (this.SelectedNode is AccountNode) { AccountNode an = this.SelectedNode as AccountNode; AccountEventArgs ae = new AccountEventArgs(); if (an != null) { ae.Account = an.Account; } else ae.Account = null; OnAccountNodeSelected(ae); } else if (this.SelectedNode is BaseNode) { BaseNode bn = this.SelectedNode as BaseNode; if (bn != null) { RootNodeEventArgs re = new RootNodeEventArgs(); re.Groups = new string[bn.Nodes.Count]; for (int ix = 0; ix < bn.Nodes.Count; ix++) { GroupNode gn = bn.Nodes[ix] as GroupNode; if (gn != null) re.Groups[ix] = gn.GroupName; } OnRootNodeSelected(re); } } } catch (Exception ex) { ErrorHandler.ShowMessageBox(TreeConstants.EXCEPTION_MODULE, ex); } }