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}"/>
+ x:Name="BtnDeclaration"
+ Click="BtnDeclaration_Click" />
+ x:Name="BtnInlineToolTip"
+ Click="BtnInlineToolTip_Click" />
+ x:Name="BtnPopups"
+ Click="BtnPopups_Click" />
+ x:Name="BtnContextMenus"
+ Click="BtnContextMenus_Click" />
+ x:Name="BtnBalloons"
+ Click="BtnBalloons_Click" />
+ x:Name="BtnCommands"
+ Click="BtnCommands_Click" />
+ x:Name="BtnToolTipControl"
+ Click="BtnToolTipControl_Click" />
+ x:Name="BtnEvents"
+ Click="BtnEvents_Click" Width="164" HorizontalAlignment="Left" />
+ x:Name="BtnDataBinding"
+ Click="BtnDataBinding_Click" />
+ x:Name="BtnMvvm"
+ Click="BtnMvvm_Click" />
diff --git a/src/Sample Project/Main.xaml.cs b/src/NotifyIconWpf.Sample.ShowCases/Main.xaml.cs
similarity index 52%
rename from src/Sample Project/Main.xaml.cs
rename to src/NotifyIconWpf.Sample.ShowCases/Main.xaml.cs
index a58ae06..68d9bdc 100644
--- a/src/Sample Project/Main.xaml.cs
+++ b/src/NotifyIconWpf.Sample.ShowCases/Main.xaml.cs
@@ -1,16 +1,11 @@
-using System.Diagnostics;
+using System;
+using System.Diagnostics;
+using System.Reflection;
using System.Windows;
-using Samples.Tutorials;
-using Samples.Tutorials.Balloons;
-using Samples.Tutorials.Commands;
-using Samples.Tutorials.ContextMenus;
-using Samples.Tutorials.DataBinding;
-using Samples.Tutorials.Events;
-using Samples.Tutorials.MvvmSample;
-using Samples.Tutorials.Popups;
-using Samples.Tutorials.ToolTips;
+using NotifyIconWpf.Sample.ShowCases.Showcase;
+using NotifyIconWpf.Sample.ShowCases.Tutorials;
-namespace Samples
+namespace NotifyIconWpf.Sample.ShowCases
{
///
/// Interaction logic for Main.xaml
@@ -20,9 +15,9 @@ namespace Samples
public Main()
{
InitializeComponent();
+ DataContext = this;
}
-
///
/// Sets and
/// properties of a dialog that
@@ -36,58 +31,79 @@ namespace Samples
window.ShowDialog();
}
- private void btnDeclaration_Click(object sender, RoutedEventArgs e)
+ private static string Version
+ {
+ get
+ {
+ var executingAssembly = Assembly.GetExecutingAssembly();
+
+ // Use assembly version
+ string version = executingAssembly.GetName().Version.ToString();
+
+ // Use AssemblyFileVersion if available
+ var assemblyFileVersionAttribute = executingAssembly.GetCustomAttribute();
+ if (!string.IsNullOrEmpty(assemblyFileVersionAttribute?.Version))
+ {
+ var assemblyFileVersion = new Version(assemblyFileVersionAttribute.Version);
+ version = assemblyFileVersion.ToString(3);
+ }
+
+ return version.Replace("+", " - ");
+ }
+ }
+ public string SampleTitle { get; } = $"WPF NotifyIcon {Version} - Samples";
+
+ private void BtnDeclaration_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new SimpleWindowWithNotifyIcon());
}
-
- private void btnInlineToolTip_Click(object sender, RoutedEventArgs e)
+ private void BtnInlineToolTip_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new InlineToolTipWindow());
}
- private void btnToolTipControl_Click(object sender, RoutedEventArgs e)
+ private void BtnToolTipControl_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new UserControlToolTipWindow());
}
- private void btnPopups_Click(object sender, RoutedEventArgs e)
+ private void BtnPopups_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new InlinePopupWindow());
}
- private void btnContextMenus_Click(object sender, RoutedEventArgs e)
+ private void BtnContextMenus_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new InlineContextMenuWindow());
}
- private void btnBalloons_Click(object sender, RoutedEventArgs e)
+ private void BtnBalloons_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new BalloonSampleWindow());
}
- private void btnCommands_Click(object sender, RoutedEventArgs e)
+ private void BtnCommands_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new CommandWindow());
}
- private void btnEvents_Click(object sender, RoutedEventArgs e)
+ private void BtnEvents_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new EventVisualizerWindow());
}
- private void btnDataBinding_Click(object sender, RoutedEventArgs e)
+ private void BtnDataBinding_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new DataBoundToolTipWindow());
}
- private void btnMvvm_Click(object sender, RoutedEventArgs e)
+ private void BtnMvvm_Click(object sender, RoutedEventArgs e)
{
ShowDialog(new MvvmSampleWindow());
}
- private void btnMainSample_Click(object sender, RoutedEventArgs e)
+ private void BtnMainSample_Click(object sender, RoutedEventArgs e)
{
var sampleWindow = new ShowcaseWindow
{
diff --git a/src/Sample Project/Sample Project.csproj b/src/NotifyIconWpf.Sample.ShowCases/NotifyIconWpf.Sample.ShowCases.csproj
similarity index 68%
rename from src/Sample Project/Sample Project.csproj
rename to src/NotifyIconWpf.Sample.ShowCases/NotifyIconWpf.Sample.ShowCases.csproj
index e46ca69..080a032 100644
--- a/src/Sample Project/Sample Project.csproj
+++ b/src/NotifyIconWpf.Sample.ShowCases/NotifyIconWpf.Sample.ShowCases.csproj
@@ -1,15 +1,17 @@
WinExe
- net472;netcoreapp3.1
- Samples
- Sample Project
- Sample Project
- app.manifest
+ net472;netcoreapp3.1;net5.0-windows
+ true
+ app.manifest
+
+
+
+
diff --git a/src/Sample Project/Properties/AssemblyInfo.cs b/src/NotifyIconWpf.Sample.ShowCases/Properties/AssemblyInfo.cs
similarity index 100%
rename from src/Sample Project/Properties/AssemblyInfo.cs
rename to src/NotifyIconWpf.Sample.ShowCases/Properties/AssemblyInfo.cs
diff --git a/src/Sample Project/Properties/Resources.Designer.cs b/src/NotifyIconWpf.Sample.ShowCases/Properties/Resources.Designer.cs
similarity index 100%
rename from src/Sample Project/Properties/Resources.Designer.cs
rename to src/NotifyIconWpf.Sample.ShowCases/Properties/Resources.Designer.cs
diff --git a/src/Sample Project/Properties/Resources.resx b/src/NotifyIconWpf.Sample.ShowCases/Properties/Resources.resx
similarity index 100%
rename from src/Sample Project/Properties/Resources.resx
rename to src/NotifyIconWpf.Sample.ShowCases/Properties/Resources.resx
diff --git a/src/Sample Project/Properties/Settings.Designer.cs b/src/NotifyIconWpf.Sample.ShowCases/Properties/Settings.Designer.cs
similarity index 100%
rename from src/Sample Project/Properties/Settings.Designer.cs
rename to src/NotifyIconWpf.Sample.ShowCases/Properties/Settings.Designer.cs
diff --git a/src/Sample Project/Properties/Settings.settings b/src/NotifyIconWpf.Sample.ShowCases/Properties/Settings.settings
similarity index 100%
rename from src/Sample Project/Properties/Settings.settings
rename to src/NotifyIconWpf.Sample.ShowCases/Properties/Settings.settings
diff --git a/src/Sample Project/Showcase/FancyBalloon.xaml b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyBalloon.xaml
similarity index 98%
rename from src/Sample Project/Showcase/FancyBalloon.xaml
rename to src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyBalloon.xaml
index b5781ea..2ca6b86 100644
--- a/src/Sample Project/Showcase/FancyBalloon.xaml
+++ b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyBalloon.xaml
@@ -1,4 +1,4 @@
-
/// Interaction logic for FancyBalloon.xaml
diff --git a/src/Sample Project/Showcase/FancyPopup.xaml b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyPopup.xaml
similarity index 98%
rename from src/Sample Project/Showcase/FancyPopup.xaml
rename to src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyPopup.xaml
index 9e0f531..d36de2e 100644
--- a/src/Sample Project/Showcase/FancyPopup.xaml
+++ b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyPopup.xaml
@@ -1,5 +1,5 @@
/// Interaction logic for FancyPopup.xaml
diff --git a/src/Sample Project/Showcase/FancyToolTip.xaml b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml
similarity index 98%
rename from src/Sample Project/Showcase/FancyToolTip.xaml
rename to src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml
index 9392e7b..b333b7f 100644
--- a/src/Sample Project/Showcase/FancyToolTip.xaml
+++ b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d"
- x:Class="Samples.FancyToolTip"
+ x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.FancyToolTip"
x:Name="me"
Width="285"
Height="136">
diff --git a/src/Sample Project/Showcase/FancyToolTip.xaml.cs b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml.cs
similarity index 95%
rename from src/Sample Project/Showcase/FancyToolTip.xaml.cs
rename to src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml.cs
index b6fa3bb..e00b26e 100644
--- a/src/Sample Project/Showcase/FancyToolTip.xaml.cs
+++ b/src/NotifyIconWpf.Sample.ShowCases/Showcase/FancyToolTip.xaml.cs
@@ -1,6 +1,6 @@
using System.Windows;
-namespace Samples
+namespace NotifyIconWpf.Sample.ShowCases.Showcase
{
///
/// Interaction logic for FancyToolTip.xaml
diff --git a/src/Sample Project/Showcase/NotifyIconResources.xaml b/src/NotifyIconWpf.Sample.ShowCases/Showcase/NotifyIconResources.xaml
similarity index 91%
rename from src/Sample Project/Showcase/NotifyIconResources.xaml
rename to src/NotifyIconWpf.Sample.ShowCases/Showcase/NotifyIconResources.xaml
index 46bf6be..3fee514 100644
--- a/src/Sample Project/Showcase/NotifyIconResources.xaml
+++ b/src/NotifyIconWpf.Sample.ShowCases/Showcase/NotifyIconResources.xaml
@@ -1,7 +1,7 @@
+ xmlns:tb="http://www.hardcodet.net/taskbar"
+ xmlns:commands="clr-namespace:NotifyIconWpf.Sample.ShowCases.Commands">
@@ -55,7 +55,7 @@