示例#1
0
 public override void WriteXml(System.Xml.XmlWriter writer)
 {
     base.WriteXml(writer);
     writer.WriteElementString("SwitchType", SwitchType.ToString());
     writer.WriteElementString("Orientation", Orientation.ToString());
     writer.WriteElementString("ClickType", ClickType.ToString());
     writer.WriteStartElement("GuardUp");
     writer.WriteElementString("PositionOneImage", PositionOneGuardUpImage);
     writer.WriteElementString("PositionTwoImage", PositionTwoGuardUpImage);
     writer.WriteEndElement();
     writer.WriteStartElement("GuardDown");
     writer.WriteElementString("PositionOneImage", PositionOneGuardDownImage);
     writer.WriteElementString("PositionTwoImage", PositionTwoGuardDownImage);
     writer.WriteEndElement();
     writer.WriteElementString("DefaultPosition", DefaultPosition.ToString());
     writer.WriteElementString("DefaultGuardPosition", DefaultGuardPosition.ToString());
 }
示例#2
0
 public override void WriteXml(System.Xml.XmlWriter writer)
 {
     base.WriteXml(writer);
     writer.WriteElementString("SwitchType", SwitchType.ToString());
     writer.WriteElementString("Orientation", Orientation.ToString());
     writer.WriteElementString("ClickType", ClickType.ToString());
     writer.WriteStartElement("GuardUp");
     writer.WriteElementString("PositionOneImage", PositionOneGuardUpImage);
     writer.WriteElementString("PositionTwoImage", PositionTwoGuardDownImage);// writing this value just for compatibility with old profiles
     writer.WriteEndElement();
     writer.WriteStartElement("GuardDown");
     writer.WriteElementString("PositionOneImage", PositionOneGuardUpImage);// writing this value just for compatibility with old profiles
     writer.WriteElementString("PositionTwoImage", PositionTwoGuardDownImage);
     writer.WriteEndElement();
     writer.WriteElementString("DefaultPosition", "Two"); // writing this value just for compatibility with old profiles
     writer.WriteElementString("DefaultGuardPosition", DefaultGuardPosition.ToString());
 }