Beispiel #1
0
        public GenericTreeNode(IUIObject Obj)
            : base(Obj.ToString(), Obj.TreeImageIndex, Obj.TreeSelectedImageIndex)
        {
            this.Tag = Obj;
            Obj.AfterSave += new EventHandler(this.OnObjectSave);
            Obj.BeforeDelete += new EventHandler(this.OnObjectDelete);
            Obj.ChildChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.OnChildChanged);

            //Add a dummy node only if the object could have child nodes
            if(this.CanHaveChildren)
                this.Nodes.Add("Temporary Child Node");
        }