From b9dc9c4a1b12bb1e4271bb3748224e6932558938 Mon Sep 17 00:00:00 2001 From: Philipp Sumi Date: Tue, 6 Oct 2009 12:37:33 +0000 Subject: [PATCH] WPF NotifyIcon -------------- ADD Added cleanup file for deployment. CHG Improved comments to context menu placement - could not remember why I did this in the first place. git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@124 9f600761-6f11-4665-b6dc-0185e9171623 --- Source/Cleanup_Solution_For_Deployment.bat | 20 ++++++++++++++++++++ Source/NotifyIconWpf/TaskbarIcon.cs | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Source/Cleanup_Solution_For_Deployment.bat diff --git a/Source/Cleanup_Solution_For_Deployment.bat b/Source/Cleanup_Solution_For_Deployment.bat new file mode 100644 index 0000000..1f49792 --- /dev/null +++ b/Source/Cleanup_Solution_For_Deployment.bat @@ -0,0 +1,20 @@ +del /s /ah /f *.suo +del /s /f *.user +del /s /f *.cache +del /s /f *.scc +del /s /f *.vssscc +del /s /f *.vspscc +del /s /f *.keep +del /s /ah /f vssver2.scc + +rd /s /q bin obj ClientBin _Resharper.* _Upgrade* + +del dirs.txt +dir /s /b /ad bin > dirs.txt +dir /s /b /ad obj >> dirs.txt +dir /s /b /ad ClientBin >> dirs.txt +dir /s /b /ad _Resharper.* >> dirs.txt +dir /s /b /ad _Upgrade* >> dirs.txt + +for /f "delims=;" %%i in (dirs.txt) DO rd /s /q "%%i" +del dirs.txt diff --git a/Source/NotifyIconWpf/TaskbarIcon.cs b/Source/NotifyIconWpf/TaskbarIcon.cs index 787bb1e..78b5b8b 100644 --- a/Source/NotifyIconWpf/TaskbarIcon.cs +++ b/Source/NotifyIconWpf/TaskbarIcon.cs @@ -681,7 +681,9 @@ namespace Hardcodet.Wpf.TaskbarNotification if (ContextMenu != null) { - //use absolute position + //use absolute positioning. We need to set the coordinates, or a delayed opening + //(e.g. when left-clicked) opens the context menu at the wrong place if the mouse + //is moved! ContextMenu.Placement = PlacementMode.AbsolutePoint; ContextMenu.HorizontalOffset = cursorPosition.X; ContextMenu.VerticalOffset = cursorPosition.Y;