private void newNote() { TreeNode node; if ((node = list_treeView.SelectedNode) != null) { Tip notepage = new Tip("请输入笔记页名称"); notepage.ShowDialog(); if (nodeName.Equals("")) { return; } ClosePreForm(); //嵌入窗体前判断当前容器中是否有窗口没关掉 NodeForm nodeForm = new NodeForm(); nodeForm.edit_richTextBox.Dock = DockStyle.Fill; //设置富文本框的填充 int index = node.Index; KnowledgeBase kb = KBM.getKB(index); Note note; if ((note = FileManagement.newNote(kb, nodeName)) != null) { addSonNode(node, nodeName); OpenForm(nodeForm, nodeName); bindingNoteForm(nodeForm, note); } } }
private void exportKB() { TreeNode node; if ((node = list_treeView.SelectedNode) != null) { int index = node.Index; FileManagement.exportKB(KBM.getKB(index)); } }
private void importNote() { TreeNode node; if ((node = list_treeView.SelectedNode) != null) { int index = node.Index; KnowledgeBase kb = KBM.getKB(index); FileManagement.importNoteDialog(KBM, kb); updateTree(); } }
private void newKB() { Tip notepage = new Tip("请输入知识库名称"); notepage.ShowDialog(); if (!nodeName.Equals("")) { if (FileManagement.newKB(KBM, nodeName)) { updateTree(); } } }
private void loadTreeView() //加载树目录 { KBM = FileManagement.loadKnowledgeBaseManagement(); List <KnowledgeBase> kbs = KBM.getKBS(); foreach (KnowledgeBase kb in kbs) { TreeNode treeNode = addRootNode(kb.getName()); List <Note> notes = kb.GetNotes(); foreach (Note note in notes) { addSonNode(treeNode, note.getName()); } } }
private void exportNote() { TreeNode node = list_treeView.SelectedNode; if (null != node) { if (node.Parent != null) { int index = node.Index; TreeNode prant = node.Parent; int ip = prant.Index; Note note = KBM.getKB(ip).getNote(index); FileManagement.exportNote(note); } } }
private void importKB() { FileManagement.importKBDialog(KBM); updateTree(); }