Ejemplo n.º 1
0
        public bool cloneElement(int index)
        {
            if (index < 0 || index >= objList.Count)
            {
                return(false);
            }
            ObjectElement elementIndex = ((ObjectElement)getElement(index));
            ObjectElement element      = elementIndex.clone();

            addElement(element);
            return(true);
        }
Ejemplo n.º 2
0
 public static bool allowUpdateUI = true; //允许更新UI
 public void cloneTo(ObjectVector newInstance)
 {
     newInstance.listBox     = listBox;
     newInstance.listBoxAide = listBoxAide;
     for (int i = 0; i < objList.Count; i++)
     {
         ObjectElement element    = (ObjectElement)objList[i];
         ObjectElement newElement = element.clone();
         newInstance.addElement(newElement);
         newElement.parent = newInstance;
     }
 }