示例#1
0
 public void editVariable(m_Variable v_origin)
 {
     addNew         = false;
     this.Title     = "Edit Variable";
     butAdd.Content = "Edit";
     this.v_origin  = v_origin;
     textBox1.Text  = v_origin.name;
     textBox2.Text  = v_origin.value.ToString();
 }
示例#2
0
 void finish()
 {
     try
     {
         String name = textBox1.Text;
         if (name != "")
         {
             if (addNew)
             {
                 m_Variable v = new m_Variable();
                 loadData(v);
                 form_editor.addVariable(v, addIndex);
             }
             else
             {
                 int[] loc = form_editor.getTVI_Location(self);
                 loadData(v_origin);
                 form_editor.reloadTree_map_variable(loc);
             }
             this.Close();
         }
     }
     catch { }
 }
示例#3
0
 void loadData(m_Variable v)
 {
     v.name  = textBox1.Text;
     v.value = TheTool.getInt(textBox2.Text);
 }