public ObjectElement cloneForExceport(ObjectVector parent) { ScriptFileElement newInstance = new ScriptFileElement(parent); if (value != null) { newInstance.value = ((String)value) + ""; } return newInstance; }
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 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 ObjectElement(ObjectVector parentT) { parent = parentT; }
public ScriptFileElement(ObjectVector parentT) { parent = parentT; }
public static Object getValue(String title, Object defValue, byte valueType, ObjectVector vectorListT) { vectorList = vectorListT; if (smallDialog_PropertyValue == null) { smallDialog_PropertyValue = new SmallDialog_PropertyValue(title); } else { smallDialog_PropertyValue.Text = title; } smallDialog_PropertyValue.setValueType(valueType, defValue); smallDialog_PropertyValue.ShowDialog(); return smallDialog_PropertyValue.getValue(); }
//带图片映射的绘制 public void display(Graphics g, float destX, float destY, float zoomLevel, byte transFlag, Rect limitClip, int alpha, ObjectVector imgMapList) { if (imageElement != null) { MImgElement imageElementMapped = getMappedImage(imgMapList, imageElement); if (imgMapList != null && imageElementMapped != null && imageElementMapped.image != null && imageElement.image != null && (imageElementMapped.image.Size.Equals(imageElement.image.Size))) { GraphicsUtil.drawClip(g, imageElementMapped.image, (int)(destX), (int)(destY), clipRect.X, clipRect.Y, clipRect.Width, clipRect.Height, transFlag, zoomLevel, limitClip, alpha); } else { if (imgClip != null) { GraphicsUtil.drawClip(g, imgClip, (int)(destX), (int)(destY), 0, 0, imgClip.Width, imgClip.Height, transFlag, zoomLevel, limitClip, alpha); } else { GraphicsUtil.drawClip(g, imageElement.image, (int)(destX), (int)(destY), clipRect.X, clipRect.Y, clipRect.Width, clipRect.Height, transFlag, zoomLevel, limitClip, alpha); } } } }
//获得映射图片 public static MImgElement getMappedImage(ObjectVector imgMappingList, MImgElement imgElementFrom) { if (imgMappingList == null) { return null; } for (int i = 0; i < imgMappingList.getElementCount(); i++) { Object obj = imgMappingList.getElement(i); if (!(obj is ImageMappingElement)) { return null; } ImageMappingElement imgMaElement = (ImageMappingElement)obj; if (imgMaElement.ImgFrom.Equals(imgElementFrom)) { return imgMaElement.ImgTo; } } return null; }