Ejemplo n.º 1
0
        public TreeViewImages(DisksDB.DataBase.DataBase db, FormImagePreview prv)
        {
            this.DataBase = db;
            this.prv = prv;
            LoadTree();
            this.ContextMenu.Popup += new EventHandler(ContextMenuPopup);

            this.AllowDrop = true;
            this.DragDrop += new DragEventHandler(TreeViewImages_DragDrop);
        }
Ejemplo n.º 2
0
 private void ShowHideImagesExplorer(object sender, EventArgs e)
 {
     if (null == this.imagesTree)
     {
         this.imagePreview = new FormImagePreview();
         this.imagePreview.Show(this.dockPanel);
         this.imagesTree = new TreeViewImages(DisksDB.DataBase.DataBase.Instance, this.imagePreview);
         this.imagesTree.ItemSelected += new EventHandlerItemSelected(ControlItemSelected);
         this.imagesTree.ImageList = this.imageListCatalog;
         this.imagesExplorer = new FormImagesExplorer();
         this.imagesTree.Dock = DockStyle.Fill;
         this.imagesExplorer.Controls.Add(this.imagesTree);
         this.imagesExplorer.Icon = FileIcons.GetFileIcon(".bmp");
         this.imagesExplorer.Show(this.dockPanel);
         this.menuItemImagesExplorer.Checked = true;
         this.imagesTree.ItemSelected += new EventHandlerItemSelected(ControlItemSelected);
     }
     else
     {
         this.imagePreview.Close();
         this.imagesTree = null;
         this.imagesExplorer.Close();
         this.menuItemImagesExplorer.Checked = false;
     }
 }