Example #1
0
        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Control to display data</param>
        /// <param name="treeControlAdapter">Adapter to drive control. Its ITreeView should
        /// implement IInstancingContext and/or IHierarchicalInsertionContext.</param>
        /// <remarks>Default is to create a TreeControl and TreeControlAdapter,
        /// using the global image lists.</remarks>
        protected override void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl = new TreeControl();
            treeControl.ImageList = ResourceUtil.GetImageList16();
            treeControl.StateImageList = ResourceUtil.GetImageList16();

            treeControlAdapter = new TreeControlAdapter(treeControl);

            treeControl.PreviewKeyDown += treeControl_PreviewKeyDown;
            treeControl.NodeExpandedChanging += treeControl_NodeExpandedChanging;
            treeControl.NodeExpandedChanged += treeControl_NodeExpandedChanged;

 
            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += UpdateFiltering;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();
        }
Example #2
0
        /// <summary>
        /// Draws the data of a tree node at the specified location.</summary>
        /// <param name="node">The tree control's node whose data is to be drawn</param>
        /// <param name="g">The current GDI+ graphics object</param>
        /// <param name="x">The x-coordinate of the upper-left corner of the node label</param>
        /// <param name="y">The y-coordinate of the upper-left corner of the node label</param>
        public override void DrawData(TreeControl.Node node, Graphics g, int x, int y)
        {
            var treeListControl = node.TreeControl as TreeListControl;

            ItemInfo info = new WinFormsItemInfo();
            m_itemView.GetInfo(node.Tag, info);
            if (info.Properties.Length ==0)
                return;

            Region oldClip = g.Clip;

            UpdateColumnWidths(node, info, g);
            int xOffset = treeListControl.TreeWidth;
            for (int i = 0; i < info.Properties.Length; ++i) 
            {
                var dataEditor = info.Properties[i] as DataEditor;
                if (dataEditor != null) // show object data details in columns
                {
                    if (TrackingEditor != null && (TrackingEditor.Owner == node.Tag) &&
                        (TrackingEditor.Name == dataEditor.Name))
                        dataEditor = TrackingEditor;
                    var clip = new Rectangle(xOffset, y, treeListControl.Columns[i].ActualWidth, treeListControl.GetRowHeight(node));
                    if (i == info.Properties.Length-1) // extends last column 
                        clip.Width = node.TreeControl.ActualClientSize.Width - xOffset;
                    g.SetClip(clip);
                    dataEditor.PaintValue(g, clip);
                }
                xOffset += treeListControl.Columns[i].ActualWidth;
            }

            g.Clip = oldClip;
        }
Example #3
0
        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Tree control to display data</param>
        /// <param name="treeControlAdapter">Tree control adapter to drive control</param>
        protected override void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl = new TreeControl(TreeControl.Style.CategorizedPalette);
            treeControl.ImageList = ResourceUtil.GetImageList16();
            treeControl.AllowDrop = true;
            treeControl.SelectionMode = SelectionMode.MultiExtended;

            treeControlAdapter = new TreeControlAdapter(treeControl);
        }
Example #4
0
        /// <summary>
        /// Create and configure TreeControl</summary>
        /// <param name="treeControl">New TreeControl</param>
        /// <param name="treeControlAdapter">Adapter for TreeControl</param>
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

            treeControl.ShowRoot = false; // UI node can't really be edited, so hide it
            treeControl.Text = ("Add packages to the UI." + Environment.NewLine +
                                "Add forms, shaders, textures, and fonts to packages." + Environment.NewLine +
                                "Add sprites or text items to forms or sprites." + Environment.NewLine +
                                "Drag shaders, textures, and fonts onto the reference slots of sprites and text items.").Localize();            
            treeControl.AllowDrop = true;
            treeControl.SelectionMode = SelectionMode.MultiExtended;
        }
        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Control to display data</param>
        /// <param name="treeControlAdapter">Adapter to drive control. Its ITreeView should
        /// implement IInstancingContext and/or IHierarchicalInsertionContext.</param>
        /// <remarks>Default is to create a TreeControl and TreeControlAdapter,
        /// using the global image lists.</remarks>
        protected virtual void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl =
                new TreeControl
                    {
                        ImageList = ResourceUtil.GetImageList16(),
                        StateImageList = ResourceUtil.GetImageList16()
                    };

            treeControlAdapter = new TreeControlAdapter(treeControl);
        }
