mirror of
https://github.com/greenshot/greenshot
synced 2025-07-14 09: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
2
Greenshot/Forms/MainForm.Designer.cs
generated
2
Greenshot/Forms/MainForm.Designer.cs
generated
|
@ -244,7 +244,7 @@ namespace Greenshot {
|
|||
//
|
||||
this.notifyIcon.ContextMenuStrip = this.contextMenu;
|
||||
this.notifyIcon.Text = "Greenshot";
|
||||
this.notifyIcon.Click += new System.EventHandler(this.NotifyIconClick);
|
||||
this.notifyIcon.MouseUp += new System.Windows.Forms.MouseEventHandler(this.NotifyIconClick);
|
||||
//
|
||||
// backgroundWorkerTimer
|
||||
//
|
||||
|
|
|
@ -1084,10 +1084,12 @@ namespace Greenshot {
|
|||
new BugReportForm(exceptionText).ShowDialog();
|
||||
}
|
||||
|
||||
private void NotifyIconClick(object sender, EventArgs eventArgs) {
|
||||
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>
|
||||
/// The Contextmenu_OpenRecent currently opens the last know save location
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue