update to v1.2.1

This commit is contained in:
NaBian committed 2018-09-11 12:00:52 +08:00
1 parent f9475c318c
commit be950fac36
75 files changed
+2810 -288

No files matched your search

@@ -1,33 +1,32 @@
using System;
using GalaSoft.MvvmLight.Command;
using HandyControl.Controls;
using HandyControl.Tools;
namespace HandyControlDemo.ViewModel
{
public class GrowlDemoViewModel
{
public RelayCommand InfoCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Info(ResourceHelper.GetString("GrowlInfo")))).Value;
new RelayCommand(() => Growl.Info(Properties.Langs.Lang.GrowlInfo))).Value;
public RelayCommand SuccessCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Success(ResourceHelper.GetString("GrowlSuccess")))).Value;
new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess))).Value;
public RelayCommand WarningCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Warning(ResourceHelper.GetString("GrowlWarning")))).Value;
new RelayCommand(() => Growl.Warning(Properties.Langs.Lang.GrowlWarning))).Value;
public RelayCommand ErrorCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Error(ResourceHelper.GetString("GrowlError")))).Value;
new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError))).Value;
public RelayCommand AskCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Ask("GrowlAsk", (closeAction, b) =>
new RelayCommand(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, (closeAction, b) =>
{
Growl.Info(b.ToString());
closeAction?.Invoke();
}))).Value;
public RelayCommand FatalCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Fatal(ResourceHelper.GetString("GrowlFatal")))).Value;
new RelayCommand(() => Growl.Fatal(Properties.Langs.Lang.GrowlFatal))).Value;
public RelayCommand ClearCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(Growl.Clear)).Value;
@@ -1,5 +1,5 @@
using System;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.CommandWpf;
using HandyControl.Controls;
namespace HandyControlDemo.ViewModel
+17 -1
View File
@@ -2,7 +2,7 @@
using System.Windows;
using System.Windows.Controls;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.CommandWpf;
using GalaSoft.MvvmLight.Messaging;
using HandyControlDemo.Data;
using HandyControlDemo.UserControl;
@@ -33,12 +33,18 @@ namespace HandyControlDemo.ViewModel
/// </summary>
private object _subContent;
/// <summary>
/// 非用户区域内容
/// </summary>
private object _noUserContent;
#endregion
public MainViewModel()
{
LeftMainContent = ControlLocator.Instance.LeftMainContent;
MainContent = ControlLocator.Instance.MainContent;
NoUserContent = ControlLocator.Instance.NoUserContent;
Messenger.Default.Register<object>(this, MessageToken.LoadGrowlDemoCtl, obj => SubContent = ControlLocator.Instance.GrowlDemoCtl);
Messenger.Default.Register<object>(this, MessageToken.LoadLoadingDemoCtl, obj => SubContent = ControlLocator.Instance.LoadingDemoCtl);
@@ -53,10 +59,20 @@ namespace HandyControlDemo.ViewModel
Messenger.Default.Register<object>(this, MessageToken.LoadAnimationPathDemoCtl, obj => SubContent = ControlLocator.Instance.AnimationPathDemoCtl);
Messenger.Default.Register<object>(this, MessageToken.LoadButtonDemoCtl, obj => SubContent = ControlLocator.Instance.ButtonDemoCtl);
Messenger.Default.Register<object>(this, MessageToken.LoadToggleButtonDemoCtl, obj => SubContent = ControlLocator.Instance.ToggleButtonDemoCtl);
Messenger.Default.Register<object>(this, MessageToken.LoadTabControlDemoCtl, obj => SubContent = ControlLocator.Instance.TabControlDemoCtl);
}
#region 属性
/// <summary>
/// 非用户区域内容
/// </summary>
public object NoUserContent
{
get => _noUserContent;
set => Set(ref _noUserContent, value);
}
/// <summary>
/// 左侧主内容
/// </summary>