public override string toXMLString() { StringBuilder strXML = new StringBuilder(); strXML.Append(@"<object> <type>%type%</type>"); strXML.Replace("%type%", this.getName()); foreach (PictureList s in ((CPictureCollectionAtt)(Attributs)).PictureURLList) { strXML.Append("<uri>" + s.PictureURL + "</uri>"); } if (((CPictureCollectionAtt)(Attributs)).PictureURLList.Count == 0) { strXML.Append("<uri></uri>"); } strXML.Append(@"<x>%x%</x> <y>%y%</y> <width>%width%</width> <height>%height%</height> <marker>%marker%</marker> </object> "); strXML.Replace("%x%", Attributs.getLocation().X.ToString()); strXML.Replace("%y%", Attributs.getLocation().Y.ToString()); strXML.Replace("%width%", Attributs.getSize().Width.ToString()); strXML.Replace("%height%", Attributs.getSize().Height.ToString()); strXML.Replace("%marker%", Attributs.getMarkerName()); return(strXML.ToString()); }
public override string toXMLString() { StringBuilder strXML = new StringBuilder(); strXML.Append(@"<object> <type>%type%</type> <uri>%uri%</uri> <x>%x%</x> <y>%y%</y> <width>%width%</width> <height>%height%</height> <marker>%marker%</marker> </object> "); strXML.Replace("%type%", this.getName()); strXML.Replace("%uri%", ((CVideoAtt)(Attributs)).VideoURL); strXML.Replace("%x%", Attributs.getLocation().X.ToString()); strXML.Replace("%y%", Attributs.getLocation().Y.ToString()); strXML.Replace("%width%", Attributs.getSize().Width.ToString()); strXML.Replace("%height%", Attributs.getSize().Height.ToString()); strXML.Replace("%marker%", Attributs.getMarkerName()); return(strXML.ToString()); }