Пример #1
0
        public bool checkForUpdate(string currentVersion)
        {
            string response = GetRequest();

            if (response == null)
            {
                return(false);
            }

            GithubApiResponds apiResponds = JsonConvert.DeserializeObject <GithubApiResponds>(response);

            latestVersion = apiResponds.tag_name;
            downloadUri   = apiResponds.assets[0].browser_download_url;

            return(Version.IsVersionOlder(currentVersion, apiResponds.tag_name));
        }
Пример #2
0
        public bool checkForUpdate(string currentVersion)
        {
            string response = GetRequest();

            if (response == null)
            {
                return(false);
            }

            GithubApiResponds apiResponds = JsonConvert.DeserializeObject <GithubApiResponds>(response);

            latestVersion = apiResponds.tag_name;
            downloadUri   = apiResponds.assets[0].browser_download_url;

            if (currentVersion.ToLower() != apiResponds.tag_name.ToLower() && !(currentVersion.ToLower().Contains("test") || currentVersion.ToLower().Contains("beta")))
            {
                return(true);
            }

            return(false);
        }