Example #6
0
        public NotesPanel()
        {
            InitializeComponent();
            Text = "Notes".Localize();

            treeList                  = new Sce.Atf.Controls.TreeControl(TreeControl.Style.Tree);
            treeList.ShowRoot         = false;
            treeList.Dock             = DockStyle.Fill;
            treeList.LabelEditMode    = TreeControl.LabelEditModes.EditOnClick;
            treeList.NodeLabelEdited += treeList_NodeLabelEdited;
            this.splitContainer1.Panel2.Controls.Add(treeList);

            DocumentManager.GetInst().DocumentChanged += NotesPanel_DocumentChanged;
        }
Example #7
0
        /// <summary>
        /// Constructor that uses the given TreeControl and equality comparer</summary>
        /// <param name="treeControl">Tree control to use. Use "new TreeControl()" for the default.</param>
        /// <param name="comparer">The comparer used to compare nodes in the tree, or null to use the
        /// default comparer for type T</param>
        public TreeControlAdapter(TreeControl treeControl, IEqualityComparer<object> comparer)
        {
            m_treeControl = treeControl;
            m_itemToNodeMap = new Multimap<object, TreeControl.Node>(comparer);

            m_treeControl.MouseDown += treeControl_MouseDown;
            m_treeControl.MouseUp += treeControl_MouseUp;
            m_treeControl.DragOver += treeControl_DragOver;
            m_treeControl.DragDrop += treeControl_DragDrop;

            m_treeControl.NodeExpandedChanged += treeControl_NodeExpandedChanged;
            m_treeControl.NodeSelectedChanged += treeControl_NodeSelectedChanged;
            m_treeControl.SelectionChanging += treeControl_SelectionChanging;
            m_treeControl.SelectionChanged += treeControl_SelectionChanged;
        }
Example #8
0
        /// <summary>
        /// Constructor</summary>
        /// <param name="settingsService">Settings service</param>
        /// <param name="dialogOwner">Dialog owner window HWND</param>
        /// <param name="pathName">Path of settings to display initially, or null</param>
        public SettingsDialog(SettingsService settingsService, IWin32Window dialogOwner, string pathName)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            SplitterRatio = 0.33f;

            m_settingsService = settingsService;
            m_dialogOwner = dialogOwner;

            m_originalState = m_settingsService.UserState; // for cancel

            m_treeControl = new TreeControl(TreeControl.Style.SimpleTree);
            m_treeControl.Dock = DockStyle.Fill;
            m_treeControl.SelectionMode = SelectionMode.One;
            m_treeControl.ShowRoot = false;
            m_treeControl.ImageList = ResourceUtil.GetImageList16();
            m_treeControl.ExpandAll();

            m_treeControl.NodeSelectedChanged += treeControl_NodeSelectedChanged;

            m_treeControlAdapter = new TreeControlAdapter(m_treeControl);
            m_treeControlAdapter.TreeView = settingsService.UserSettings;

            treePanel.Controls.Add(m_treeControl);

            m_propertyGrid = new Sce.Atf.Controls.PropertyEditing.PropertyGrid();
            m_propertyGrid.Dock = DockStyle.Fill;
            propertiesPanel.Controls.Add(m_propertyGrid);

            // select an initial node so something is displayed in the PropertyGrid
            TreeControl.Node firstNode = null;
            if (pathName != null)
                firstNode = m_treeControlAdapter.ExpandPath(m_settingsService.GetSettingsPath(pathName));
            if (firstNode == null) // in case pathName is not null, but ExpandPath returns null  
                firstNode = m_treeControl.ExpandToFirstLeaf();
            


            firstNode.Selected = true;
            ShowProperties(m_settingsService.GetProperties((Tree<object>)firstNode.Tag)); //does auto-setting of column widths

            defaultsButton.Click += DefaultsButton_Click;
        }
        /// <summary>
        /// Create and configure TreeControl</summary>
        /// <param name="treeControl">New TreeControl</param>
        /// <param name="treeControlAdapter">Adapter for TreeControl</param>
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += UpdateFiltering;
            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            TreeControl.PreviewKeyDown += TreeControl_PreviewKeyDown;
            TreeControl.NodeExpandedChanging += TreeControl_NodeExpandedChanging;
            TreeControl.NodeExpandedChanged += TreeControl_NodeExpandedChanged;
            TreeControl.ItemRendererChanged += (sender, e) => UpdateTreeItemRenderer();
        }
