示例#1
0
        public void CloseProject()
        {
            this.treeView.Nodes.Clear();

            this._treeNode = null;

            SaveSettings();
        }
示例#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;
        }
示例#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;
        }
示例#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;
            }
        }
示例#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;
            }
        }