mirror of
https://github.com/greenshot/greenshot
synced 2025-07-31 12:10:15 -07:00
Small event-handler code fix.
This commit is contained in:
parent
5a7a1dfab9
commit
c7aa3ebaf1
2 changed files with 7 additions and 5 deletions
|
@ -425,14 +425,17 @@ namespace Greenshot {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BalloonTipClicked(object sender, EventArgs e) {
|
private void BalloonTipClicked(object sender, EventArgs e) {
|
||||||
BalloonTipClosed(sender, e);
|
try {
|
||||||
ShowSetting();
|
ShowSetting();
|
||||||
|
} finally {
|
||||||
|
BalloonTipClosed(sender, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BalloonTipClosed(object sender, EventArgs e) {
|
private void BalloonTipClosed(object sender, EventArgs e) {
|
||||||
notifyIcon.BalloonTipClicked -= BalloonTipClicked;
|
notifyIcon.BalloonTipClicked -= BalloonTipClicked;
|
||||||
notifyIcon.BalloonTipClosed -= BalloonTipClosed;
|
notifyIcon.BalloonTipClosed -= BalloonTipClosed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void HandleDataTransport(CopyDataTransport dataTransport) {
|
private void HandleDataTransport(CopyDataTransport dataTransport) {
|
||||||
foreach(KeyValuePair<CommandEnum, string> command in dataTransport.Commands) {
|
foreach(KeyValuePair<CommandEnum, string> command in dataTransport.Commands) {
|
||||||
|
|
|
@ -105,8 +105,7 @@ namespace Greenshot.Experimental {
|
||||||
} catch (Exception) {
|
} catch (Exception) {
|
||||||
MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, downloadLink), Language.GetString(LangKey.error));
|
MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, downloadLink), Language.GetString(LangKey.error));
|
||||||
} finally {
|
} finally {
|
||||||
MainForm.Instance.NotifyIcon.BalloonTipClicked -= HandleBalloonTipClick;
|
CleanupBalloonTipClick(sender, e);
|
||||||
MainForm.Instance.NotifyIcon.BalloonTipClosed -= CleanupBalloonTipClick;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue