mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed a small invisible issue: the context menu is show 2x when clicking the NotifyIcon. This causes some code to be run 2x, decreasing the context-menu performance.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2193 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
afbe046d3e
commit
703ecbf143
2 changed files with 7 additions and 5 deletions
|
@ -1083,10 +1083,12 @@ namespace Greenshot {
|
|||
LOG.Error(EnvironmentInfo.ExceptionToString(exceptionToLog));
|
||||
new BugReportForm(exceptionText).ShowDialog();
|
||||
}
|
||||
|
||||
private void NotifyIconClick(object sender, EventArgs eventArgs) {
|
||||
MethodInfo oMethodInfo = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
oMethodInfo.Invoke(notifyIcon, null);
|
||||
|
||||
private void NotifyIconClick(object sender, MouseEventArgs e) {
|
||||
if (e.Button == MouseButtons.Left) {
|
||||
MethodInfo oMethodInfo = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
oMethodInfo.Invoke(notifyIcon, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue