public void SelectNode(IRealTreeNode node, SelectNodeFlags flags) { if (node == null) { tree.SelectedNode = null; return; } tree.SelectedNode = (DATreeNode)node; if ((flags & SelectNodeFlags.Expand) != 0) { node.ExpandNode(); } if ((flags & SelectNodeFlags.FocusTree) != 0) { tree.Focus(); if (TreeBehaviour.InfluenceGlobalTrees) { HTree.CallFocusedNodeChanged(); } } if ((flags & SelectNodeFlags.ScrollInView) != 0) { node.EnsureVisibleNode(); } }
public static bool CheckedAllChildren(this IRealTreeNode node) { foreach (var child in node.RealChildren) { if (!child.NodeChecked) { return(false); } } return(true); }
public override void NotifyExpanded() { if (m_conn.Settings != null && m_conn.Settings.Tree().AutoExpandTables) { IRealTreeNode child = RealNode.ChildByName("tables"); if (child != null) { MainWindow.Instance.RunInMainWindow(child.ExpandNode); } } }
public IRealTreeNode FindNode(string path, bool allowPrepareChildren) { try { tree.BeginUpdate(); using (var wc = new WaitContext()) { string[] p = path.Split('/'); if (p[0] != RootPath) { return(null); } IRealTreeNode item = Root.RealNode; for (int i = 1; i < p.Length; i++) { if (item == null) { return(null); } bool found = false; if (allowPrepareChildren && !item.LogicalNode.PreparedChildren) { item.LogicalNode.GetChildrenNow(); } item.RefreshChilds(false); foreach (var rchild in item.RealChildren) { if (rchild.LogicalNode.Name == p[i] || rchild.LogicalNode.Name + ".con" == p[i]) { item = rchild; found = true; break; } } if (!found) { return(null); } } return(item); } } finally { tree.EndUpdate(); } }
public NodeEventArgs(IRealTreeNode node) { RealNode = node; }