Example #10
0
        /// <summary>
        /// Update column widths only under auto-resizing mode.</summary>
        /// <param name="node">Tree node</param>
        /// <param name="info">Mode info</param>
        /// <param name="g">Graphics object used for drawing</param>
        private void UpdateColumnWidths(TreeControl.Node node, ItemInfo info, Graphics g)
        {
            var treeListControl = node.TreeControl as TreeListControl;
            if (treeListControl.AutoResizeColumns)
            {
                bool updateColumnWidths = treeListControl.Columns.Count == info.Properties.Length;
                for (int i = 0; i < info.Properties.Length; ++i)
                {
                    var dataEditor = info.Properties[i] as DataEditor;
                    if (dataEditor != null) // show object data details in columns
                    {

                        var size = dataEditor.Measure(g, SizeF.Empty);
                        if (updateColumnWidths)
                        {
                            treeListControl.Columns[i].ActualWidth = Math.Max(treeListControl.Columns[i].Width,
                                (int)size.Width);
                        }
                    }
                }
            }
        }
Example #11
0
        public DomExplorer(IControlHostService controlHostService)
        {
            m_controlHostService = controlHostService;

            m_treeControl = new TreeControl();
            m_treeControl.Dock = DockStyle.Fill;
            m_treeControl.AllowDrop = true;
            m_treeControl.SelectionMode = SelectionMode.MultiExtended;
            m_treeControl.ImageList = ResourceUtil.GetImageList16();
            m_treeControl.NodeSelectedChanged += treeControl_NodeSelectedChanged;

            m_treeControlAdapter = new TreeControlAdapter(m_treeControl);
            m_treeView = new TreeView();

            m_propertyGrid = new Sce.Atf.Controls.PropertyEditing.PropertyGrid();
            m_propertyGrid.Dock = DockStyle.Fill;

            m_splitContainer = new SplitContainer();
            m_splitContainer.Text = "Dom Explorer";
            m_splitContainer.Panel1.Controls.Add(m_treeControl);
            m_splitContainer.Panel2.Controls.Add(m_propertyGrid);
        }
Example #12
0
        private void treeControl_NodeSelectedChanged(object sender, TreeControl.NodeEventArgs e)
        {
            if (m_selectionContext != null && !m_synchronizingSelection)
            {
                try
                {
                    m_synchronizingSelection = true;

                    Path<object> path = MakePath(e.Node);
                    if (e.Node.Selected)
                        m_selectionContext.AddRange(path);
                    else
                        m_selectionContext.RemoveRange(path);
                }
                finally
                {
                    m_synchronizingSelection = false;
                }
            }
        }
