private void SetUpdateText()
        {
            if (RemindMeUpdater.GetGithubVersion() > new Version(IOVariables.RemindMeVersion))
            {
                //The user is not up-to-date.
                lblLatestVersion.Text += "\r\nYou are not running the latest version of RemindMe ( " + RemindMeUpdater.GetGithubVersion().ToString() + " )";
            }
            else
            {
                lblLatestVersion.Text += "\r\nYou are already running the latest version of RemindMe.";
            }

            pictureBox1.Location = new Point(16, 30);

            lblLatestVersion.Location = new Point(lblLatestVersion.Location.X, lblLatestVersion.Location.Y - 10);
            pictureBox1.Location      = new Point(pictureBox1.Location.X, pictureBox1.Location.Y - 10);
        }
Example #2
0
        private void DownloadMsi()
        {
            new Thread(() =>
            {
                try
                {
                    this.BeginInvoke((MethodInvoker)async delegate
                    {
                        try
                        {
                            BLIO.Log("New version on github! starting download...");
                            updater = new RemindMeUpdater();
                            updater.startDownload();

                            while (!updater.Completed)
                            {
                                await Task.Delay(500);
                            }

                            MessageFormManager.MakeMessagePopup("RemindMe has a new version available to update!\r\nClick the update button on RemindMe on the left panel!", 10);

                            btnNewUpdate.Visible = true;
                            BLIO.Log("Completed downloading the new .msi from github!");
                        }
                        catch
                        {
                            BLIO.Log("Downloading new version of RemindMe failed! :(");
                        }
                    });
                }
                catch (Exception ex)
                {
                    BLIO.Log("Failed downloading MSI. " + ex.ToString());
                }
            }).Start();
        }