예제 #1
0
        public static UpdateChecker CheckUpdate()
        {
            UpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "ShareX");
            updateChecker.CurrentVersion = Program.AssemblyVersion;
            updateChecker.Proxy = Uploader.ProxyInfo.GetWebProxy();
            updateChecker.CheckUpdate();

            // Backup if GitHub API fails
            if (updateChecker.UpdateInfo == null || updateChecker.UpdateInfo.Status == UpdateStatus.UpdateCheckFailed)
            {
                updateChecker = new XMLUpdateChecker("https://raw.github.com/ShareX/ShareX/master/Update.xml", "ShareX");
                updateChecker.CurrentVersion = Program.AssemblyVersion;
                updateChecker.Proxy = Uploader.ProxyInfo.GetWebProxy();
                updateChecker.CheckUpdate();
            }

            return updateChecker;
        }
예제 #2
0
        public static UpdateChecker CheckUpdate()
        {
            UpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "ShareX");
            updateChecker.IsBeta = Program.IsBeta;
            updateChecker.Proxy = ProxyInfo.Current.GetWebProxy();
            updateChecker.CheckUpdate();

            // Fallback if GitHub API fails
            if (updateChecker.Status == UpdateStatus.None || updateChecker.Status == UpdateStatus.UpdateCheckFailed)
            {
                updateChecker = new XMLUpdateChecker("http://getsharex.com/Update.xml", "ShareX");
                updateChecker.IsBeta = Program.IsBeta;
                updateChecker.Proxy = ProxyInfo.Current.GetWebProxy();
                updateChecker.CheckUpdate();
            }

            return updateChecker;
        }
예제 #3
0
        public static UpdateChecker CheckUpdate()
        {
            UpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "ShareX");
            updateChecker.CurrentVersion = Program.AssemblyVersion;
            updateChecker.Proxy = ProxyInfo.Current.GetWebProxy();
            updateChecker.CheckUpdate();

            // Fallback if GitHub API fails
            if (updateChecker.UpdateInfo == null || updateChecker.UpdateInfo.Status == UpdateStatus.UpdateCheckFailed)
            {
                updateChecker = new XMLUpdateChecker("http://getsharex.com/Update.xml", "ShareX");
                updateChecker.CurrentVersion = Program.AssemblyVersion;
                updateChecker.Proxy = ProxyInfo.Current.GetWebProxy();
                updateChecker.CheckUpdate();
            }

            return updateChecker;
        }