/// <summary> /// Adds a new tree node to the tree view. /// </summary> public static ExtTreeNode AddNode(ExtTreeView treeView, XmlElement element) { ExtTreeNode node = CreateNode(element); node.AddTo(treeView); return(node); }
/// <summary> /// Adds a new tree node containing the xml element to the specified /// nodes collection. /// </summary> public static ExtTreeNode AddNode(ExtTreeNode parentNode, XmlElement element) { ExtTreeNode node = CreateNode(element); node.AddTo(parentNode); return(node); }
public WixTreeNode(XmlElement element) { this.element = element; sortOrder = 10; if (element.HasChildNodes) { dummyChildNode = new ExtTreeNode(); dummyChildNode.AddTo(this); } }
/// <summary> /// 显示工程的树 /// </summary> /// <param name="project"></param> public void ViewProject(IProject project) { treeView = new ExtTreeView(new ExtTreeNode(null, project.Name)); treeView.SelectedItemChanged += new RoutedPropertyChangedEventHandler <object>(treeView_SelectedItemChanged); foreach (ATNET.Project.ProjectItem item in project.Items) { ExtTreeNode node = BuildNode(item); node.AddTo(treeView.BaseNode); } treeView.BaseNode.Refresh(); mainGrid.Children.Add(treeView); Grid.SetRow(treeView, 1); Grid.SetColumn(treeView, 0); }
public void StartSearch() { if (searchTerm.Length == 0) { CancelSearch(); return; } if (!inSearchMode) { foreach (TreeNode node in classBrowserTreeView.Nodes) { oldNodes.Add(node); } inSearchMode = true; previousNodes.Clear(); nextNodes.Clear(); UpdateToolbars(); } classBrowserTreeView.BeginUpdate(); classBrowserTreeView.Nodes.Clear(); if (ProjectService.OpenSolution != null) { foreach (IProject project in ProjectService.OpenSolution.Projects) { IProjectContent projectContent = ParserService.GetProjectContent(project); if (projectContent != null) { foreach (IClass c in projectContent.Classes) { if (c.Name.ToUpper().StartsWith(searchTerm)) { ClassNodeBuilders.AddClassNode(classBrowserTreeView, project, c); } } } } } if (classBrowserTreeView.Nodes.Count == 0) { ExtTreeNode notFoundMsg = new ExtTreeNode(); notFoundMsg.Text = ResourceService.GetString("MainWindow.Windows.ClassBrowser.NoResultsFound"); notFoundMsg.AddTo(classBrowserTreeView); } classBrowserTreeView.Sort(); classBrowserTreeView.EndUpdate(); }
public void StartSearch() { if (searchTerm.Length == 0) { CancelSearch(); return; } if (!inSearchMode) { foreach (TreeNode node in classBrowserTreeView.Nodes) { oldNodes.Add(node); } inSearchMode = true; previousNodes.Clear(); nextNodes.Clear(); UpdateToolbars(); } classBrowserTreeView.BeginUpdate(); classBrowserTreeView.Nodes.Clear(); if (ProjectService.OpenSolution != null) { foreach (IProject project in ProjectService.OpenSolution.Projects) { IProjectContent projectContent = ParserService.GetProjectContent(project); if (projectContent != null) { foreach (IClass c in projectContent.Classes) { if (c.Name.ToUpper().StartsWith(searchTerm)) { ClassNodeBuilders.AddClassNode(classBrowserTreeView, project, c); } } } } } if (classBrowserTreeView.Nodes.Count == 0) { ExtTreeNode notFoundMsg = new ExtTreeNode(); notFoundMsg.Text = ResourceService.GetString("MainWindow.Windows.ClassBrowser.NoResultsFound"); notFoundMsg.AddTo(classBrowserTreeView); } classBrowserTreeView.Sort(); classBrowserTreeView.EndUpdate(); }
private void AddImageNode(string name) { Action method = delegate { ExtTreeNode node = new ExtTreeNode { Text = name, ToolTipText = "双击查看" }; node.AddTo(this.tvImage); this.tvImage.SelectedNode = node; }; base.Invoke(method); }