コード例 #1
0
 //检查变量
 private void checkElement()
 {
     if (tabControl_Lists.SelectedIndex == 0)//检查整型单元
     {
         int currentIndex = listBox_VarInt.SelectedIndex;
         if (currentIndex >= 0)
         {
             VarElement element = (VarElement)form_main.varIntManager.getElement(currentIndex);
             if (element == null)
             {
                 return;
             }
             //String usedInfor = element.getUsedInfor();
             //SmallDialog_ShowString.showString("整型变量检查", usedInfor);
             SmallDialog_ShowList.showList(element.getUsedMeory());
         }
     }
     if (tabControl_Lists.SelectedIndex == 1)//检查字符单元
     {
         int currentIndex = listBox_VarString.SelectedIndex;
         if (currentIndex >= 0)
         {
             VarElement element = (VarElement)form_main.varStringManager.getElement(currentIndex);
             if (element == null)
             {
                 return;
             }
             //String usedInfor = element.getUsedInfor();
             //SmallDialog_ShowString.showString("字符变量检查", usedInfor);
             SmallDialog_ShowList.showList(element.getUsedMeory());
         }
     }
     if (tabControl_Lists.SelectedIndex == 2)//检查触发函数单元
     {
         int currentIndex = listBox_Trigger.SelectedIndex;
         if (currentIndex >= 0)
         {
             FunctionElement element = (FunctionElement)form_main.triggerFunctionManager.getElement(currentIndex);
             if (element == null)
             {
                 return;
             }
             //String usedInfor = element.getUsedInfor();
             //SmallDialog_ShowString.showString("触发器函数检查", usedInfor);
             SmallDialog_ShowList.showList(element.getUsedMeory());
         }
     }
     if (tabControl_Lists.SelectedIndex == 3)//检查环境函数单元
     {
         int currentIndex = listBox_Condition.SelectedIndex;
         if (currentIndex >= 0)
         {
             FunctionElement element = (FunctionElement)form_main.contextFunctionManager.getElement(currentIndex);
             if (element == null)
             {
                 return;
             }
             //String usedInfor = element.getUsedInfor();
             //SmallDialog_ShowString.showString("环境函数检查", usedInfor);
             SmallDialog_ShowList.showList(element.getUsedMeory());
         }
     }
     if (tabControl_Lists.SelectedIndex == 4)//检查执行函数单元
     {
         int currentIndex = listBox_Execution.SelectedIndex;
         if (currentIndex >= 0)
         {
             FunctionElement element = (FunctionElement)form_main.executionFunctionManager.getElement(currentIndex);
             if (element == null)
             {
                 return;
             }
             //String usedInfor = element.getUsedInfor();
             //SmallDialog_ShowString.showString("执行函数检查", usedInfor);
             SmallDialog_ShowList.showList(element.getUsedMeory());
         }
     }
 }
コード例 #2
0
 private void button_checkUsed_Click(object sender, EventArgs e)
 {
     SmallDialog_ShowList.showList(element.getUsedMeory());
 }