Ejemplo n.º 1
0
 public void Save(XmlTextWriter xml)
 {
     xml.WriteStartElement("input");
     xml.WriteAttributeString("deviceId", DeviceId);
     xml.WriteAttributeString("index", Index.ToString());
     xml.WriteAttributeString("id", ID);
     xml.WriteAttributeString("description", Description);
     xml.WriteAttributeString("repeat", Repeat.ToString());
     xml.WriteAttributeString("repeatAfter", RepeatAfter.ToString());
     xml.WriteAttributeString("repeatInterval", RepeatInterval.ToString());
     xml.WriteEndElement();
 }
Ejemplo n.º 2
0
 public override void WriteToXml(XmlTextWriter xml)
 {
     xml.WriteStartElement("button");
     xml.WriteAttributeString("index", Index.ToString());
     xml.WriteAttributeString("alias", InternalID);
     xml.WriteAttributeString("description", Description);
     xml.WriteAttributeString("type", SwitchType.HatSwitch.ToString());
     xml.WriteAttributeString("repeat", true.ToString());
     xml.WriteAttributeString("repeatAfter", RepeatAfter.ToString());
     xml.WriteAttributeString("repeatInterval", RepeatInterval.ToString());
     xml.WriteEndElement();
 }
 public void Write(XmlTextWriter xml)
 {
     xml.WriteStartElement("keys");
     xml.WriteAttributeString("id", ID);
     xml.WriteAttributeString("description", Description);
     xml.WriteAttributeString("repeat", Repeat.ToString());
     xml.WriteAttributeString("repeatAfter", RepeatAfter.ToString());
     xml.WriteAttributeString("repeatInterval", RepeatInterval.ToString());
     for (int i = 0; i < Keys.Length; i++)
     {
         xml.WriteStartElement("key");
         xml.WriteAttributeString("value", Keys[i].ToString());
         xml.WriteEndElement();
     }
     xml.WriteEndElement();
 }