Пример #1
0
        internal bool PreloadList()
        {
            string listPath = Path.Combine(Path.GetTempPath(), "Vibrance Player\\Patchnotes\\patch.txt");

            try
            {
                try
                {
                    GetFileFromHTTP("Patchnotes\\_Patches.txt", listPath);
                }
                catch
                {
                    if (!File.Exists(listPath))
                    {
                        return(false);
                    }
                }

                player.Logger.WriteLogVerbose(this, "Queueing patches...", listPath);
                foreach (string patch in File.ReadAllLines(listPath))
                {
                    PatchList.Enqueue(patch);
                }
                player.Logger.WriteLogVerbose(this, "Done: Queued patches: {0}", PatchList.Count);
                return(true);
            }
            catch
            {
                return(false);
            }
        }