/// <summary> /// Serializes the specified writer. /// </summary> /// <param name="writer">Writer.</param> public override void Serialize(XmlWriter writer) { writer.WriteStartElement("DefineButtonSoundTag"); writer.WriteElementString("ButtonId", buttonId.ToString()); writer.WriteElementString("ButtonSoundChar", buttonSoundChar.ToString()); if (buttonSoundChar != 0 && buttonSoundInfo != null) { buttonSoundInfo.Serialize(writer); } writer.WriteElementString("ButtonSoundChar1", buttonSoundChar1.ToString()); if (buttonSoundChar1 != 0 && buttonSoundInfo1 != null) { buttonSoundInfo1.Serialize(writer); } writer.WriteElementString("ButtonSoundChar2", buttonSoundChar2.ToString()); if (buttonSoundChar2 != 0 && buttonSoundInfo2 != null) { buttonSoundInfo2.Serialize(writer); } writer.WriteElementString("ButtonSoundChar3", buttonSoundChar3.ToString()); if (buttonSoundChar3 != 0 && buttonSoundInfo3 != null) { buttonSoundInfo3.Serialize(writer); } writer.WriteEndElement(); }