update pr/59

This commit is contained in:
NaBian committed 2019-04-04 23:51:42 +08:00
1 parent 0fb520bf8d
commit ada85bb59d
13 files changed
+230 -236

No files matched your search

@@ -1,25 +0,0 @@
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
namespace HandyControlDemo.ViewModel.Controls
{
public class BadgeDemoCtlViewModel : ViewModelBase
{
private int _count;
public int Count
{
get => _count;
set => Set(ref _count, value);
}
public ICommand CountCommand { get; }
public BadgeDemoCtlViewModel()
{
Count = 1;
CountCommand = new RelayCommand(() => Count++);
}
}
}
@@ -0,0 +1,20 @@
using System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
namespace HandyControlDemo.ViewModel.Controls
{
public class BadgeDemoViewModel : ViewModelBase
{
private int _count = 1;
public int Count
{
get => _count;
set => Set(ref _count, value);
}
public RelayCommand CountCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Count++)).Value;
}
}
@@ -32,7 +32,7 @@ namespace HandyControlDemo.ViewModel
SimpleIoc.Default.Register<SearchBarDemoViewModel>();
SimpleIoc.Default.Register<NotifyIconDemoViewModel>();
SimpleIoc.Default.Register<InteractiveDialogViewModel>();
SimpleIoc.Default.Register<BadgeDemoCtlViewModel>();
SimpleIoc.Default.Register<BadgeDemoViewModel>();
}
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
@@ -70,7 +70,7 @@ namespace HandyControlDemo.ViewModel
public InteractiveDialogViewModel InteractiveDialog => ServiceLocator.Current.GetInstance<InteractiveDialogViewModel>();
public BadgeDemoCtlViewModel BadgeDemoCtl => ServiceLocator.Current.GetInstance<BadgeDemoCtlViewModel>();
public BadgeDemoViewModel BadgeDemo => ServiceLocator.Current.GetInstance<BadgeDemoViewModel>();
#endregion
}
}