コード例 #1
0
        void AccessTreeView(TreeViewObject parent, CustomTreeView treeView, object owner, string name, string imageKey)
        {
            Owner = owner;
            if (parent != null)
            {
                parent.Childs.Add(this);
                this.Parent = parent;
            }
            Id = DateTime.Now.Millisecond;
            TreeNodeCollection nodes = null;

            if (parent == null)
            {
                nodes = treeView.Nodes;
            }
            else
            {
                Parent = parent;
                nodes  = parent.Node.Nodes;
            }
            nodes.Add(Id.ToString(), name);
            nodes[Id.ToString()].ImageKey         = imageKey;
            nodes[Id.ToString()].SelectedImageKey = imageKey;
            Node          = nodes[Id.ToString()];
            Node.Tag      = this;
            this.Name     = name;
            this.ImageKey = imageKey;
        }
コード例 #2
0
 public TreeViewObject(TreeViewObject parent, CustomTreeView treeView, object owner, string name, string imageKey)
 {
     AccessTreeView(parent, treeView, owner, name, imageKey);
     //if (treeView.Created)
     //{
     //    AccessTreeViewDelegate d = new AccessTreeViewDelegate(AccessTreeView);
     //    treeView.BeginInvoke(d, parent, treeView, owner, name, imageKey);
     //}
     //else
     //{
     //}
     //d.Invoke(parent, treeView, owner, name, imageKey);
 }
コード例 #3
0
 public void OnDoubleClick(TreeViewObject obj, CustomTreeView treeView)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public void OnFocus(TreeViewObject obj, CustomTreeView treeView)
 {
 }
コード例 #5
0
 public void OnProperty(TreeViewObject obj, CustomTreeView treeView)
 {
     //  MessageBox.Show(obj.Name);
 }
コード例 #6
0
 public void OnDelete(TreeViewObject obj, CustomTreeView treeView)
 {
 }
コード例 #7
0
 public void OnSelectTreeViewObject(TreeViewObject obj, CustomTreeView treeView)
 {
     //MessageBox.Show(obj.Name);
 }