/// <summary>\r
/// Get the build information from the required appcasts. Run before accessing the public vars.\r
/// </summary>\r
- public void getInfo(string input)\r
+ public void GetInfo(string input)\r
{\r
try\r
{\r
Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");\r
Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""(([svn]*)([0-9.\s]*))\""");\r
\r
- build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
- version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
- downloadFile = nodeItem["windows"].InnerText;\r
- descriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
- } catch( Exception)\r
+ Build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
+ Version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+ DownloadFile = nodeItem["windows"].InnerText;\r
+ DescriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
+ } \r
+ catch( Exception)\r
{\r
- // Ignore Error.\r
+ return;\r
}\r
}\r
\r
XmlDocument rssDoc = new XmlDocument();\r
rssDoc.Load(rssReader);\r
\r
- for (int i = 0; i < rssDoc.ChildNodes.Count; i++)\r
+ foreach (XmlNode t in rssDoc.ChildNodes)\r
{\r
- if (rssDoc.ChildNodes[i].Name == "rss")\r
- nodeRss = rssDoc.ChildNodes[i];\r
+ if (t.Name == "rss")\r
+ nodeRss = t;\r
}\r
\r
if (nodeRss != null)\r
- for (int i = 0; i < nodeRss.ChildNodes.Count; i++)\r
+ foreach (XmlNode t in nodeRss.ChildNodes)\r
{\r
- if (nodeRss.ChildNodes[i].Name == "channel")\r
- nodeChannel = nodeRss.ChildNodes[i];\r
+ if (t.Name == "channel")\r
+ nodeChannel = t;\r
}\r
\r
if (nodeChannel != null)\r
- for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)\r
+ foreach (XmlNode t in nodeChannel.ChildNodes)\r
{\r
- if (nodeChannel.ChildNodes[i].Name == "item")\r
- nodeItem = nodeChannel.ChildNodes[i];\r
+ if (t.Name == "item")\r
+ nodeItem = t;\r
}\r
\r
return nodeItem;\r
/// <summary>\r
/// Get Information about an update to HandBrake\r
/// </summary>\r
- public Uri descriptionUrl { get; set; }\r
+ public Uri DescriptionUrl { get; set; }\r
\r
/// <summary>\r
/// Get HandBrake's version from the appcast.xml file.\r
/// </summary>\r
- public string version { get; set; }\r
+ public string Version { get; set; }\r
\r
/// <summary>\r
/// Get HandBrake's Build from the appcast.xml file.\r
/// </summary>\r
- public string build { get; set; }\r
+ public string Build { get; set; }\r
\r
/// <summary>\r
/// Get's the URL for update file.\r
/// </summary>\r
- public string downloadFile { get; set; }\r
+ public string DownloadFile { get; set; }\r
}\r
}
\ No newline at end of file