Ejemplo n.º 1
0
 /// <summary>
 /// 根据id删除一个内置的语句块
 /// </summary>
 /// <param name="id"></param>
 private void DelControl(int id)
 {
     try
     {
         CodeBox xb = ListCodeBoxChild[id] as CodeBox;
         ///不能删除主函数入口
         if (xb.CodeBoxType != CodeBox.XAType.XMain && xb.CodeBoxType != CodeBox.XAType.XFunctionEnter)
         {
             ///删除代码块
             xb.DelCodeBox();
             ListCodeBoxChild.Remove(id);
             Children.Remove(xb);
         }
     }
     catch (Exception ex)
     {
         LoggerHelp.WriteLogger(ex.ToString());
     }
 }