Example #13
0
        /// <summary>
        /// Performs custom actions before changing a node's Expanded property</summary>
        /// <param name="sender">Sender</param>
        /// <param name="e">Event args</param>
        void treeControl_NodeExpandedChanging(object sender, TreeControl.CancelNodeEventArgs e)
        {
            if ((!m_autoExpanding) && m_searching)
            {
                var filteredTreeView = TreeView as FilteredTreeView;
                // 3 states to toggle: 
                if (filteredTreeView.IsNodeOpaque(e.Node) && filteredTreeView.IsNodeCurrentlyOpaque(e.Node))
                {
                    // two cases here: a) if  the node is expanding and all the child nodes are opaque, just expand all its children
                    // if some of the child nodes are visible, and the node is already expanded, then we need to expand all its children too

                    IEnumerable<object> itsChildren = filteredTreeView.GetChildren(e.Node.Tag); // get visible children
                    if (!itsChildren.Any())
                    {
                        if (!e.Node.Expanded)  /* case a*/
                        {
                            foreach (object child in filteredTreeView.GetUnfilteredChildren(e.Node.Tag))
                                filteredTreeView.AddCurrentVisibleNode(child);
                        }
                    }
                    else if (e.Node.Expanded) // an opaque node is about to collapsing; but we actually want it fully expanded
                    {
                        // this is a manual click-expanding case, make all children of the node visible 
                        bool added = false;
                        foreach (object child in filteredTreeView.GetUnfilteredChildren(e.Node.Tag))
                        {
                            if (filteredTreeView.AddCurrentVisibleNode(child))
                                added = true;
                        }
                        filteredTreeView.RemoveOpaqueNode(e.Node);
                        filteredTreeView.RememberExpansion(e.Node);
                        if (added) // if false, all children are already visible, just collapse the node
                            m_nodeToExpand = e.Node;
                    }

                }
                else if (filteredTreeView.IsNodeOpaque(e.Node) && (!filteredTreeView.IsNodeCurrentlyOpaque(e.Node)) && (e.Node.Expanded))
                {
                    // the opaque node is fakely(fully) expanded, restore to hide non-matched ones
                    filteredTreeView.AddOpaqueNode(e.Node);
                    filteredTreeView.RememberExpansion(e.Node);
                    foreach (TreeControl.Node child in e.Node.Children)
                    {
                        if (!filteredTreeView.IsNodeMatched(child))
                            filteredTreeView.RemoveVisibleNode(child.Tag);
                    }
                }
                else if (e.Node.Expanded)
                    filteredTreeView.RememberExpansion(e.Node);
                else if (!filteredTreeView.IsNodeOpaque(e.Node)) // check expanding a node with all childen invisible
                {
                    foreach (object child in filteredTreeView.GetUnfilteredChildren(e.Node.Tag))
                    {
                        filteredTreeView.AddCurrentVisibleNode(child);
                    }
                }

            }
        }
Example #14
0
 /// <summary>
 /// Performs custom actions after changing a node's Expanded property</summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">Event args</param>
 void treeControl_NodeExpandedChanged(object sender, TreeControl.NodeEventArgs e)
 {
     if (!m_searching)
         return;
     var filteredTreeView = TreeView as FilteredTreeView;
     if (m_nodeToExpand != null)
     {
         TreeControl.Node nodeToExpand = m_nodeToExpand;
         m_autoExpanding = true;
         TreeControlAdapter.Expand(m_nodeToExpand.Tag);
         filteredTreeView.RestoreExpansion(TreeControlAdapter, nodeToExpand);
         m_nodeToExpand = null;
         m_autoExpanding = false;
     }
     else if (e.Node.Expanded && RestoreSubExpansion)
     {
         filteredTreeView.RestoreExpansion(TreeControlAdapter, e.Node);
     }
 }
Example #15
0
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

            treeControl.ShowRoot = false; // hide root node, because it's the project
            treeControl.Text = Localizer.Localize("No Project Loaded");
            treeControl.Dock = DockStyle.Fill;
            treeControl.AllowDrop = true;
            treeControl.SelectionMode = SelectionMode.One;
        }
