示例#1
0
        public static UpdateChecker CheckUpdate()
        {
            UpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "ShareX");

            updateChecker.IsBeta = Program.IsBeta;
            updateChecker.Proxy  = HelpersOptions.CurrentProxy.GetWebProxy();
            updateChecker.CheckUpdate();

            // Fallback if GitHub API fails
            if (updateChecker.Status == UpdateStatus.None || updateChecker.Status == UpdateStatus.UpdateCheckFailed)
            {
                updateChecker        = new XMLUpdateChecker(Links.URL_UPDATE, "ShareX");
                updateChecker.IsBeta = Program.IsBeta;
                updateChecker.Proxy  = HelpersOptions.CurrentProxy.GetWebProxy();
                updateChecker.CheckUpdate();
            }

            return(updateChecker);
        }
示例#2
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);
        }
示例#3
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);
        }
示例#4
0
文件: AboutForm.cs 项目: radtek/iTSfv
        public static UpdateChecker CheckUpdate()
        {
            UpdateChecker updateChecker = new GitHubUpdateChecker("McoreD", "iTSfv");

            updateChecker.CurrentVersion = Program.AssemblyVersion;
            updateChecker.Proxy          = HelpersOptions.CurrentProxy.GetWebProxy();
            updateChecker.CheckUpdate();

            // Fallback if GitHub API fails
            if (updateChecker.Status == UpdateStatus.None || updateChecker.Status == UpdateStatus.UpdateCheckFailed)
            {
                updateChecker = new XMLUpdateChecker(Program.URL_UPDATE, "iTSfv");
                updateChecker.CurrentVersion = Program.AssemblyVersion;
                updateChecker.Proxy          = HelpersOptions.CurrentProxy.GetWebProxy();
                updateChecker.CheckUpdate();
            }

            return(updateChecker);
        }