mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-14 10:00:10 -05:00
Code modernising (#8)
* Applied some code conventions, used more current language features which should improve readability and making it easier to re-factor / modify. Also fixed some typos in documentation. * Changes based on PR conversation for the SystemInfo * Some modifications due to conversations on the PR, especially I removed the FlagsAttribute on the BalloonFlags. * Removed Silverlight targeting in code.
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
|
||||
namespace Samples
|
||||
@@ -30,10 +20,10 @@ namespace Samples
|
||||
/// Description
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty BalloonTextProperty =
|
||||
DependencyProperty.Register("BalloonText",
|
||||
DependencyProperty.Register(nameof(BalloonText),
|
||||
typeof (string),
|
||||
typeof (FancyBalloon),
|
||||
new FrameworkPropertyMetadata(""));
|
||||
new FrameworkPropertyMetadata(string.Empty));
|
||||
|
||||
/// <summary>
|
||||
/// A property wrapper for the <see cref="BalloonTextProperty"/>
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Samples
|
||||
/// The number of clicks on the popup button.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ClickCountProperty =
|
||||
DependencyProperty.Register("ClickCount",
|
||||
DependencyProperty.Register(nameof(ClickCount),
|
||||
typeof (int),
|
||||
typeof (FancyPopup),
|
||||
new FrameworkPropertyMetadata(0));
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using System.Windows;
|
||||
|
||||
namespace Samples
|
||||
{
|
||||
@@ -25,10 +13,10 @@ namespace Samples
|
||||
/// The tooltip details.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty InfoTextProperty =
|
||||
DependencyProperty.Register("InfoText",
|
||||
DependencyProperty.Register(nameof(InfoText),
|
||||
typeof (string),
|
||||
typeof (FancyToolTip),
|
||||
new FrameworkPropertyMetadata(""));
|
||||
new FrameworkPropertyMetadata(string.Empty));
|
||||
|
||||
/// <summary>
|
||||
/// A property wrapper for the <see cref="InfoTextProperty"/>
|
||||
@@ -45,7 +33,7 @@ namespace Samples
|
||||
|
||||
public FancyToolTip()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Samples
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user