コード例 #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);
 }
コード例 #2
0
 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();
        }
コード例 #4
0
 protected string GetAppend()
 {
     return(!Append ? $"append=\"{Append.ToString().ToLower()}\"" : string.Empty);
 }