Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="treeView"></param>
        internal ObjectTreeViewBuddyListView(ObjectTreeView treeView)
        {
            if (treeView == null)
            {
                throw new ArgumentNullException("treeView");
            }
            _treeView = treeView;

            // image list...
            this.SmallImageList = treeView.ImageList;
            this.View           = View.Details;
            this.HideSelection  = false;

            // columns...
            this.Columns.Clear();
            _itemColumnHeader      = new ColumnHeader();
            _itemColumnHeader.Text = "Item";
            this.Columns.Add(_itemColumnHeader);

            // update...
            this.RefreshView();

            // subscribe...
            treeView.AfterSelect += new TreeViewEventHandler(treeView_AfterSelect);
        }
Ejemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            // unsub...
            if (this._treeView != null)
            {
                _treeView.AfterSelect -= new TreeViewEventHandler(treeView_AfterSelect);
                _treeView              = null;
            }

            base.Dispose(disposing);
        }