示例#1
0
        public AboutForm()
        {
            InitializeComponent();
            Icon = ShareXResources.Icon;
            Text = Program.FullTitle;
            lblProductName.Text = Program.FullTitle;

            GitHubUpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "ShareX", Program.AssemblyVersion);
            updateChecker.Proxy = Uploader.ProxyInfo.GetWebProxy();

            //uclUpdate.CheckUpdate(updateChecker);
        }
示例#2
0
        public void CheckUpdate(GitHubUpdateChecker updateChecker)
        {
            this.updateChecker = updateChecker;

            if (!isBusy)
            {
                isBusy = true;

                lblStatus.Visible = false;
                llblUpdateAvailable.Visible = false;

                pbLoading.Visible = true;
                lblCheckingUpdates.Visible = true;

                new Thread(CheckingUpdate).Start();
            }
        }
示例#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
        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;
        }
示例#5
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;
        }