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) { if (result == DialogResult.Yes) {
// Should fix Bug #3378699 // Should fix Bug #3378699
pictureBox1.Image = pictureBox1.ErrorImage; pictureBox1.Image = pictureBox1.ErrorImage;
BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(ImgurPlugin.Attributes.Name, Language.GetString("imgur", LangKey.communication_wait));
try { 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) { } catch (Exception ex) {
LOG.Warn("Problem communicating with Imgur: ", ex); LOG.Warn("Problem communicating with Imgur: ", ex);
} finally {
backgroundForm.CloseDialog();
} }
imgurInfo.Dispose(); imgurInfo.Dispose();

View file

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