private void 粘贴节点ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode pNode = treeView_nav.SelectedNode; FileDBHelper fdbHelper = new FileDBHelper(); fdbHelper.saveFileNode(treeNode_Cut.Text, int.Parse("" + treeNode_Cut.Tag), int.Parse("" + pNode.Tag)); pNode.Nodes.Add(treeNode_Cut); pNode.ExpandAll(); treeNode_Cut = null; }
private void btn_saveNode_Click(object sender, EventArgs e) { FileDBHelper dbHelper = new FileDBHelper(); if (editMode == 1) { dbHelper.insertFileNode(this.textBox_NodeName.Text, parentID); } else if (editMode == 2) { dbHelper.saveFileNode(this.textBox_NodeName.Text, selfID); } this.DialogResult = DialogResult.OK; this.Close(); }