public static bool GetLatestVersionInfo(RSSFile rssFile, string gameTitle, out string o_gameVersion, out string o_gameDescription, out string o_versionDownloadURL, out string o_versionDescription, out bool o_versionIsNewest) { // Find a matching title foreach (var channel in rssFile.Channels) { if (channel.Title == gameTitle) { // Find a matching version for (int i = 0; i < channel.Entries.Count; ++i) { var entry = channel.Entries[i]; if (entry.Title != null) { o_gameVersion = entry.Title; o_gameDescription = (channel.Description != null) ? channel.Description : channel.Title; o_versionDownloadURL = entry.Link; o_versionDescription = entry.Description; o_versionIsNewest = (i == 0); return(true); } } } } o_gameVersion = null; o_gameDescription = null; o_versionDownloadURL = null; o_versionDescription = null; o_versionIsNewest = false; return(false); }
private RSSFile DownloadRSSFile(string updateURL) { // Download RSS file Stage = GameUpdateStage.CheckingForUpdate; var rssFile = RSSFile.Download(m_optionalUpdateURL, delegate(int percentage) { StageProgress = (double)percentage / 100.0; }, this); if (rssFile == null) { return(null); } if (Cancelled) { return(null); } StageProgress = 1.0; return(rssFile); }