From d98128481a0658d534621a9be2124f04d8a5d0c5 Mon Sep 17 00:00:00 2001 From: punker76 Date: Sat, 9 May 2020 22:45:35 +0200 Subject: [PATCH 01/14] try to make preview release --- azure-pipelines.yml | 3 ++- src/version.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1056dad..2c2e381 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,8 @@ trigger: batch: true branches: include: - - master + - develop + - release/* - feature/* exclude: - gh-pages diff --git a/src/version.json b/src/version.json index 2fa29c3..43f6007 100644 --- a/src/version.json +++ b/src/version.json @@ -1,8 +1,8 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "1.0.9", + "version": "1.0.9-preview", "publicReleaseRefSpec": [ - ".*/master$" + "^refs/heads/release/v\\d+\\.\\d+" ], "nugetPackageVersion": { "semVer": 2 From 6a5dd84015fa09c06046baf63db72b9513df4dd9 Mon Sep 17 00:00:00 2001 From: punker76 Date: Sat, 9 May 2020 23:00:25 +0200 Subject: [PATCH 02/14] Deploy NuGet on succesed --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2c2e381..1d9fadf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ stages: - task: NuGetCommand@2 displayName: 'Publish to wpf-notifyicon feed' - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + condition: succeeded() inputs: command: 'push' versioningScheme: byBuildNumber From 2601f9d5254c6a4de289b44355bfe5d094a8dc24 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Wed, 5 Aug 2020 13:47:07 +0200 Subject: [PATCH 03/14] Added strong naming and fixed a dependency (#34) * Added strong naming for the .NET Framework 4.x dlls as was discussed in #3. Strong naming doesn't help for security but it's sometimes needed as companies want to build strongly named assemblies themselves, and these can only use other strong named assembly. The general way to do this, is to sign the assembly with a public known snk file (Which is in the repository) so it's strongly named but without negative side effects. * Fixed a tricky issue with .resx files, concerns GenerateResourceUsePreserializedResources and dependencies. * Fixed the copyright years. * Fixed an issue with SystemInfo, somehow the DpiFactorX/DpiFactorY weren't initialized. * As net45 doesn't build with "dotnet build", we need to use msbuild instead. * Removing unneeded packages for net4x * msbuild needs nuget restore before the build to work * Make sure that PRs don't push the packages to the nuget feed (will fail anyway) --- azure-pipelines.yml | 23 ++++++---- src/Directory.Build.props | 14 +++++- src/NotifyIconWpf.snk | Bin 0 -> 596 bytes src/NotifyIconWpf/BalloonIcon.cs | 2 +- src/NotifyIconWpf/Interop/SystemInfo.cs | 40 +++++++++++++++--- .../Interop/WindowMessageSink.cs | 2 +- src/NotifyIconWpf/Interop/WindowsMessages.cs | 2 +- src/NotifyIconWpf/NotifyIconWpf.csproj | 9 ++-- src/NotifyIconWpf/NotifyIconWpf.snk | Bin 0 -> 596 bytes src/NotifyIconWpf/PopupActivationMode.cs | 2 +- src/NotifyIconWpf/TaskbarIcon.Declarations.cs | 2 +- src/NotifyIconWpf/TaskbarIcon.cs | 2 +- src/NotifyIconWpf/Util.cs | 6 +-- src/Sample Project/Sample Project.csproj | 5 --- .../Windowless Sample.csproj | 6 +-- src/WindowsFormsSample/Form1.cs | 12 +++--- .../WindowsFormsSample.csproj | 5 +-- src/global.json | 5 ++- 18 files changed, 89 insertions(+), 48 deletions(-) create mode 100644 src/NotifyIconWpf.snk create mode 100644 src/NotifyIconWpf/NotifyIconWpf.snk diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d9fadf..a0f0424 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,17 +32,24 @@ stages: versionSpec: '5.5.1' - task: UseDotNet@2 - displayName: 'Use .NET Core sdk 3.1.2' + displayName: 'Use .NET Core sdk 3.1.6' inputs: packageType: sdk - version: 3.1.201 + version: 3.1.302 - - task: DotNetCoreCLI@2 - displayName: Build + - task: NuGetCommand@2 + displayName: NuGet restore inputs: - command: build - projects: '$(solution)' - arguments: '--configuration $(buildConfiguration) /p:Platform="$(buildPlatform)"' + command: 'restore' + restoreSolution: '$(solution)' + feedsToUse: config + + - task: MSBuild@1 + displayName: Build and package + inputs: + solution: '$(solution)' + platform: $(buildPlatform) + configuration: $(buildConfiguration) - task: CopyFiles@2 displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' @@ -58,7 +65,7 @@ stages: - task: NuGetCommand@2 displayName: 'Publish to wpf-notifyicon feed' - condition: succeeded() + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) inputs: command: 'push' versioningScheme: byBuildNumber diff --git a/src/Directory.Build.props b/src/Directory.Build.props index cc136e1..849d6d3 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,6 +22,12 @@ Source code and extensive sample application available at http://www.hardcodet.n NotifyIcon WPF Tray Notify ToolTip Popup Balloon Toast + + true + + + false + true @@ -48,8 +54,14 @@ Source code and extensive sample application available at http://www.hardcodet.n true + + true + ..\NotifyIconWpf.snk + false + + - + all runtime; build; native; contentfiles; analyzers diff --git a/src/NotifyIconWpf.snk b/src/NotifyIconWpf.snk new file mode 100644 index 0000000000000000000000000000000000000000..30e2369ee29e013aa128ba7171a1d9e16ad81939 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096o@3TZSjh=Uq?{po48Lmza+f?uL&y z+5L)GeKlf5hXXFIZzZNX0Wi=yAL3a}_(dLnTFW(cRor_^LUySA{~}?(0+h;s9%RkX z22t#UbG%Kv2Ko9>{U|0%^(uu}^1C_FN0*7x^ON1#p^}ImNbj~2^A;1ioq!g)c#OQ) zVd(iZ5f|v*N$z;;p!E0RO=?>x1b(Xmj}HO26|wDEx!dIZ;X$E3x&!U=b+E7}TD3Jr zCUO(t9jlx=35e`BCZ~>Tw9Yb3TdjEj_0+%bQE(NSr@k2}VktYf`o6q>wt6hXGX5=R zmMAx#+Une$g|0VfVo{(7^ILN8V-d{fvc-v4f&E4m=J&`sqi=|PXbQ(lRb_jdI*QHh zo!ePHfw}{e+!}AtfF*qH>>!7C>jZf#o_#_sy2eLTfXx;4;3L?AVNCHLS*1?CQ*zJL zoApQgCg4GBP`W!dFjPhdMiT}ZM3nq%;0ttk~1p>C(S$VOKLODae&-B!kT1Es{ znYvqweznMjgZJc{OO;AQ383Y;-^DF(D1YX{2a1e@9}4k)bK{N;P!SHvcwvmSaPojG z`fOIc)W9;vPo9nS?T& public static class SystemInfo { - private static readonly System.Windows.Point DpiFactors; - static SystemInfo() + { + UpdateFactors(); + } + + internal static void UpdateFactors() { using (var source = new HwndSource(new HwndSourceParameters())) { if (source.CompositionTarget?.TransformToDevice != null) { - DpiFactors = new System.Windows.Point(source.CompositionTarget.TransformToDevice.M11, source.CompositionTarget.TransformToDevice.M22); + DpiFactorX = source.CompositionTarget.TransformToDevice.M11; + DpiFactorY = source.CompositionTarget.TransformToDevice.M22; return; } - DpiFactors = new System.Windows.Point(1, 1); } + + DpiFactorX = DpiFactorY = 1; } /// /// Returns the DPI X Factor /// - public static double DpiFactorX => DpiFactors.X; + public static double DpiFactorX { get; private set; } = 1; /// /// Returns the DPI Y Factor /// - public static double DpiFactorY => DpiFactors.Y; + public static double DpiFactorY { get; private set; } = 1; } } \ No newline at end of file diff --git a/src/NotifyIconWpf/Interop/WindowMessageSink.cs b/src/NotifyIconWpf/Interop/WindowMessageSink.cs index 19b5eac..97f0392 100644 --- a/src/NotifyIconWpf/Interop/WindowMessageSink.cs +++ b/src/NotifyIconWpf/Interop/WindowMessageSink.cs @@ -1,5 +1,5 @@ // hardcodet.net NotifyIcon for WPF -// Copyright (c) 2009 - 2013 Philipp Sumi +// Copyright (c) 2009 - 2020 Philipp Sumi // Contact and Information: http://www.hardcodet.net // // This library is free software; you can redistribute it and/or diff --git a/src/NotifyIconWpf/Interop/WindowsMessages.cs b/src/NotifyIconWpf/Interop/WindowsMessages.cs index 2d4b8ec..51ae1bf 100644 --- a/src/NotifyIconWpf/Interop/WindowsMessages.cs +++ b/src/NotifyIconWpf/Interop/WindowsMessages.cs @@ -1,5 +1,5 @@ // hardcodet.net NotifyIcon for WPF -// Copyright (c) 2009 - 2013 Philipp Sumi +// Copyright (c) 2009 - 2020 Philipp Sumi // Contact and Information: http://www.hardcodet.net // // This library is free software; you can redistribute it and/or diff --git a/src/NotifyIconWpf/NotifyIconWpf.csproj b/src/NotifyIconWpf/NotifyIconWpf.csproj index 454fc1b..1307fc6 100644 --- a/src/NotifyIconWpf/NotifyIconWpf.csproj +++ b/src/NotifyIconWpf/NotifyIconWpf.csproj @@ -4,11 +4,14 @@ Hardcodet.NotifyIcon.Wpf NotifyIcon for WPF NotifyIcon WPF - net45;net472;netcoreapp3.0;netcoreapp3.1 + net45;net472;netcoreapp3.1 + true + NotifyIconWpf.snk + false - - + + diff --git a/src/NotifyIconWpf/NotifyIconWpf.snk b/src/NotifyIconWpf/NotifyIconWpf.snk new file mode 100644 index 0000000000000000000000000000000000000000..ec0afc54b9ad54bba40d3cd865c82b33dceb8983 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096AQ8ul*AetzhVT`&gv5U73Hj-cx@#bXa za)ZyN3g228c@a2gk%@$U7hGSwPF1ZiiAQe3B$ZQ|?caB2#=uRaeWl|Uo>uNy)wnTJ zlVr{<{A)gy)i00jiZmc(ujn+8KaIi4QnNb-VG2B^cM+0}a|O2ZL-#$k%fiTA>Fn0; zzBC9yOm?x%eY&+gmX(40e}6?q#{FD59nM5IM_PegjE$5pZt?itJP2F_L+a6KZ-^5c1q>^V?v^1`2p}i!^VB#KS(ot|V~aEx%ZFKD-St z_R3toCxQmFOys{P7i+`*$0QmznE?jw^2O&K|J=!)1P^dYyz0+K!vsbX`mH5wUX%_s z4W_&51;cGt>>ol@uH=nUmgffl@2#jSWNTR855Q4ro$J86%PNlBh%XPLc%PGaf6X8Q zQBOAUrnao}Nd=+uN1UK4wDnCli~UB-?RgbgArt24=@y+n z(u-z<`)f@lL{$@HWZW~brtMrJf*WE2!a1>Y$6fbEj9Y^%M6G}s5+=-6E0j5J?lX9B zvdK3Pcc@?jr?ud@(CHBUY54^}N1Exi`aRFmTSQ)lnU^)ot>Ay`{GTSrU1b=pORpJ4 i;nPbwmk3-$On^u=tAgQcD&Samples Sample Project Sample Project - true - - - - diff --git a/src/Windowless Sample/Windowless Sample.csproj b/src/Windowless Sample/Windowless Sample.csproj index 928655b..8b973fe 100644 --- a/src/Windowless Sample/Windowless Sample.csproj +++ b/src/Windowless Sample/Windowless Sample.csproj @@ -1,18 +1,14 @@  WinExe - net45;net472;netcoreapp3.0;netcoreapp3.1 + net45;net472;netcoreapp3.1 Windowless_Sample Windowless Sample Windowless Sample - true - - - diff --git a/src/WindowsFormsSample/Form1.cs b/src/WindowsFormsSample/Form1.cs index 9e32170..1d30d71 100644 --- a/src/WindowsFormsSample/Form1.cs +++ b/src/WindowsFormsSample/Form1.cs @@ -19,12 +19,14 @@ namespace WindowsFormsSample protected override void OnLoad(EventArgs e) { base.OnLoad(e); - notifyIcon = new TaskbarIcon(); - notifyIcon.Icon = Resources.Led; - notifyIcon.ToolTipText = "Left-click to open popup"; - notifyIcon.Visibility = Visibility.Visible; + notifyIcon = new TaskbarIcon + { + Icon = Resources.Led, + ToolTipText = "Left-click to open popup", + Visibility = Visibility.Visible, + TrayPopup = new FancyPopup() + }; - notifyIcon.TrayPopup = new FancyPopup(); } protected override void OnClosed(EventArgs e) diff --git a/src/WindowsFormsSample/WindowsFormsSample.csproj b/src/WindowsFormsSample/WindowsFormsSample.csproj index 3cfb103..85bae38 100644 --- a/src/WindowsFormsSample/WindowsFormsSample.csproj +++ b/src/WindowsFormsSample/WindowsFormsSample.csproj @@ -5,14 +5,11 @@ WindowsFormsSample.Program WindowsFormsSample WindowsFormsSample - true + true - - - diff --git a/src/global.json b/src/global.json index 7bf4830..db989f5 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "3.1.200", - "rollForward": "latestPatch" + "version": "3.1.100", + "rollForward": "latestMajor", + "allowPrerelease": true } } \ No newline at end of file From 850f625f231fd655c7f18cdc3efd37e9606a8a4b Mon Sep 17 00:00:00 2001 From: archi-Doc Date: Thu, 6 Aug 2020 06:02:42 +0900 Subject: [PATCH 04/14] Fix taskbar restarting issue (#35) --- src/NotifyIconWpf/TaskbarIcon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NotifyIconWpf/TaskbarIcon.cs b/src/NotifyIconWpf/TaskbarIcon.cs index afc2a7b..6222df5 100644 --- a/src/NotifyIconWpf/TaskbarIcon.cs +++ b/src/NotifyIconWpf/TaskbarIcon.cs @@ -931,7 +931,7 @@ namespace Hardcodet.Wpf.TaskbarNotification /// private void OnTaskbarCreated() { - IsTaskbarIconCreated = false; + RemoveTaskbarIcon(); CreateTaskbarIcon(); } From de6a2b2e2598e8842c17ce14635a918ec3dbaa74 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Wed, 5 Aug 2020 23:51:49 +0200 Subject: [PATCH 05/14] Fix for the DPI issue described in #26 --- src/NotifyIconWpf/Interop/SystemInfo.cs | 26 ++++++++++- src/NotifyIconWpf/Interop/TrayInfo.cs | 9 +--- src/NotifyIconWpf/Interop/WindowClass.cs | 1 - .../Interop/WindowMessageSink.cs | 24 +++++++--- src/NotifyIconWpf/Interop/WindowsMessages.cs | 17 ++++--- src/NotifyIconWpf/TaskbarIcon.cs | 8 ++-- src/Sample Project/Sample Project.csproj | 1 + src/Sample Project/app.manifest | 45 +++++++++++++++++++ .../Windowless Sample.csproj | 1 + src/Windowless Sample/app.manifest | 45 +++++++++++++++++++ .../WindowsFormsSample.csproj | 1 + src/WindowsFormsSample/app.manifest | 45 +++++++++++++++++++ 12 files changed, 197 insertions(+), 26 deletions(-) create mode 100644 src/Sample Project/app.manifest create mode 100644 src/Windowless Sample/app.manifest create mode 100644 src/WindowsFormsSample/app.manifest diff --git a/src/NotifyIconWpf/Interop/SystemInfo.cs b/src/NotifyIconWpf/Interop/SystemInfo.cs index 9671af6..6edeead 100644 --- a/src/NotifyIconWpf/Interop/SystemInfo.cs +++ b/src/NotifyIconWpf/Interop/SystemInfo.cs @@ -21,6 +21,7 @@ // // THIS COPYRIGHT NOTICE MAY NOT BE REMOVED FROM THIS FILE +using System.Diagnostics.Contracts; using System.Windows.Interop; namespace Hardcodet.Wpf.TaskbarNotification.Interop @@ -30,12 +31,18 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// public static class SystemInfo { + /// + /// Make sure the initial value is calculated at the first access + /// static SystemInfo() { - UpdateFactors(); + UpdateDpiFactors(); } - internal static void UpdateFactors() + /// + /// This calculates the current DPI values and sets this into the DpiFactorX/DpiFactorY values + /// + internal static void UpdateDpiFactors() { using (var source = new HwndSource(new HwndSourceParameters())) { @@ -59,5 +66,20 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// Returns the DPI Y Factor /// public static double DpiFactorY { get; private set; } = 1; + + /// + /// Scale the supplied point to the current DPI settings + /// + /// + /// Point + [Pure] + public static Point ScaleWithDpi(this Point point) + { + return new Point + { + X = (int)(point.X / DpiFactorX), + Y = (int)(point.Y / DpiFactorY) + }; + } } } \ No newline at end of file diff --git a/src/NotifyIconWpf/Interop/TrayInfo.cs b/src/NotifyIconWpf/Interop/TrayInfo.cs index c762a68..3930a89 100644 --- a/src/NotifyIconWpf/Interop/TrayInfo.cs +++ b/src/NotifyIconWpf/Interop/TrayInfo.cs @@ -51,13 +51,6 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// /// Point /// Point - public static Point GetDeviceCoordinates(Point point) - { - return new Point - { - X = (int)(point.X / SystemInfo.DpiFactorX), - Y = (int)(point.Y / SystemInfo.DpiFactorY) - }; - } + public static Point GetDeviceCoordinates(Point point) => point.ScaleWithDpi(); } } \ No newline at end of file diff --git a/src/NotifyIconWpf/Interop/WindowClass.cs b/src/NotifyIconWpf/Interop/WindowClass.cs index 0a3c5e2..baba148 100644 --- a/src/NotifyIconWpf/Interop/WindowClass.cs +++ b/src/NotifyIconWpf/Interop/WindowClass.cs @@ -9,7 +9,6 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// public delegate IntPtr WindowProcedureHandler(IntPtr hWnd, uint uMsg, IntPtr wParam, IntPtr lParam); - /// /// Win API WNDCLASS struct - represents a single window. /// Used to receive window messages. diff --git a/src/NotifyIconWpf/Interop/WindowMessageSink.cs b/src/NotifyIconWpf/Interop/WindowMessageSink.cs index 97f0392..2ad3882 100644 --- a/src/NotifyIconWpf/Interop/WindowMessageSink.cs +++ b/src/NotifyIconWpf/Interop/WindowMessageSink.cs @@ -6,10 +6,10 @@ // modify it under the terms of the Code Project Open License (CPOL); // either version 1.0 of the License, or (at your option) any later // version. -// +// // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -70,7 +70,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// /// Handle for the message window. - /// + /// internal IntPtr MessageWindowHandle { get; private set; } /// @@ -223,9 +223,21 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// Provides information about the event. private void ProcessWindowMessage(uint msg, IntPtr wParam, IntPtr lParam) { - if (msg != CallbackMessageId) return; + // Check if it was a callback message + if (msg != CallbackMessageId) + { + // It was not a callback message, but make sure it's not something else we need to process + switch ((WindowsMessages) msg) + { + case WindowsMessages.WM_DPICHANGED: + Debug.WriteLine("DPI Change"); + SystemInfo.UpdateDpiFactors(); + break; + } + return; + } - var message = (WindowsMessages) lParam.ToInt32(); + var message = (WindowsMessages)lParam.ToInt32(); Debug.WriteLine("Got message " + message); switch (message) { @@ -338,7 +350,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop // This object will be cleaned up by the Dispose method. // Therefore, you should call GC.SuppressFinalize to - // take this object off the finalization queue + // take this object off the finalization queue // and prevent finalization code for this object // from executing a second time. GC.SuppressFinalize(this); diff --git a/src/NotifyIconWpf/Interop/WindowsMessages.cs b/src/NotifyIconWpf/Interop/WindowsMessages.cs index 51ae1bf..506b3d3 100644 --- a/src/NotifyIconWpf/Interop/WindowsMessages.cs +++ b/src/NotifyIconWpf/Interop/WindowsMessages.cs @@ -6,10 +6,10 @@ // modify it under the terms of the Code Project Open License (CPOL); // either version 1.0 of the License, or (at your option) any later // version. -// +// // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -37,8 +37,8 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// /// Notifies a window that the user clicked the right mouse button (right-clicked) in the window. /// See WM_CONTEXTMENU message - /// - /// In case of a notify icon: + /// + /// In case of a notify icon: /// If a user selects a notify icon's shortcut menu with the keyboard, the Shell now sends the associated application a WM_CONTEXTMENU message. Earlier versions send WM_RBUTTONDOWN and WM_RBUTTONUP messages. /// See Shell_NotifyIcon function /// @@ -57,7 +57,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// Posted when the user presses the left mouse button while the cursor is in the client area of a window. /// If the mouse is not captured, the message is posted to the window beneath the cursor. /// Otherwise, the message is posted to the window that has captured the mouse. - /// + /// /// See WM_LBUTTONDOWN message /// WM_LBUTTONDOWN = 0x0201, @@ -134,6 +134,13 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// WM_MBUTTONDBLCLK = 0x0209, + /// + /// Sent when the effective dots per inch (dpi) for a window has changed. + /// The DPI is the scale factor for a window. + /// There are multiple events that can cause the DPI to change. + /// + WM_DPICHANGED = 0x02e0, + /// /// Used to define private messages for use by private window classes, usually of the form WM_USER+x, where x is an integer value. /// diff --git a/src/NotifyIconWpf/TaskbarIcon.cs b/src/NotifyIconWpf/TaskbarIcon.cs index 6222df5..33bf8e3 100644 --- a/src/NotifyIconWpf/TaskbarIcon.cs +++ b/src/NotifyIconWpf/TaskbarIcon.cs @@ -6,10 +6,10 @@ // modify it under the terms of the Code Project Open License (CPOL); // either version 1.0 of the License, or (at your option) any later // version. -// +// // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -561,7 +561,7 @@ namespace Hardcodet.Wpf.TaskbarNotification HasDropShadow = false, BorderThickness = new Thickness(0), Background = System.Windows.Media.Brushes.Transparent, - // setting the + // setting the StaysOpen = true, Content = TrayToolTip }; @@ -1049,7 +1049,7 @@ namespace Hardcodet.Wpf.TaskbarNotification // This object will be cleaned up by the Dispose method. // Therefore, you should call GC.SuppressFinalize to - // take this object off the finalization queue + // take this object off the finalization queue // and prevent finalization code for this object // from executing a second time. GC.SuppressFinalize(this); diff --git a/src/Sample Project/Sample Project.csproj b/src/Sample Project/Sample Project.csproj index d2e0cac..e46ca69 100644 --- a/src/Sample Project/Sample Project.csproj +++ b/src/Sample Project/Sample Project.csproj @@ -5,6 +5,7 @@ Samples Sample Project Sample Project + app.manifest diff --git a/src/Sample Project/app.manifest b/src/Sample Project/app.manifest new file mode 100644 index 0000000..cfc95aa --- /dev/null +++ b/src/Sample Project/app.manifest @@ -0,0 +1,45 @@ + + + + + + True/PM + PerMonitorV2,PerMonitor + true + false + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Windowless Sample/Windowless Sample.csproj b/src/Windowless Sample/Windowless Sample.csproj index 8b973fe..4d63818 100644 --- a/src/Windowless Sample/Windowless Sample.csproj +++ b/src/Windowless Sample/Windowless Sample.csproj @@ -5,6 +5,7 @@ Windowless_Sample Windowless Sample Windowless Sample + app.manifest diff --git a/src/Windowless Sample/app.manifest b/src/Windowless Sample/app.manifest new file mode 100644 index 0000000..432278f --- /dev/null +++ b/src/Windowless Sample/app.manifest @@ -0,0 +1,45 @@ + + + + + + True/PM + PerMonitorV2,PerMonitor + true + false + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/WindowsFormsSample/WindowsFormsSample.csproj b/src/WindowsFormsSample/WindowsFormsSample.csproj index 85bae38..e05627c 100644 --- a/src/WindowsFormsSample/WindowsFormsSample.csproj +++ b/src/WindowsFormsSample/WindowsFormsSample.csproj @@ -6,6 +6,7 @@ WindowsFormsSample WindowsFormsSample true + app.manifest diff --git a/src/WindowsFormsSample/app.manifest b/src/WindowsFormsSample/app.manifest new file mode 100644 index 0000000..432278f --- /dev/null +++ b/src/WindowsFormsSample/app.manifest @@ -0,0 +1,45 @@ + + + + + + True/PM + PerMonitorV2,PerMonitor + true + false + + + + + + + + + + + + + + + + + + + + + + + + + From 9e86ac77d3a68eadbecc5261c3e2e2788312926b Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Sun, 22 Nov 2020 22:04:27 +0100 Subject: [PATCH 06/14] Added .NET 5.0 and restructured the repository. (#47) --- azure-pipelines.yml | 24 +++---- src/Directory.Build.props | 17 ++--- .../App.xaml | 2 +- .../App.xaml.cs | 2 +- .../Commands/CloseWindowCommand.cs | 2 +- .../Commands/CommandBase.cs | 2 +- .../Commands/HideSampleWindowCommand.cs | 2 +- .../Commands/ShowSampleWindowCommand.cs | 2 +- .../Icons/Bulb.ico | Bin .../Icons/Computers.ico | Bin .../Icons/Error.ico | Bin .../Icons/Inactive.ico | Bin .../Icons/NetDrives.ico | Bin .../Images/Add.png | Bin .../Images/Close.png | Bin .../Images/Info.png | Bin .../Images/Logo.png | Bin .../Images/Preferences.png | Bin .../Images/Remove.png | Bin .../Main.xaml | 48 ++++++------- .../Main.xaml.cs | 64 +++++++++++------- .../NotifyIconWpf.Sample.ShowCases.csproj} | 12 ++-- .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../Properties/Settings.settings | 0 .../Showcase/FancyBalloon.xaml | 2 +- .../Showcase/FancyBalloon.xaml.cs | 2 +- .../Showcase/FancyPopup.xaml | 2 +- .../Showcase/FancyPopup.xaml.cs | 2 +- .../Showcase/FancyToolTip.xaml | 2 +- .../Showcase/FancyToolTip.xaml.cs | 2 +- .../Showcase/NotifyIconResources.xaml | 8 +-- .../Showcase/ShowcaseWindow.xaml | 11 +-- .../Showcase/ShowcaseWindow.xaml.cs | 2 +- .../Showcase/WelcomeBalloon.xaml | 2 +- .../Showcase/WelcomeBalloon.xaml.cs | 2 +- .../NotifyIconResourceDictionary.xaml | 0 .../SimpleWindowWithNotifyIcon.xaml | 2 +- .../SimpleWindowWithNotifyIcon.xaml.cs | 2 +- .../02 - ToolTips/InlineToolTipWindow.xaml | 2 +- .../02 - ToolTips/InlineToolTipWindow.xaml.cs | 2 +- .../02 - ToolTips/SimpleUserControl.xaml | 2 +- .../02 - ToolTips/SimpleUserControl.xaml.cs | 2 +- .../UserControlToolTipWindow.xaml | 6 +- .../UserControlToolTipWindow.xaml.cs | 2 +- .../03 - Popups/InlinePopupWindow.xaml | 4 +- .../03 - Popups/InlinePopupWindow.xaml.cs | 2 +- .../InlineContextMenuWindow.xaml | 4 +- .../InlineContextMenuWindow.xaml.cs | 2 +- .../05 - Balloons/BalloonSampleWindow.xaml | 2 +- .../05 - Balloons/BalloonSampleWindow.xaml.cs | 3 +- .../06 - Commands/CommandWindow.xaml | 6 +- .../06 - Commands/CommandWindow.xaml.cs | 2 +- .../06 - Commands/ShowMessageCommand.cs | 2 +- .../07 - Events/EventVisualizerWindow.xaml | 2 +- .../07 - Events/EventVisualizerWindow.xaml.cs | 2 +- .../DataBoundToolTipWindow.xaml | 8 +-- .../DataBoundToolTipWindow.xaml.cs | 2 +- .../Tutorials/09 - MVVM/Clock.png | Bin .../Tutorials/09 - MVVM/ClockPopup.xaml | 2 +- .../Tutorials/09 - MVVM/ClockPopup.xaml.cs | 2 +- .../09 - MVVM/MvvmSampleViewModel.cs | 2 +- .../Tutorials/09 - MVVM/MvvmSampleWindow.xaml | 8 +-- .../09 - MVVM/MvvmSampleWindow.xaml.cs | 2 +- src/NotifyIconWpf.Sample.ShowCases/app.config | 6 ++ .../app.manifest | 0 .../App.xaml | 2 +- .../App.xaml.cs | 2 +- .../DelegateCommand.cs | 2 +- .../MainWindow.xaml | 2 +- .../MainWindow.xaml.cs | 2 +- .../NotifyIconResources.xaml | 2 +- .../NotifyIconViewModel.cs | 2 +- .../NotifyIconWpf.Sample.Windowless.csproj} | 11 +-- .../Properties/AssemblyInfo.cs | 0 .../Red.ico | Bin .../app.config | 6 ++ .../app.manifest | 0 .../FancyPopup.xaml | 2 +- .../FancyPopup.xaml.cs | 2 +- .../Form1.Designer.cs | 2 +- .../Form1.cs | 5 +- .../Form1.resx | 0 .../Icon/Led.ico | Bin .../Images/Preferences.png | Bin .../NotifyIconWpf.Sample.WindowsForms.csproj} | 12 ++-- .../Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 5 +- .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../Properties/Settings.settings | 0 .../app.config | 6 ++ .../app.manifest | 0 src/NotifyIconWpf.sln | 6 +- src/NotifyIconWpf/NotifyIconWpf.csproj | 9 +-- src/global.json | 2 +- src/version.json | 4 +- 100 files changed, 201 insertions(+), 184 deletions(-) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/App.xaml (86%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/App.xaml.cs (79%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Commands/CloseWindowCommand.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Commands/CommandBase.cs (99%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Commands/HideSampleWindowCommand.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Commands/ShowSampleWindowCommand.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Icons/Bulb.ico (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Icons/Computers.ico (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Icons/Error.ico (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Icons/Inactive.ico (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Icons/NetDrives.ico (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Add.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Close.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Info.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Logo.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Preferences.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Images/Remove.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Main.xaml (88%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Main.xaml.cs (52%) rename src/{Sample Project/Sample Project.csproj => NotifyIconWpf.Sample.ShowCases/NotifyIconWpf.Sample.ShowCases.csproj} (68%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Properties/AssemblyInfo.cs (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Properties/Resources.Designer.cs (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Properties/Resources.resx (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Properties/Settings.Designer.cs (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Properties/Settings.settings (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyBalloon.xaml (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyBalloon.xaml.cs (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyPopup.xaml (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyPopup.xaml.cs (96%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyToolTip.xaml (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/FancyToolTip.xaml.cs (95%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/NotifyIconResources.xaml (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/ShowcaseWindow.xaml (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/ShowcaseWindow.xaml.cs (98%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/WelcomeBalloon.xaml (97%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Showcase/WelcomeBalloon.xaml.cs (84%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/01 - Declaration/NotifyIconResourceDictionary.xaml (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml (88%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml (94%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/SimpleUserControl.xaml (86%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs (84%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml (78%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/03 - Popups/InlinePopupWindow.xaml (92%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/03 - Popups/InlinePopupWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml (95%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml.cs (95%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/05 - Balloons/BalloonSampleWindow.xaml (95%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/05 - Balloons/BalloonSampleWindow.xaml.cs (93%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/06 - Commands/CommandWindow.xaml (92%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/06 - Commands/CommandWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/06 - Commands/ShowMessageCommand.cs (90%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/07 - Events/EventVisualizerWindow.xaml (99%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/07 - Events/EventVisualizerWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml (93%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml.cs (91%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/Clock.png (100%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/ClockPopup.xaml (93%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/ClockPopup.xaml.cs (80%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/MvvmSampleViewModel.cs (95%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/MvvmSampleWindow.xaml (83%) rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/Tutorials/09 - MVVM/MvvmSampleWindow.xaml.cs (84%) create mode 100644 src/NotifyIconWpf.Sample.ShowCases/app.config rename src/{Sample Project => NotifyIconWpf.Sample.ShowCases}/app.manifest (100%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/App.xaml (93%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/App.xaml.cs (94%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/DelegateCommand.cs (94%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/MainWindow.xaml (83%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/MainWindow.xaml.cs (85%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/NotifyIconResources.xaml (93%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/NotifyIconViewModel.cs (97%) rename src/{Windowless Sample/Windowless Sample.csproj => NotifyIconWpf.Sample.Windowless/NotifyIconWpf.Sample.Windowless.csproj} (66%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/Properties/AssemblyInfo.cs (100%) rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/Red.ico (100%) create mode 100644 src/NotifyIconWpf.Sample.Windowless/app.config rename src/{Windowless Sample => NotifyIconWpf.Sample.Windowless}/app.manifest (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/FancyPopup.xaml (98%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/FancyPopup.xaml.cs (96%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Form1.Designer.cs (97%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Form1.cs (90%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Form1.resx (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Icon/Led.ico (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Images/Preferences.png (100%) rename src/{WindowsFormsSample/WindowsFormsSample.csproj => NotifyIconWpf.Sample.WindowsForms/NotifyIconWpf.Sample.WindowsForms.csproj} (84%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Program.cs (90%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Properties/AssemblyInfo.cs (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Properties/Resources.Designer.cs (97%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Properties/Resources.resx (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Properties/Settings.Designer.cs (100%) rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/Properties/Settings.settings (100%) create mode 100644 src/NotifyIconWpf.Sample.WindowsForms/app.config rename src/{WindowsFormsSample => NotifyIconWpf.Sample.WindowsForms}/app.manifest (100%) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0f0424..ea62dcc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,8 +7,7 @@ trigger: batch: true branches: include: - - develop - - release/* + - master - feature/* exclude: - gh-pages @@ -32,24 +31,17 @@ stages: versionSpec: '5.5.1' - task: UseDotNet@2 - displayName: 'Use .NET Core sdk 3.1.6' + displayName: 'Use .NET Core sdk 5.0' inputs: packageType: sdk - version: 3.1.302 + version: 5.0.100 - - task: NuGetCommand@2 - displayName: NuGet restore + - task: DotNetCoreCLI@2 + displayName: Build inputs: - command: 'restore' - restoreSolution: '$(solution)' - feedsToUse: config - - - task: MSBuild@1 - displayName: Build and package - inputs: - solution: '$(solution)' - platform: $(buildPlatform) - configuration: $(buildConfiguration) + command: build + projects: '$(solution)' + arguments: '--configuration $(buildConfiguration) /p:Platform="$(buildPlatform)"' - task: CopyFiles@2 displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 849d6d3..1b33b4c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,12 +22,6 @@ Source code and extensive sample application available at http://www.hardcodet.n NotifyIcon WPF Tray Notify ToolTip Popup Balloon Toast - - true - - - false - true @@ -46,6 +40,13 @@ Source code and extensive sample application available at http://www.hardcodet.n True + + + all + runtime; build; native; contentfiles; analyzers + + + @@ -61,10 +62,6 @@ Source code and extensive sample application available at http://www.hardcodet.n - - all - runtime; build; native; contentfiles; analyzers - diff --git a/src/Sample Project/App.xaml b/src/NotifyIconWpf.Sample.ShowCases/App.xaml similarity index 86% rename from src/Sample Project/App.xaml rename to src/NotifyIconWpf.Sample.ShowCases/App.xaml index 318ca54..e464665 100644 --- a/src/Sample Project/App.xaml +++ b/src/NotifyIconWpf.Sample.ShowCases/App.xaml @@ -1,4 +1,4 @@ - diff --git a/src/Sample Project/App.xaml.cs b/src/NotifyIconWpf.Sample.ShowCases/App.xaml.cs similarity index 79% rename from src/Sample Project/App.xaml.cs rename to src/NotifyIconWpf.Sample.ShowCases/App.xaml.cs index 9b6d915..89722a2 100644 --- a/src/Sample Project/App.xaml.cs +++ b/src/NotifyIconWpf.Sample.ShowCases/App.xaml.cs @@ -1,6 +1,6 @@ using System.Windows; -namespace Samples +namespace NotifyIconWpf.Sample.ShowCases { /// /// Interaction logic for App.xaml diff --git a/src/Sample Project/Commands/CloseWindowCommand.cs b/src/NotifyIconWpf.Sample.ShowCases/Commands/CloseWindowCommand.cs similarity index 91% rename from src/Sample Project/Commands/CloseWindowCommand.cs rename to src/NotifyIconWpf.Sample.ShowCases/Commands/CloseWindowCommand.cs index 00930e8..bba39a5 100644 --- a/src/Sample Project/Commands/CloseWindowCommand.cs +++ b/src/NotifyIconWpf.Sample.ShowCases/Commands/CloseWindowCommand.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Input; -namespace Samples.Commands +namespace NotifyIconWpf.Sample.ShowCases.Commands { /// /// Closes the current window. diff --git a/src/Sample Project/Commands/CommandBase.cs b/src/NotifyIconWpf.Sample.ShowCases/Commands/CommandBase.cs similarity index 99% rename from src/Sample Project/Commands/CommandBase.cs rename to src/NotifyIconWpf.Sample.ShowCases/Commands/CommandBase.cs index 040a21b..666b1d6 100644 --- a/src/Sample Project/Commands/CommandBase.cs +++ b/src/NotifyIconWpf.Sample.ShowCases/Commands/CommandBase.cs @@ -6,7 +6,7 @@ using System.Windows.Markup; using System.Windows.Media; using Hardcodet.Wpf.TaskbarNotification; -namespace Samples.Commands +namespace NotifyIconWpf.Sample.ShowCases.Commands { /// /// Basic implementation of the diff --git a/src/Sample Project/Commands/HideSampleWindowCommand.cs b/src/NotifyIconWpf.Sample.ShowCases/Commands/HideSampleWindowCommand.cs similarity index 91% rename from src/Sample Project/Commands/HideSampleWindowCommand.cs rename to src/NotifyIconWpf.Sample.ShowCases/Commands/HideSampleWindowCommand.cs index 0e5be4e..239ef0a 100644 --- a/src/Sample Project/Commands/HideSampleWindowCommand.cs +++ b/src/NotifyIconWpf.Sample.ShowCases/Commands/HideSampleWindowCommand.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Input; -namespace Samples.Commands +namespace NotifyIconWpf.Sample.ShowCases.Commands { /// /// Hides the main window. diff --git a/src/Sample Project/Commands/ShowSampleWindowCommand.cs b/src/NotifyIconWpf.Sample.ShowCases/Commands/ShowSampleWindowCommand.cs similarity index 91% rename from src/Sample Project/Commands/ShowSampleWindowCommand.cs rename to src/NotifyIconWpf.Sample.ShowCases/Commands/ShowSampleWindowCommand.cs index f954968..5ff656e 100644 --- a/src/Sample Project/Commands/ShowSampleWindowCommand.cs +++ b/src/NotifyIconWpf.Sample.ShowCases/Commands/ShowSampleWindowCommand.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Input; -namespace Samples.Commands +namespace NotifyIconWpf.Sample.ShowCases.Commands { /// /// Shows the main window. diff --git a/src/Sample Project/Icons/Bulb.ico b/src/NotifyIconWpf.Sample.ShowCases/Icons/Bulb.ico similarity index 100% rename from src/Sample Project/Icons/Bulb.ico rename to src/NotifyIconWpf.Sample.ShowCases/Icons/Bulb.ico diff --git a/src/Sample Project/Icons/Computers.ico b/src/NotifyIconWpf.Sample.ShowCases/Icons/Computers.ico similarity index 100% rename from src/Sample Project/Icons/Computers.ico rename to src/NotifyIconWpf.Sample.ShowCases/Icons/Computers.ico diff --git a/src/Sample Project/Icons/Error.ico b/src/NotifyIconWpf.Sample.ShowCases/Icons/Error.ico similarity index 100% rename from src/Sample Project/Icons/Error.ico rename to src/NotifyIconWpf.Sample.ShowCases/Icons/Error.ico diff --git a/src/Sample Project/Icons/Inactive.ico b/src/NotifyIconWpf.Sample.ShowCases/Icons/Inactive.ico similarity index 100% rename from src/Sample Project/Icons/Inactive.ico rename to src/NotifyIconWpf.Sample.ShowCases/Icons/Inactive.ico diff --git a/src/Sample Project/Icons/NetDrives.ico b/src/NotifyIconWpf.Sample.ShowCases/Icons/NetDrives.ico similarity index 100% rename from src/Sample Project/Icons/NetDrives.ico rename to src/NotifyIconWpf.Sample.ShowCases/Icons/NetDrives.ico diff --git a/src/Sample Project/Images/Add.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Add.png similarity index 100% rename from src/Sample Project/Images/Add.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Add.png diff --git a/src/Sample Project/Images/Close.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Close.png similarity index 100% rename from src/Sample Project/Images/Close.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Close.png diff --git a/src/Sample Project/Images/Info.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Info.png similarity index 100% rename from src/Sample Project/Images/Info.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Info.png diff --git a/src/Sample Project/Images/Logo.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Logo.png similarity index 100% rename from src/Sample Project/Images/Logo.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Logo.png diff --git a/src/Sample Project/Images/Preferences.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Preferences.png similarity index 100% rename from src/Sample Project/Images/Preferences.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Preferences.png diff --git a/src/Sample Project/Images/Remove.png b/src/NotifyIconWpf.Sample.ShowCases/Images/Remove.png similarity index 100% rename from src/Sample Project/Images/Remove.png rename to src/NotifyIconWpf.Sample.ShowCases/Images/Remove.png diff --git a/src/Sample Project/Main.xaml b/src/NotifyIconWpf.Sample.ShowCases/Main.xaml similarity index 88% rename from src/Sample Project/Main.xaml rename to src/NotifyIconWpf.Sample.ShowCases/Main.xaml index 38e32fc..d2ef1a2 100644 --- a/src/Sample Project/Main.xaml +++ b/src/NotifyIconWpf.Sample.ShowCases/Main.xaml @@ -1,5 +1,5 @@  + TextWrapping="Wrap" Text="{Binding Path=SampleTitle}"/>