diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.cs index ebf85d3c0..9ca25f91d 100644 --- a/GreenshotImgurPlugin/Forms/ImgurHistory.cs +++ b/GreenshotImgurPlugin/Forms/ImgurHistory.cs @@ -120,13 +120,14 @@ namespace GreenshotImgurPlugin { if (result == DialogResult.Yes) { // Should fix Bug #3378699 pictureBox1.Image = pictureBox1.ErrorImage; - BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("imgur", LangKey.communication_wait)); try { - ImgurUtils.DeleteImgurImage(imgurInfo); + new PleaseWaitForm().ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("imgur", LangKey.communication_wait), Language.GetString("CANCEL"), + delegate() { + ImgurUtils.DeleteImgurImage(imgurInfo); + } + ); } catch (Exception ex) { LOG.Warn("Problem communicating with Imgur: ", ex); - } finally { - backgroundForm.CloseDialog(); } imgurInfo.Dispose(); diff --git a/GreenshotImgurPlugin/ImgurConfiguration.cs b/GreenshotImgurPlugin/ImgurConfiguration.cs index e033917d9..4873f18f3 100644 --- a/GreenshotImgurPlugin/ImgurConfiguration.cs +++ b/GreenshotImgurPlugin/ImgurConfiguration.cs @@ -67,14 +67,13 @@ namespace GreenshotImgurPlugin { /// /// bool true if OK was pressed, false if cancel public bool ShowConfigDialog() { - SettingsForm settingsForm; + SettingsForm settingsForm = null; - BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("Imgur", LangKey.communication_wait)); - try { - settingsForm = new SettingsForm(this); - } finally { - backgroundForm.CloseDialog(); - } + new PleaseWaitForm().ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("imgur", LangKey.communication_wait), Language.GetString("CANCEL"), + delegate() { + settingsForm = new SettingsForm(this); + } + ); DialogResult result = settingsForm.ShowDialog(); if (result == DialogResult.OK) { return true;