//在当前节点增加子类别 private void 添加子节点ToolStripMenuItem_Click(object sender, EventArgs e) { if (treeView1.SelectedNode != null) { int noteId = (int)treeView1.SelectedNode.Tag; AddNote add = new AddNote(noteId, NewMethod); add.Show(); } else { MessageBox.Show("请选择节点"); } }
//增加一级类别 private void 添加父节点ToolStripMenuItem_Click(object sender, EventArgs e) { AddNote add = new AddNote(-1, NewMethod); add.Show(); }