Release 1.0.6

*************

CHG   Removed version text from NuGet files.
CHG   Replaced Tuple usage from SystemInfo by Point, which is also supported by .NET 3.5.
CHG   Changelog and credits update.
This commit is contained in:
Philipp Sumi
2016-03-21 09:53:34 +01:00
parent 3d29133708
commit 337da82ce2
5 changed files with 20 additions and 17 deletions

View File

@@ -2,6 +2,13 @@ hardcodet.net NotifyIcon for WPF - Changelog
Copyright (c) 2009-2013 Philipp Sumi
Contact and Information: http://www.hardcodet.net
1.0.6 (2016.03.20)
*****
FIX GetDeviceCoordinates now uses new SystemInfo class, which resolves potential null reference issues. Thanks Alexandr Reshetnikov.
ADD Added "NoLeftClickDelay" TaskbarIcon dependency property, to optionally make left clicks work without delay. Thanks John Reynolds.
ADD Overload to show built-in tray tooltips with big icons. Thanks amulware.
1.0.5 (2013.11.20)
*****

View File

@@ -1,19 +1,18 @@
using System;
using System.Windows.Interop;
namespace Hardcodet.Wpf.TaskbarNotification.Interop
{
public static class SystemInfo
{
private static Tuple<double, double> dpiFactors;
private static System.Windows.Point? dpiFactors;
private static Tuple<double, double> DpiFactors
private static System.Windows.Point? DpiFactors
{
get
{
if (dpiFactors == null)
using (var source = new HwndSource(new HwndSourceParameters()))
dpiFactors = Tuple.Create(source.CompositionTarget.TransformToDevice.M11, source.CompositionTarget.TransformToDevice.M22);
dpiFactors = new System.Windows.Point(source.CompositionTarget.TransformToDevice.M11, source.CompositionTarget.TransformToDevice.M22);
return dpiFactors;
}
}
@@ -23,7 +22,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
get
{
var factors = DpiFactors;
return factors != null ? factors.Item1 : 1;
return factors.HasValue ? factors.Value.X : 1;
}
}
@@ -32,7 +31,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
get
{
var factors = DpiFactors;
return factors != null ? factors.Item2 : 1;
return factors.HasValue ? factors.Value.Y : 1;
}
}
}

View File

@@ -30,7 +30,7 @@
FontSize="14"
FontStyle="Italic"
FontWeight="Bold"
TextWrapping="Wrap" Text="WPF NotifyIcon 1.0.5 - Samples"/>
TextWrapping="Wrap" Text="WPF NotifyIcon 1.0.6 - Samples"/>
<Button
HorizontalAlignment="Left"
Margin="10,133,0,0"