Ejemplo n.º 1
0
        private bool IsNewerThanCurrent(Release release)
        {
            if (release == null) return false;

            return new SemanticVersion(release.version) > CurrentVersion;
        }
Ejemplo n.º 2
0
 public void CheckUpdate()
 {
     ThreadPool.QueueUserWorkItem(o =>
     {
         string json = HttpRequest.Get(VersionCheckURL, HttpProxy.Instance);
         if (!string.IsNullOrEmpty(json))
         {
             try
             {
                 NewRelease = JsonConvert.DeserializeObject<Release>(json);
                 if (IsNewerThanCurrent(NewRelease) && !UserSettingStorage.Instance.DontPromptUpdateMsg)
                 {
                     StartUpdate();
                 }
             }
             catch (System.Exception e)
             {
                 Log.Error(e);
             }
         }
     });
 }