Пример #1
0
        public DynamicPlaylistTreeView()
        {
            ImageList            = new ImageList();
            ImageList.ColorDepth = ColorDepth.Depth32Bit;
            ImageList.Images.Add(Shell32.GetShellIcon(3, false));   //FOLDER
            ImageList.Images.Add(Shell32.GetShellIcon(116, false)); //SINGLE_FILE
            ImageList.Images.Add(Shell32.GetShellIcon(55, false));  //QUERY
            ImageList.Images.Add(Shell32.GetShellIcon(128, false)); //MULTIPLE_FILE
            ImageList.Images.Add(Shell32.GetShellIcon(40, false));  //ALBUM_DISC

            ItemDrag             += new System.Windows.Forms.ItemDragEventHandler(this.treeView1_ItemDrag);
            AfterSelect          += new System.Windows.Forms.TreeViewEventHandler(this.queryView1_AfterSelect);
            NodeMouseClick       += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
            NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
            DragDrop             += new System.Windows.Forms.DragEventHandler(this.treeView1_DragDrop);
            DragOver             += new System.Windows.Forms.DragEventHandler(this.treeView1_DragOver);
            Gageas.Lutea.Core.Controller.onTrackChange += id =>
            {
                this.Invoke((Action)(() =>
                {
                    ResetRelatedTree();
                }));
            };
            Controller.onDatabaseUpdated += () =>
            {
                this.Invoke((Action)(() =>
                {
                    ResetRelatedTree();
                }));
            };
            InitializeComponent();
        }
Пример #2
0
 public BaseTreeView() : base()
 {
     AfterSelect     += new System.Windows.Forms.TreeViewEventHandler(OnTreeSelect);
     NodeMouseClick  += new System.Windows.Forms.TreeNodeMouseClickEventHandler(OnTreeClick);
     ShowNodeToolTips = true;
 }