//重新设置父类 public void resetElementParent() { for (int i = 0; i < getElementCount(); i++) { ObjectElement element = (ObjectElement)getElement(i); element.parent = this; } }
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); }
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; } }
public void baseCloneTo(ObjectElement newInstance) { newInstance.parent = parent; newInstance.name = name + ""; }