예제 #1
0
 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();
 }
예제 #2
0
 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();
 }
예제 #3
0
        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);
        }
예제 #4
0
 private void loadTree()
 {
     CommandsTree.BeginUpdate();
     loadTreeComponentTree(commandTreeComponentList);
 }
예제 #5
0
 private void loadTreeView(List <Comand> list)
 {
     CommandsTree.BeginUpdate();
     loadTreeComponentTree(commandTreeComponentList);
     CommandsTree.EndUpdate();
 }