mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-25 18:40:16 -05:00
WPF NotifyIcon
-------------- ADD Completed events. FIX Suppressing second left mouse click event in case of a double click. CHG General cleanup. git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@53 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
@@ -24,6 +24,14 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
/// </summary>
|
||||
public NotifyIconVersion Version { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Used to track whether a mouse-up event is just
|
||||
/// the aftermath of a double-click and therefore needs
|
||||
/// to be suppressed.
|
||||
/// </summary>
|
||||
private bool isDoubleClick;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -47,7 +55,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
public event Action<bool> BallonToolTipChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Fired if the taskbar was created. Requires the taskbar
|
||||
/// Fired if the taskbar was created or restarted. Requires the taskbar
|
||||
/// icon to be reset.
|
||||
/// </summary>
|
||||
public event Action TaskbarCreated;
|
||||
@@ -119,11 +127,16 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
|
||||
case 0x202:
|
||||
Debug.WriteLine("left up");
|
||||
MouseEventReceived(MouseEvent.IconLeftMouseUp);
|
||||
if (!isDoubleClick)
|
||||
{
|
||||
MouseEventReceived(MouseEvent.IconLeftMouseUp);
|
||||
}
|
||||
isDoubleClick = false;
|
||||
break;
|
||||
|
||||
case 0x203:
|
||||
Debug.WriteLine("left click 2");
|
||||
isDoubleClick = true;
|
||||
MouseEventReceived(MouseEvent.IconDoubleClick);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user