private void mnu_editConnect(object sender, EventArgs e) { TreeViewObjectExplorer tv = TreeView as TreeViewObjectExplorer; if (TreeView != null) { TreeNodeObject np = null; ClassPointer root = null; TreeNode tn = this.Parent; while (tn != null) { np = tn as TreeNodeObject; if (np != null) { root = np.OwnerIdentity as ClassPointer; if (root != null) { break; } } tn = tn.Parent; } if (root != null) { LimnorProject.SetActiveProject(root.Project); DlgConnectionManager dlg = new DlgConnectionManager(); dlg.UseProjectScope = true; dlg.EnableCancel(false); //set selection of _connect dlg.SetSelection(_connect); dlg.ShowDialog(TreeView.FindForm()); np.ResetNextLevel(tv); } } }
private void mnu_connections(object sender, EventArgs e) { TreeViewObjectExplorer tv = TreeView as TreeViewObjectExplorer; if (tv != null) { ClassPointer root = OwnerIdentity as ClassPointer; LimnorProject.SetActiveProject(root.Project); DlgConnectionManager dlg = new DlgConnectionManager(); dlg.UseProjectScope = true; dlg.EnableCancel(false); dlg.ShowDialog(TreeView.FindForm()); ResetNextLevel(tv); } }