/// <summary>
 /// Converts an object into its XML representation.
 /// </summary>
 /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"/> stream to which the object is serialized. </param>
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteElementString("BottomLeft", BottomLeft.ToString());
     writer.WriteElementString("BottomRight", BottomRight.ToString());
     writer.WriteElementString("TopLeft", TopLeft.ToString());
     writer.WriteElementString("TopRight", TopRight.ToString());
 }
Ejemplo n.º 2
0
 public override string ToString()
 {
     return
         (TopLeft.ToString() + "," +
          TopRight.ToString() + "," +
          BottomLeft.ToString() + "," +
          BottomRight.ToString());
 }
Ejemplo n.º 3
0
 public override string ToString()
 {
     // using string interpolation!!!
     return($"[Top left point -  {TopLeft.ToString()}\n" +
            $"Bottom right point - {BotRight.ToString()}\n" +
            $"Height - {Height}\n" +
            $"Width - {Width}]\n");
 }
Ejemplo n.º 4
0
 public override string ToString()
 {
     if (Filled)
     {
         return(TopLeft.ToString() + " Filled " + Couleur.ToString());
     }
     else
     {
         return(TopLeft.ToString() + " NotFilled " + Couleur.ToString());
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Converts object to the string of the format specified.
        /// </summary>
        /// <param name="format"></param>
        /// <param name="formatProvider"></param>
        /// <returns></returns>
        protected override string ToStringInternal(string format, IFormatProvider formatProvider)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Rectangle(")
            .Append("p=")
            .Append(TopLeft.ToString(format, formatProvider))
            .Append(",s=")
            .Append(Size.ToString(format, formatProvider))
            .Append(",w=")
            .Append(LineWidth?.ToString(format, formatProvider) ?? "null")
            .Append(",c=")
            .Append(Color ?? "null")
            .Append(",f=")
            .Append(Fill?.ToString(formatProvider).ToLower() ?? "null")
            .Append(')');

            return(sb.ToString());
        }
Ejemplo n.º 6
0
        protected override void ExportGeometry(XElement xParent)
        {
            var nfi = new NumberFormatInfo();

            nfi.NumberDecimalSeparator = ".";

            var tmpDoc = new XDocument(new XElement("TextGeometry",
                                                    new XAttribute("TopLeft", TopLeft.ToString(nfi)),
                                                    new XAttribute("BottomRight", BottomRight.ToString(nfi)),
                                                    new XAttribute("Text", Text),
                                                    new XAttribute("FontFamily", FontFamily),
                                                    new XAttribute("FontStyle", FontStyle),
                                                    new XAttribute("FontWeight", FontWeight),
                                                    new XAttribute("TextSize", TextSize.ToString(nfi)),
                                                    new XAttribute("Alignment", Alignment),
                                                    new XAttribute("Trimming", Trimming)));

            xParent.Add(new XComment(tmpDoc.Root.ToString()));

            if (Path.Data is GeometryGroup)
            {
                ExportGeometryGroup(xParent, Path.Data as GeometryGroup);
            }
        }
Ejemplo n.º 7
0
 public override string ToString()
 {
     return(string.Format(CultureInfo.InvariantCulture, "[{0}][{1}]", TopLeft.ToString(), BottomRight.ToString()));
 }
Ejemplo n.º 8
0
 public override string ToString()
 {
     return("MyImage " + TopLeft.ToString() + " " + File);
 }