示例#1
0
        /// <summary>
        /// Loads the old launchpad manifest from disk.
        /// </summary>
        private void LoadOldLaunchpadManifest()
        {
            try
            {
                lock (OldLaunchpadManifestLock)
                {
                    if (File.Exists(GetOldGameManifestPath()))
                    {
                        oldLaunchpadManifest.Clear();

                        string[] rawOldLaunchpadManifest = File.ReadAllLines(GetOldGameManifestPath());
                        foreach (string rawEntry in rawOldLaunchpadManifest)
                        {
                            ManifestEntry newEntry;
                            if (ManifestEntry.TryParse(rawEntry, out newEntry))
                            {
                                oldLaunchpadManifest.Add(newEntry);
                            }
                        }
                    }
                }
            }
            catch (IOException ioex)
            {
                Log.Warn("Could not load old launcher manifest (IOException): " + ioex.Message);
            }
        }
示例#2
0
        /// <summary>
        /// Loads the old launchpad manifest from disk.
        /// </summary>
        private void LoadOldLaunchpadManifest()
        {
            try
            {
                lock (OldLaunchpadManifestLock)
                {
                    if (File.Exists(GetOldGameManifestPath()))
                    {
                        oldLaunchpadManifest.Clear();

                        string[] rawOldLaunchpadManifest = File.ReadAllLines(GetOldGameManifestPath());
                        foreach (string rawEntry in rawOldLaunchpadManifest)
                        {
                            ManifestEntry newEntry = new ManifestEntry();
                            if (ManifestEntry.TryParse(rawEntry, out newEntry))
                            {
                                oldLaunchpadManifest.Add(newEntry);
                            }
                        }
                    }
                }
            }
            catch (IOException ioex)
            {
                Console.WriteLine("IOException in LoadOldLaunchpadManifest(): " + ioex.Message);
            }
        }