private void Form1_Load_1(object sender, EventArgs e) { DBClass.connect("D:/DB/Debug.db"); comandList = DBClass.getComands(nullStr); CommandsTree.BeginUpdate(); CommandsTree.Nodes.Add("Команды"); CommandsTree.EndUpdate(); extractHeads(comandList); loadTreeView(comandList); CommandsTree.Nodes[0].Toggle(); }
private void LoadFromDB() { CommandsTree.Nodes.Clear(); comandList.Clear(); commandTreeComponentList.Clear(); comandList = DBClass.getComands(nullStr); CommandsTree.BeginUpdate(); CommandsTree.Nodes.Add("Команды"); CommandsTree.EndUpdate(); extractHeads(comandList); loadTreeView(comandList); CommandsTree.Nodes[0].Toggle(); }
private void button1_Click(object sender, EventArgs e) { String id = CommandsTree.SelectedNode.Name; Comand c = new Comand(FindSuitableId(), messageTextBox.Text, "", id, Convert.ToString(typeComboBox.SelectedIndex + 1)); CommadnTreeComponent ct = new CommadnTreeComponent(c, 2, 0); commandTreeComponentList.Add(ct); DBClass.putComand(ct.Comand); CommandsTree.BeginUpdate(); addTreeComponent(ct); CommandsTree.EndUpdate(); setAddComponets(false); }
private void loadTree() { CommandsTree.BeginUpdate(); loadTreeComponentTree(commandTreeComponentList); }
private void loadTreeView(List <Comand> list) { CommandsTree.BeginUpdate(); loadTreeComponentTree(commandTreeComponentList); CommandsTree.EndUpdate(); }