コード例 #1
0
        public static void SaveSettings(Settings settings)
        {
            EnsureDataDirectoryExists();

            string settingsXML = XmlModel.XmlSerializeToString(settings);

            File.WriteAllText(SettingsFile, settingsXML);
        }
コード例 #2
0
        public static void CreateModListFile()
        {
            List <Mod> NewModList = new List <Mod> {
                new Mod("Melvor-ETA", "Displays estimated times for skills", "GMiclotte", "https://github.com/gmiclotte/Melvor-ETA", Mod.ModCategories.Utility, "0.18.2", "time-remaining.js"),
                new Mod("XP/h", "Displays XP/h for farming and combat", "Visua#9999", "https://greasyfork.org/scripts/409902-melvor-idle-xp-h/code/Melvor%20Idle%20-%20XPh.user.js", Mod.ModCategories.Utility, "0.18.2", "Melvor%20Idle%20-%20XPh.user.js"),
                new Mod("Combat Simulator Reloaded", "Simulates combat", "GMiclotte", "https://github.com/visua0/Melvor-Idle-Combat-Simulator-Reloaded", Mod.ModCategories.Utility, "0.18.2", "Extension\\Sources\\contentScript.js", new List <string> {
                    @"$(document.head).append(`<link rel=""stylesheet"" href=""${chrome.runtime.getURL('styles/mainStyle.css')}\"">`)"
                }),
            };

            string modListXML = XmlModel.XmlSerializeToString(NewModList);

            File.WriteAllText(@".\ModList.xml", modListXML);
        }