public TreeViewExpandedStateSerializer(TreeView tv, ITreeNodeResolver resolver)
        {
            if (tv == null) throw new ArgumentNullException("tv");
            if (resolver == null) throw new ArgumentNullException("resolver");

            treeview = tv;
            treenodeResolver = resolver;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TreeViewEx"/> class.
        /// </summary>
        public TreeViewEx() : base()
        {
            currentTreeViewNodeSorter = (IComparer) new Sorter();
            base.TreeViewNodeSorter   = currentTreeViewNodeSorter;
            base.FullRowSelect        = true;
            base.HideSelection        = false;
            base.AllowDrop            = true;

            treeViewExpandedStateSerializer = new TreeViewExpandedStateSerializer(this, BuiltinTreeNodeResolver.Text);
            expandedStateNodeResolver       = treeViewExpandedStateSerializer.TreeNodeResolver;
            contextMenuStripProvider        = new DefaultTreeViewExContextMenuStripProvider(this);
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TreeViewEx"/> class.
        /// </summary>
        public TreeViewEx() : base()
        {
            currentTreeViewNodeSorter = (IComparer)new Sorter();
            base.TreeViewNodeSorter = currentTreeViewNodeSorter;
            base.FullRowSelect = true;
            base.HideSelection = false;
            base.AllowDrop = true;

            treeViewExpandedStateSerializer = new TreeViewExpandedStateSerializer(this, BuiltinTreeNodeResolver.Text);
            expandedStateNodeResolver = treeViewExpandedStateSerializer.TreeNodeResolver;
            contextMenuStripProvider = new DefaultTreeViewExContextMenuStripProvider(this);
        }
        public TreeViewExpandedStateSerializer(TreeView tv, ITreeNodeResolver resolver)
        {
            if (tv == null)
            {
                throw new ArgumentNullException("tv");
            }
            if (resolver == null)
            {
                throw new ArgumentNullException("resolver");
            }

            treeview         = tv;
            treenodeResolver = resolver;
        }