示例#1
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);
        }
示例#2
0
 public CommadnTreeComponent(Comand comand, int level, int position)
 {
     this.Comand   = comand;
     this.Level    = level;
     this.Position = position;
 }