Пример #1
0
        //*************************************************************************************************************
        public LocalList()
        {
            FullRowSelect = true;
            Columns.Add("Name", 205);
            Columns.Add("Size", 100, HorizontalAlignment.Right);
            Columns.Add("Last Update", 125);

            DoubleClick    += new System.EventHandler(this_DoubleClick);
            ItemDrag       += new System.Windows.Forms.ItemDragEventHandler(this_ItemDrag);
            DragDrop       += new System.Windows.Forms.DragEventHandler(this_DragDrop);
            DragEnter      += new System.Windows.Forms.DragEventHandler(this_DragEnter);
            KeyDown        += new System.Windows.Forms.KeyEventHandler(this_KeyDown);
            MouseUp        += new System.Windows.Forms.MouseEventHandler(this_MouseUp);
            AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this_AfterLabelEdit);

            fileSystemWatcher.IncludeSubdirectories = false;
            fileSystemWatcher.NotifyFilter          = NotifyFilters.Attributes
                                                      | NotifyFilters.CreationTime
                                                      | NotifyFilters.DirectoryName
                                                      | NotifyFilters.FileName
                                                      | NotifyFilters.LastWrite
                                                      | NotifyFilters.Size;

            fileSystemWatcher.SynchronizingObject = this;
            fileSystemWatcher.Changed            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Created            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Deleted            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Renamed            += new System.IO.RenamedEventHandler(this.fileSystemWatcher_Renamed);
            ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.List_ColumnClick);
        }
Пример #2
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();
        }
		private void InitializeComponent()
		{
			// 
			// MogControl_PackageTreeView
			// 
			FocusForAssetNodes = MOG_ControlsLibrary.Controls.LeafFocusLevel.PackageGroup;
			AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(MogControl_PackageTreeView_AfterLabelEdit);
			ItemDrag += new System.Windows.Forms.ItemDragEventHandler(MogControl_PackageTreeView_ItemDrag);
		}
Пример #4
0
        //*************************************************************************************************************
        public RemoteList()
        {
            FullRowSelect = true;
            Columns.Add("Name", 220);
            Columns.Add("Size", 100, HorizontalAlignment.Right);
            Columns.Add("Last Update", 125);

            DoubleClick    += new System.EventHandler(this_DoubleClick);
            ItemDrag       += new System.Windows.Forms.ItemDragEventHandler(this_ItemDrag);
            DragDrop       += new System.Windows.Forms.DragEventHandler(this_DragDrop);
            DragEnter      += new System.Windows.Forms.DragEventHandler(this_DragEnter);
            KeyDown        += new System.Windows.Forms.KeyEventHandler(this_KeyDown);
            MouseUp        += new System.Windows.Forms.MouseEventHandler(this_MouseUp);
            AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this_AfterLabelEdit);
            ColumnClick    += new System.Windows.Forms.ColumnClickEventHandler(this.List_ColumnClick);
        }