Exemplo n.º 1
0
        public virtual void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteAttributeInt("ID", ID);
            writer.WriteAttributeString("Name", Name);
            writer.WriteAttributeInt("Number", Number);
            writer.WriteAttributeDouble("Height", Height);
            writer.WriteAttributeDouble("Weight", Weight);
            writer.WriteAttributeString("DominantHand", MydominantHand.ToString());
            writer.WriteAttributeString("Appearance", Myappearance.ToString());

            writer.WriteAttributeString("Note", Note);
        }
Exemplo n.º 2
0
        public override void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteAttributeString("Text", Text);

            writer.WriteAttributeDouble("Angle", Angle);

            base.WriteXml(writer);
        }
Exemplo n.º 3
0
        void WriteCoordinateSystem(Drawing drawing, XmlWriter writer)
        {
            writer.WriteStartElement("Viewport");
            writer.WriteAttributeDouble("Left", drawing.CoordinateSystem.MinimalVisibleX);
            writer.WriteAttributeDouble("Top", drawing.CoordinateSystem.MaximalVisibleY);
            writer.WriteAttributeDouble("Right", drawing.CoordinateSystem.MaximalVisibleX);
            writer.WriteAttributeDouble("Bottom", drawing.CoordinateSystem.MinimalVisibleY);

            var backgroundBrush = drawing.Canvas.Background as SolidColorBrush;
            if (backgroundBrush != null && backgroundBrush.Color != Colors.White)
            {
                writer.WriteAttributeString("Color", backgroundBrush.Color.ToString());
            }

            if (drawing.CoordinateGrid.Locked)
            {
                writer.WriteAttributeBool("Locked", true);
            }

            if (drawing.CoordinateGrid.Visible)
            {
                writer.WriteAttributeBool("Grid", true);
                writer.WriteAttributeBool("Axes", drawing.CoordinateGrid.ShowAxes);
            }

            writer.WriteEndElement();
        }
Exemplo n.º 4
0
 void Write(Drawing drawing, XmlWriter writer)
 {
     var figures = drawing.GetSerializableFigures();
     writer.WriteStartDocument();
     writer.WriteStartElement("Drawing");
     writer.WriteAttributeDouble("Version", drawing.Version);
     writer.WriteAttributeString("Creator", System.Windows.Application.Current.ToString());
     WriteCoordinateSystem(drawing, writer);
     WriteStyles(drawing, writer);
     WriteFigureList(figures, writer);
     writer.WriteEndElement();
     writer.WriteEndDocument();
 }
Exemplo n.º 5
0
        public void Save(XmlWriter writer)
        {
            writer.WriteAttributeString("file", File);
            writer.WriteAttributeBool("followtail", FollowTail);
            writer.WriteAttributeBool("showlinenumbers", ShowLineNumbers);
            writer.WriteAttributeString("searchterm", SearchTerm);
            writer.WriteAttributeEnum("levelfilter", LevelFilter);
            writer.WriteAttributeBool("colorbylevel", ColorByLevel);
            writer.WriteAttributeInt("visibleentryindex", (int) VisibleLogLine);
            writer.WriteAttributeGuid("id", Id);
            writer.WriteAttributeGuid("parentid", ParentId);
            writer.WriteAttributeDateTime("lastviewed", LastViewed);
            writer.WriteAttributeDouble("horizontaloffset", HorizontalOffset);

            writer.WriteStartElement("activatedquickfilters");
            foreach (Guid guid in ActivatedQuickFilters)
            {
                writer.WriteStartElement("quickfilter");
                writer.WriteAttributeGuid("id", guid);
                writer.WriteEndElement();
            }
            writer.WriteEndElement();
        }
Exemplo n.º 6
0
 public override void WriteXml(XmlWriter writer)
 {
     base.WriteXml(writer);
     writer.WriteAttributeDouble("DecimalsToShow", (double)DecimalsToShow);
 }
Exemplo n.º 7
0
 public override void WriteXml(XmlWriter writer)
 {
     base.WriteXml(writer);
     writer.WriteAttributeDouble("OffsetX", Offset.X);
     writer.WriteAttributeDouble("OffsetY", Offset.Y);
 }