Example #16
0
        /// <summary>
        /// Get the data editor hit by point p; also set edit mode if the editor supports multiple controls.</summary>
        /// <param name="node">The node</param>
        /// <param name="p">The point</param>
        /// <returns>Data editor hit by point</returns>
        internal DataEditor GetDataEditor(TreeControl.Node node, Point p)
        {
            var treeListControl = node.TreeControl as TreeListControl;

            ItemInfo info = new WinFormsItemInfo();
            treeListControl.TreeListItemRenderer.ItemView.GetInfo(node.Tag, info);
            if (info.Properties.Length != treeListControl.Columns.Count)
                return null;

            int left = treeListControl.TreeWidth;

            for (int i = 0; i < treeListControl.Columns.Count; ++i)
            {
                var column = treeListControl.Columns[i];
                if (p.X >= left && p.X <= left + column.ActualWidth)
                {
                    var dataEditor = info.Properties[i] as DataEditor;
                    if (dataEditor != null)
                    {
                        foreach (NodeLayoutInfo nodeLayout in NodeLayout)
                        {
                            if (nodeLayout.Node == node)
                            {
                                dataEditor.TextBox = m_editTextBox;
                                dataEditor.Bounds = GetEditArea(nodeLayout, dataEditor);
                                dataEditor.SetEditingMode(p);
                                break;
                            }

                        }
                    }
                    return dataEditor;
                }

                left += column.ActualWidth;
            }

            return null;
        }
Example #17
0
        private Path<object> MakePath(TreeControl.Node node)
        {
            List<object> tags = new List<object>();
            for (; node != null; node = node.Parent)
                tags.Add(node.Tag);

            tags.Reverse();
            return new AdaptablePath<object>(tags);
        }
Example #18
0
 private void treeControl_NodeCheckStateEdited(object sender, TreeControl.NodeEventArgs e)
 {
     ShowLayer(e.Node.Tag, e.Node.CheckState == CheckState.Checked);
 }
Example #19
0
 private void treeControl_NodeSelectedChanged(object sender, TreeControl.NodeEventArgs e)
 {
     if (e.Node.Selected)
     {
         ShowProperties(m_settingsService.GetProperties((Tree<object>)e.Node.Tag));
     }
 }
Example #20
0
        private void Unbind(TreeControl.Node node)
        {
            if (node.Tag != null)
                m_itemToNodeMap.Remove(node.Tag, node);

            foreach (TreeControl.Node child in node.Children)
                Unbind(child);
        }
Example #21
0
        private void SetChildren(TreeControl.Node parentNode)
        {
            if (m_treeView == null)
                return;

            if (parentNode.Expanded)
            {
                object obj = parentNode.Tag;
                if (obj != null)
                {
                    TreeControl.Node node = null;
                    foreach (object child in m_treeView.GetChildren(obj))
                    {
                        node = parentNode.Add(child);
                        m_itemToNodeMap.Add(child, node);
                        UpdateNode(node);
                    }
                    if (node == null) // no children?
                        parentNode.IsLeaf = true;
                }
            }
            else
            {
                foreach (TreeControl.Node child in parentNode.Children)
                {
                    Unbind(child);
                }

                parentNode.Clear();
            }
        }
Example #22
0
        private void treeControl_NodeSelectedChanged(object sender, TreeControl.NodeEventArgs e)
        {
            if (e.Node.Selected)
            {
                object item = e.Node.Tag;
                {
                    DomNode node = item as DomNode;
                    if (node != null)
                    {
                        // Build property descriptors for node's attributes
                        List<PropertyDescriptor> descriptors = new List<PropertyDescriptor>();
                        foreach (AttributeInfo attributeInfo in node.Type.Attributes)
                        {
                            descriptors.Add(
                                new AttributePropertyDescriptor(
                                    attributeInfo.Name,
                                    attributeInfo,
                                    "Attributes",
                                    null,
                                    true));
                        }

                        // use property collection wrapper to expose the descriptors to the property grid
                        m_propertyGrid.Bind(new PropertyCollectionWrapper(descriptors.ToArray(), node));
                    }
                    else // for NodeAdapters
                    {
                        // Treat NodeAdapters like normal .NET objects and expose directly to the property grid
                        DomNodeAdapter adapter = item as DomNodeAdapter;
                        m_propertyGrid.Bind(adapter);
                    }
                }
            }
        }
