BF2Statistics.MainForm.Updater_CheckCompleted C# (CSharp) Method

Updater_CheckCompleted() private method

Event fired when an update check has finished
private Updater_CheckCompleted ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void Updater_CheckCompleted(object sender, EventArgs e)
        {
            if (ProgramUpdater.UpdateAvailable)
            {
                // Update the status
                UpdateLabel.Text = "(Update Available!)";
                UpdateLabel.ForeColor = Color.Green;
                UpdateStatusPic.Hide();

                // Ask User
                DialogResult r = MessageBox.Show(
                    "An Update for this program is avaiable for download (" + ProgramUpdater.NewVersion + ")."
                    + Environment.NewLine.Repeat(1)
                    + "Would you like to download and install this update now?",
                    "Update Available",
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Information
                );

                // Apply update
                if (r == DialogResult.Yes)
                    ProgramUpdater.DownloadUpdateAsync();
            }
            else
            {
                UpdateStatusPic.Hide();
                UpdateLabel.Text = "(Up to Date)";
                UpdateLabel.ForeColor = Color.Black;
            }

            // Re-Enable button
            ChkUpdateBtn.Enabled = true;
        }
MainForm