public void CloseProject() { this.treeView.Nodes.Clear(); this._treeNode = null; SaveSettings(); }
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; }
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; }
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; } }
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; } }