More changes for the PleaseWait form

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1985 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-08-12 17:01:20 +00:00
commit caa5b0e0fe
2 changed files with 11 additions and 11 deletions

View file

@ -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 {
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();

View file

@ -67,14 +67,13 @@ namespace GreenshotImgurPlugin {
/// </summary>
/// <returns>bool true if OK was pressed, false if cancel</returns>
public bool ShowConfigDialog() {
SettingsForm settingsForm;
SettingsForm settingsForm = null;
BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("Imgur", LangKey.communication_wait));
try {
new PleaseWaitForm().ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("imgur", LangKey.communication_wait), Language.GetString("CANCEL"),
delegate() {
settingsForm = new SettingsForm(this);
} finally {
backgroundForm.CloseDialog();
}
);
DialogResult result = settingsForm.ShowDialog();
if (result == DialogResult.OK) {
return true;