Exemplo n.º 1
0
        public void CloseProject()
        {
            this.treeView.Nodes.Clear();

            this._treeNode = null;

            SaveSettings();
        }
Exemplo n.º 2
0
        private void treeView_AfterCollapse(object sender, TreeViewEventArgs e)
        {
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            TreeNodes.TreeNode treeNode = (TreeNodes.TreeNode)e.Node;
            if (treeNode != null)
            {
                treeNode.Collapsed();
            }

            this.Cursor = System.Windows.Forms.Cursors.Default;
        }
Exemplo n.º 3
0
        private void treeView_DoubleClick(object sender, EventArgs e)
        {
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            TreeNodes.TreeNode treeNode = (TreeNodes.TreeNode) this.treeView.SelectedNode;
            if (treeNode != null)
            {
                treeNode.DoubleClick();
            }

            this.Cursor = System.Windows.Forms.Cursors.Default;
        }
Exemplo n.º 4
0
        private void treeView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == System.Windows.Forms.Keys.Enter)
            {
                this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

                TreeNodes.TreeNode treeNode = (TreeNodes.TreeNode) this.treeView.SelectedNode;
                if (treeNode != null)
                {
                    treeNode.DoubleClick();
                }

                this.Cursor = System.Windows.Forms.Cursors.Default;
            }
        }
Exemplo n.º 5
0
        public void OpenProject(string path)
        {
            try
            {
                TreeNodes.TreeNode treeNode = CreateTreeNode(path);

                this._treeNode = treeNode;

                this.treeView.Nodes.Add(this._treeNode);
                this._treeNode.Expand();
                this.treeView.SelectedNode = this._treeNode;

                SaveSettings();
            }
            catch (System.Exception exception)
            {
                int n = 0;
            }
        }