public async Task CheckAndDownloadNewVersion(bool displayDialogue) {
     UpdateChecker updater = new UpdateChecker();
     VersionInfo info;
     info = await updater.CheckForNewVersion();
     if (info.isNew) {
         // Create update information to display.
         string updateResult = "Version " + info.version + " was found!\n\n";
         updateResult += info.updateInfo;
         GUIConfirm confirm = new GUIConfirm();
         confirm.infoLabel.Text = GlobalVariables.PROGRAM_TITLE + " Updater";
         confirm.textBox.Text = updateResult;
         confirm.infoLabel2.Text = "Do you wish to update?";
         confirm.ShowDialog(this);
         if (confirm.confirmed)
             await updater.DownloadFile(true);
     } else {
         if (displayDialogue)
             MessageBox.Show("The latest version is installed.");
     }
 }