private bool IsNewerThanCurrent(Release release) { if (release == null) return false; return new SemanticVersion(release.version) > CurrentVersion; }
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); } } }); }