+ /// <summary>\r
+ /// Handle the Update Check Finishing.\r
+ /// </summary>\r
+ /// <param name="result">\r
+ /// The result.\r
+ /// </param>\r
+ private void updateCheckDoneMenu(IAsyncResult result)\r
+ {\r
+ // Make sure it's running on the calling thread\r
+ if (InvokeRequired)\r
+ {\r
+ Invoke(new MethodInvoker(() => updateCheckDoneMenu(result)));\r
+ return;\r
+ }\r
+ UpdateCheckInformation info;\r
+ try\r
+ {\r
+ // Get the information about the new build, if any, and close the window\r
+ info = Main.EndCheckForUpdates(result);\r
+\r
+ if (info.NewVersionAvailable && info.BuildInformation != null)\r
+ {\r
+ frmUpdater updateWindow = new frmUpdater(info.BuildInformation);\r
+ updateWindow.ShowDialog();\r
+ }\r
+ else\r
+ MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK,\r
+ MessageBoxIcon.Information);\r
+ lbl_updateCheck.Visible = false;\r
+ return;\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ if ((bool)result.AsyncState)\r
+ MessageBox.Show(\r
+ "Unable to check for updates, Please try again later.\n\nDetailed Error Information:\n" + ex,\r
+ "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ }\r
+ }\r
+\r