예제 #1
0
        private PatchFile ReadPatchFile(XElement item)
        {
            PatchFile result = new PatchFile
            {
                Filename       = XElementExtender.ReadName(item),
                DownloadUri    = XElementExtender.ReadUri(item),
                LocalDirectory = XElementExtender.ReadPath(item),
                Hash           = XElementExtender.ReadHash(item)
            };

            OutputConsole.PrintVerbose(result, 5);
            return(result);
        }
예제 #2
0
        public FileInfos Read(XDocument document)
        {
            XElement launcherProfilesJson = document.XPathSelectElement("root/launcher/launcherProfilesJson");
            XElement optionsTxt           = document.XPathSelectElement("root/launcher/optionsTxt");
            XElement minecraftExecutable  = document.XPathSelectElement("root/launcher/minecraftExecutable");

            FileInfos result = new FileInfos()
            {
                DefaultLauncherProfilesFile  = XElementExtender.ReadUri(launcherProfilesJson),
                LauncherProfilesFilename     = XElementExtender.ReadPath(launcherProfilesJson),
                DefaultOptionsFile           = XElementExtender.ReadUri(optionsTxt),
                OptionsFilename              = XElementExtender.ReadRelativePath(optionsTxt),
                DefaultMinecraftLauncherFile = XElementExtender.ReadUri(minecraftExecutable),
                MinecraftLauncherFilename    = XElementExtender.ReadPath(minecraftExecutable),
                MinecraftLauncherHash        = XElementExtender.ReadHash(minecraftExecutable)
            };

            OutputConsole.PrintVerbose(result, 1);
            return(result);
        }