Пример #1
0
 public static string FOTAInfoFetch(string model, string region, bool latest = true)
 {
     try
     {
         using (WebClient webClient = new WebClient())
         {
             string xml = webClient.DownloadString("http://fota-cloud-dn.ospserver.net/firmware/" + region + "/" + model + "/version.xml");
             return(!latest?Xml.GetXMLValue(xml, "firmware/version/upgrade/value", (string)null, (string)null).ToUpper() : Xml.GetXMLValue(xml, "firmware/version/latest", (string)null, (string)null).ToUpper());
         }
     }
     catch (Exception ex)
     {
         return(string.Empty);
     }
 }