modified the branch

This commit is contained in:
NaBian committed 2019-09-10 23:41:10 +08:00
1 parent 12bdc1a727
commit a91d33b078
8 files changed
+201 -91

No files matched your search

@@ -6,6 +6,7 @@ using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.CommandWpf;
# endif
using HandyControl.Controls;
using HandyControl.Data;
using HandyControlDemo.Data;
namespace HandyControlDemo.ViewModel
@@ -16,6 +17,18 @@ namespace HandyControlDemo.ViewModel
private bool _reversed;
private string _content = "Hello~~~";
public string Content
{
get => _content;
#if netle40
set => Set(nameof(Content), ref _content, value);
#else
set => Set(ref _content, value);
#endif
}
private bool _contextMenuIsShow;
public bool ContextMenuIsShow
@@ -87,6 +100,14 @@ namespace HandyControlDemo.ViewModel
public RelayCommand<object> MouseCmd => new Lazy<RelayCommand<object>>(() =>
new RelayCommand<object>(str=> Growl.Info(str.ToString()))).Value;
public RelayCommand SendNotificationCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(SendNotification)).Value;
private void SendNotification()
{
NotifyIcon.ShowBalloonTip("HandyControl", Content, NotifyIconInfoType.None, ContextMenuIsShow ? MessageToken.NotifyIconDemo : MessageToken.NotifyIconContextDemo);
}
public override void Cleanup()
{
base.Cleanup();