Example #1
0
        public void WriteXml(XmlWriter writer)
        {
            var pointConverter = new PointConverter();
            var sizeConverter  = new SizeConverter();

            writer.WriteStartElement("WindowSettings");
            writer.WriteElementString("WindowState", WindowState.ToString());
            writer.WriteElementString("Location", pointConverter.ConvertToString(Location));
            writer.WriteElementString("Size", sizeConverter.ConvertToString(Size));
            writer.WriteElementString("Zoom", Zoom.ToString());
            writer.WriteElementString("PositionInText", PositionInText.ToString());
            writer.WriteEndElement();
        }
Example #2
0
 public void ConvertToString()
 {
     _converter.ConvertToString(new Size(2, 3)).Should().Be("2 3");
     _converter.ConvertToString(new Size(-4, -5, false)).Should().Be("0 0");
 }