Beispiel #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);
        }
        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();
        }
 public ListBoxDragNDrop()
 {
     this.AllowDrop        = true;
     this.SelectionMode    = SelectionMode.One;
     DragDrop             += new System.Windows.Forms.DragEventHandler(OnDragDrop);
     DragEnter            += new System.Windows.Forms.DragEventHandler(OnDragEnter);
     DragLeave            += new System.EventHandler(OnDragLeave);
     MouseDown            += new System.Windows.Forms.MouseEventHandler(OnMouseDown);
     DragOver             += new System.Windows.Forms.DragEventHandler(OnDragOver);
     SelectedIndexChanged += new System.EventHandler(OnSelectedIndexChanged);
 }
Beispiel #4
0
 /// <summary>
 /// Constructeur
 /// </summary>
 public ImageBox() : base()
 {
     BackgroundImageLayout = ImageLayout.Zoom;
     BorderStyle           = BorderStyle.FixedSingle;
     DragDrop  += new System.Windows.Forms.DragEventHandler(ImageBoxDragDrop);
     DragEnter += new System.Windows.Forms.DragEventHandler(ImageBoxDragEnter);
     ((PictureBox)this).AllowDrop = true;
     OpenFileDialogTitle          = "Please choose image an file";
     PasteMenuText      = "Paste image from clipboard";
     ImportImageText    = "Import image from file...";
     ControlToolTipText = "You can either drag & drop, paste image from clipboard or choose an image file with context menu.";
     PrepareContextMenu();
 }
Beispiel #5
0
    public guiwin(string filename)
    {
        // Set up drag and drop.
        AllowDrop = true;
        DragDrop += new
                    System.Windows.Forms.DragEventHandler(dragDrop);
        DragEnter += new
                     System.Windows.Forms.DragEventHandler(dragEnter);

        DoubleBuffered = true;

        doFile(filename);
    }
Beispiel #6
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);
        }
Beispiel #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RollingStoneMyPictures"/> class.
        /// </summary>
        /// <param name="manager">The manager.</param>
        public RollingStoneMyPictures(StonesManager manager)
            : base(manager)
        {
            try
            {
                ResourceName      = "MyPictures.png";
                TranslationId     = SR.Keys.StoneMyPictures;
                TargetDescription = null;
                Path = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);

                AllowDrop = true;
                DragOver += new System.Windows.Forms.DragEventHandler(window_DragOver);
                DragDrop += new System.Windows.Forms.DragEventHandler(window_DragDrop);
            }
            catch (Exception ex)
            {
                throw new StoneConstructorException("Create stone error", ex);
            }
        }
        public RollingStoneRecycleBin(StonesManager manager)
            : base(manager)
        {
            try
            {
                ResourceName      = "RecycleBin.png";
                TranslationId     = SR.Keys.StoneRecycleBin;
                TargetDescription = null;
                Path = "explorer.exe";
                Args = "::{645FF040-5081-101B-9F08-00AA002F954E}";

                AllowDrop = true;
                DragOver += new System.Windows.Forms.DragEventHandler(window_DragOver);
                DragDrop += new System.Windows.Forms.DragEventHandler(window_DragDrop);
            }
            catch (Exception ex)
            {
                throw new StoneConstructorException("Create stone error", ex);
            }
        }
Beispiel #9
0
 public void AllowFileDrop(System.Windows.Forms.DragEventHandler dragEventHandler)
 {
     FlatRedBallServices.Owner.AllowDrop  = true;
     FlatRedBallServices.Owner.DragEnter += DragEnter;
     FlatRedBallServices.Owner.DragDrop  += dragEventHandler;
 }