Example #23
0
        /// <summary>
        /// Refreshes a node</summary>
        /// <param name="node">Node to be refreshed</param>
        private void RefreshNode(TreeControl.Node node)
        {
            UpdateNode(node);
            if (node.Expanded)
            {
                // get visible paths
                List<object> path = new List<object>();
                HashSet<Path<object>> paths = new HashSet<Path<object>>();
                foreach (TreeControl.Node child in node.Children)
                    AddPaths(child, path, paths);

                node.Expanded = false; // removes all child nodes
                node.Expanded = true;
                foreach (TreeControl.Node child in node.Children)
                    ExpandPaths(child, path, paths);
            }
        }
Example #24
0
 internal void RestoreExpansion(TreeControl.Node parent, TreeControlAdapter treeAdapter)
 {
     if (parent.Tag == null)
         return;
     List<object> expandedItems;
     if (m_expandedNodeMap.TryGetValue(parent.Tag, out expandedItems))
     {
         m_expandedNodeMap.Remove(parent.Tag);
         expandedItems.ForEach(item => treeAdapter.Expand(item));                
     }
 }
Example #25
0
 /// <summary>
 /// Constructor that uses the given TreeControl and the default equality comparer</summary>
 /// <param name="treeControl">Tree control to use</param>
 public TreeControlAdapter(TreeControl treeControl)
     : this(treeControl, null)
 {
 }
Example #26
0
        private void ExpandPaths(TreeControl.Node node, List<object> path, HashSet<Path<object>> paths)
        {
            if (node.Tag != null)
            {
                path.Add(node.Tag);
                if (paths.Contains(new AdaptablePath<object>(path)))
                {
                    node.Expanded = true;
                    foreach (TreeControl.Node child in node.Children)
                        ExpandPaths(child, path, paths);
                }

                path.RemoveAt(path.Count - 1);
            }
        }
Example #27
0
        private void AddPaths(TreeControl.Node node, List<object> path, HashSet<Path<object>> paths)
        {
            if (node.Expanded)
            {
                path.Add(node.Tag);
                paths.Add(new AdaptablePath<object>(path));

                foreach (TreeControl.Node child in node.Children)
                    AddPaths(child, path, paths);

                path.RemoveAt(path.Count - 1);
            }
        }
Example #28
0
        private void UpdateNode(TreeControl.Node node)
        {
            ItemInfo info = new WinFormsItemInfo(m_treeControl.ImageList, m_treeControl.StateImageList);
            info.IsExpandedInView = node.Expanded;

            if (m_itemView != null &&
                node.Tag != null)
            {
                m_itemView.GetInfo(node.Tag, info);
            }

            node.Label = info.Label;
            node.FontStyle = info.FontStyle;
            node.ImageIndex = info.ImageIndex;
            node.StateImageIndex = info.StateImageIndex;

            node.IsLeaf = info.IsLeaf;
            node.HasCheck = info.HasCheck;
            node.CheckBoxEnabled = info.CheckBoxEnabled;
            node.CheckState = info.GetCheckState();
            node.AllowSelect = info.AllowSelect;
            node.AllowLabelEdit = info.AllowLabelEdit;
            node.HoverText = info.HoverText;

            if (m_selectionContext != null && !m_synchronizingSelection)
            {
                try
                {
                    m_synchronizingSelection = true;

                    node.Selected = m_selectionContext.SelectionContains(MakePath(node));
                }
                finally
                {
                    m_synchronizingSelection = false;
                }
            }
        }
Example #29
0
            internal Node(TreeControl owner, Node parent, object tag)
            {
                m_owner = owner;
                m_parent = parent;
                m_tag = tag;

                if (parent == null) // root node can't collapse
                    SetFlag(Flags.Expanded, true);

                //calculate LabelWidth and LabelHeight
                m_owner.m_nodesToMeasure.Add(this);
            }
Example #30
0
 private IEnumerable<TreeControl.Node> GetSubtree(TreeControl.Node parent)
 {
     yield return parent;
     foreach (TreeControl.Node child in parent.Children)
         foreach (TreeControl.Node decendent in GetSubtree(child))
             yield return decendent;
 }
Example #31
0
 private void treeControl_NodeExpandedChanged(object sender, TreeControl.NodeEventArgs e)
 {
     UpdateNode(e.Node);
     SetChildren(e.Node);
 }