Ejemplo n.º 1
0
        public LibraryView()
        {
            this.Size      = new Size(100, 50);
            this.BackColor = Color.Gray;

            ProjectManager.Instance.ProjectChanged += (s, a) =>
            {
                refreshContent();
            };

            FileManager.Instance.FileAdded += (s, a) =>
            {
                refreshContent();
            };


            initControls();
            configureControls();
            addControls();

            refreshContent();


            FileTree.ItemDrag += (s, a) =>
            {
                FileTree.DoDragDrop(a.Item, DragDropEffects.All);
            };

            FileTree.KeyDown += (s, a) =>
            {
                if (!a.Handled && a.KeyData == Keys.Delete) //delete key
                {
                    deleteSelectedNode();
                }
            };
        }