Ejemplo n.º 1
0
        public void WriteXML(XmlWriter writer)
        {
            writer.WriteElementString("CameraType", CameraType);
            writer.WriteElementString("Identifier", Identifier);
            writer.WriteElementString("Alias", Alias);

            string iconBase64 = XmlHelper.ImageToBase64(Icon, ImageFormat.Png);

            writer.WriteElementString("Icon", iconBase64);

            string displayRectangle = string.Format("{0};{1};{2};{3}", DisplayRectangle.X, DisplayRectangle.Y, DisplayRectangle.Width, DisplayRectangle.Height);

            writer.WriteElementString("DisplayRectangle", displayRectangle);

            writer.WriteElementString("AspectRatio", AspectRatio);

            if (!string.IsNullOrEmpty(Specific))
            {
                writer.WriteStartElement("Specific");
                writer.WriteRaw(Specific);
                writer.WriteEndElement();
            }
        }