示例#1
0
 protected virtual void WriteToXml(XmlTextWriter xmlWriter)
 {
     xmlWriter.WriteAttributeString("id", ID);
     xmlWriter.WriteAttributeString("description", Description);
     xmlWriter.WriteAttributeString("align", Align.ToString());
     xmlWriter.WriteAttributeString("trim", Trim.ToString());
     xmlWriter.WriteAttributeString("append", Append.ToString());
     xmlWriter.WriteAttributeString("appendString", AppendString);
 }
 public void SaveToXml(XmlTextWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("ledDisplays");
     xmlWriter.WriteAttributeString("id", ID);
     xmlWriter.WriteAttributeString("description", Description);
     xmlWriter.WriteAttributeString("align", Align.ToString());
     xmlWriter.WriteAttributeString("trim", Trim.ToString());
     xmlWriter.WriteAttributeString("append", Append.ToString());
     xmlWriter.WriteAttributeString("appendString", AppendString);
     foreach (LEDDisplayInGroup led in LEDDisplaysInGroup)
     {
         xmlWriter.WriteStartElement("ledDisplay");
         xmlWriter.WriteAttributeString("ledDisplay", led.LEDDisplay.ID);
         xmlWriter.WriteAttributeString("order", led.Order.ToString());
         xmlWriter.WriteEndElement();
     }
     xmlWriter.WriteEndElement();
 }
示例#3
0
        public override void Save(XmlTextWriter xml)
        {
            xml.WriteStartElement("displaySet");
            xml.WriteAttributeString("id", ID);
            xml.WriteAttributeString("description", Description);
            xml.WriteAttributeString("align", Align.ToString());
            xml.WriteAttributeString("trim", Trim.ToString());
            xml.WriteAttributeString("append", Append.ToString());
            xml.WriteAttributeString("appendString", AppendString);
            Array.Sort(Displays);
            for (int i = 0; i < Displays.Length; i++)
            {
                Display d = Displays[i];
                d.Index = i;
                xml.WriteStartElement("display");
                xml.WriteAttributeString("id", d.LED7Display.ID);
                xml.WriteAttributeString("index", d.Index.ToString());
                xml.WriteEndElement();
            }

            xml.WriteEndElement();
        }