/// <summary> /// Worker has finished. /// </summary> protected virtual void OnDone() { try { Done.Fire(this); } catch (Exception ex) { ErrorLog.DumpError(ex); } }
/// <summary> /// Installation of image is complete (or failed) /// </summary> private void ProcessInstallImage(Task downloadTask, SdkSystemImage image, string path) { if (downloadTask.Exception != null) { SuspendLayout(); progress.Visible = false; lbProgress.Visible = false; ResumeLayout(true); UpdateControlState(); // Show error var msg = string.Format("Failed to install system image because {0}", downloadTask.Exception.Message); MessageBoxEx.Show(msg, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { // We're done Done.Fire(this); } }