예제 #1
0
 //配置变量
 private void configElement()
 {
     if (tabControl_Lists.SelectedIndex == 0)//配置整型单元
     {
         if (listBox_VarInt.SelectedIndex >= 0)
         {
             SmallDialog_NewVar_INT.configElement((VarElement)form_main.varIntManager.getElement(listBox_VarInt.SelectedIndex));
             form_main.varIntManager.refreshUI_Element(listBox_VarInt.SelectedIndex);
         }
     }
     if (tabControl_Lists.SelectedIndex == 1)//配置字符单元
     {
         if (listBox_VarString.SelectedIndex >= 0)
         {
             SmallDialog_NewVar_String.configElement((VarElement)form_main.varStringManager.getElement(listBox_VarString.SelectedIndex));
             form_main.varStringManager.refreshUI_Element(listBox_VarString.SelectedIndex);
         }
     }
     if (tabControl_Lists.SelectedIndex == 2)//配置触发函数单元
     {
         if (listBox_Trigger.SelectedIndex >= 0)
         {
             SmallDialog_FunctionsConfig.configElement((FunctionElement)form_main.triggerFunctionManager.getElement(listBox_Trigger.SelectedIndex), "设置触发函数单元");
             form_main.triggerFunctionManager.refreshUI_Element(listBox_Trigger.SelectedIndex);
         }
     }
     if (tabControl_Lists.SelectedIndex == 3)//配置环境函数单元
     {
         if (listBox_Condition.SelectedIndex >= 0)
         {
             SmallDialog_FunctionsConfig.configElement((FunctionElement)form_main.contextFunctionManager.getElement(listBox_Condition.SelectedIndex), "设置环境函数单元");
             form_main.contextFunctionManager.refreshUI_Element(listBox_Condition.SelectedIndex);
         }
     }
     if (tabControl_Lists.SelectedIndex == 4)//配置执行函数单元
     {
         if (listBox_Execution.SelectedIndex >= 0)
         {
             SmallDialog_FunctionsConfig.configElement((FunctionElement)form_main.executionFunctionManager.getElement(listBox_Execution.SelectedIndex), "设置执行函数单元");
             form_main.executionFunctionManager.refreshUI_Element(listBox_Execution.SelectedIndex);
         }
     }
 }