using System.Xml.Serialization; namespace AM2RPortHelperLib; /// /// Class that handles how the mod settings are saved as XML. /// [Serializable] [XmlRoot("message")] public class ProfileXML { /// Indicates the Operating system the mod was made for. [XmlAttribute("OperatingSystem")] public string OperatingSystem { get; set; } /// Indicates the xml version the mod was made in. [XmlAttribute("XMLVersion")] public int XMLVersion { get; set; } /// Indicates the version of the mod. [XmlAttribute("Version")] public string Version { get; set; } /// Indicates the mod's name. [XmlAttribute("Name")] public string Name { get; set; } /// Indicates the mod's author. [XmlAttribute("Author")] public string Author { get; set; } /// Indicates whether or not the mod uses custom music. [XmlAttribute("UsesCustomMusic")] public bool UsesCustomMusic { get; set; } /// Indicates the save location of the mod. [XmlAttribute("SaveLocation")] public string SaveLocation { get; set; } /// Indicates whether or not the mod supports Android. [XmlAttribute("SupportsAndroid")] public bool SupportsAndroid { get; set; } /// Indicates whether or not the mod was compiled with YYC. [XmlAttribute("UsesYYC")] public bool UsesYYC { get; set; } /// Indicates if the mod is installable. This is only for archival community updates mods. [XmlAttribute("Installable")] public bool Installable { get; set; } /// Indicates any notes that the mod author deemed worthy to share about his mod. [XmlAttribute("ProfileNotes")] public string ProfileNotes { get; set; } /// This gets calculated at runtime, by the Launcher. Indicates where the install data for the mod is stored. [XmlIgnore] public string DataPath { get; set; } /// Creates a with a default set of attributes. public ProfileXML() { Installable = true; } /// /// Creates a with a custom set of attributes. /// /// The operating system the mod was made on. /// The xml version the mod was created with. /// The version of the mod. /// The mod name. /// The mod author. /// Whether or not the mod uses custom music. /// The save location of the mod. /// Whether or not the mod works for android. /// Whether or not the mod was made with YYC. /// Whether or not the mod is installable. /// The notes of the mod. public ProfileXML(string operatingSystem, int xmlVersion, string version, string name, string author, bool usesCustomMusic, string saveLocation, bool android, bool usesYYC, bool installable, string profileNotes) { OperatingSystem = operatingSystem; XMLVersion = xmlVersion; Version = version; Name = name; Author = author; UsesCustomMusic = usesCustomMusic; SaveLocation = saveLocation; SupportsAndroid = android; UsesYYC = usesYYC; Installable = installable; ProfileNotes = profileNotes; } }