Пример #1
0
 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();
     }
 }
Пример #2
0
 public static void CallSelectNode(string path, SelectNodeFlags flags)
 {
     if (SelectNode != null)
     {
         SelectNode(path, flags);
     }
 }
Пример #3
0
        //public void FillAllChildren()
        //{
        //    if (m_root != null) m_root.FillAllChildren();
        //}

        public void SelectAppObject(AppObject appobj, SelectNodeFlags flags)
        {
            string path = appobj.GetTreePath();

            if (path != null)
            {
                SelectNodeByPath(path, flags);
            }
        }
Пример #4
0
        public void SelectNodeByPath(string path, SelectNodeFlags flags)
        {
            var node = FindNode(path, true);

            if (node != null)
            {
                SelectNode(node, flags);
            }
        }
Пример #5
0
        //void HTree_SelectAppObject(AppObject appobj, SelectNodeFlags flags)
        //{
        //    daTreeView1.SelectAppObject(appobj, flags);
        //}

        void HTree_SelectNode(string path, SelectNodeFlags flags)
        {
            if (path.StartsWith(daTreeView1.RootPath))
            {
                var rnode = daTreeView1.FindNode(path, true);
                if (rnode != null)
                {
                    daTreeView1.SelectNode(rnode, flags);
                }
            }
        }
Пример #6
0
 void HTree_SelectNode(string path, SelectNodeFlags flags)
 {
     if (path.StartsWith("data:"))
     {
         MainWindow.Instance.ShowDocker(new DataTreeDockerFactory());
     }
     if (path.StartsWith("addons:"))
     {
         MainWindow.Instance.ShowDocker(new AddonsTreeDockerFactory());
     }
     if (path.StartsWith("scripts:"))
     {
         MainWindow.Instance.ShowDocker(new ScriptsTreeDockerFactory());
     }
     if (path.StartsWith("favorites:"))
     {
         MainWindow.Instance.ShowDocker(new FavoritesTreeDockerFactory());
     }
     if (path.StartsWith("charts:"))
     {
         MainWindow.Instance.ShowDocker(new ChartsTreeDockerFactory());
     }
 }