improve growl
According to @ghost1372 suggestion, growl has been improved.
This commit is contained in:
1 parent
fffbdbb4a9
commit
b144c2ec39
33 files changed
+409
-77
No files matched your search
@@ -312,6 +312,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 忽略 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Ignore {
|
||||
get {
|
||||
return ResourceManager.GetString("Ignore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 图片浏览器 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -342,4 +342,7 @@
|
||||
<data name="OpenCustomContentWindow" xml:space="preserve">
|
||||
<value>open custom content window</value>
|
||||
</data>
|
||||
<data name="Ignore" xml:space="preserve">
|
||||
<value>Ignore</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -322,4 +322,7 @@
|
||||
<data name="OpenCustomContentWindow" xml:space="preserve">
|
||||
<value>点击打开自定义内容窗口</value>
|
||||
</data>
|
||||
<data name="Ignore" xml:space="preserve">
|
||||
<value>忽略</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -13,20 +14,37 @@ namespace HandyControlDemo.ViewModel
|
||||
new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess))).Value;
|
||||
|
||||
public RelayCommand WarningCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Growl.Warning(Properties.Langs.Lang.GrowlWarning))).Value;
|
||||
new RelayCommand(() => Growl.Warning(new GrowlInfo
|
||||
{
|
||||
Message = Properties.Langs.Lang.GrowlWarning,
|
||||
CancelStr = Properties.Langs.Lang.Ignore,
|
||||
ActionBeforeClose = isConfirmed =>
|
||||
{
|
||||
Growl.Info(isConfirmed.ToString());
|
||||
return true;
|
||||
}
|
||||
}))).Value;
|
||||
|
||||
public RelayCommand ErrorCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError))).Value;
|
||||
|
||||
public RelayCommand AskCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, isClosed =>
|
||||
new RelayCommand(() => Growl.Ask(new GrowlInfo
|
||||
{
|
||||
Growl.Info(isClosed.ToString());
|
||||
return true;
|
||||
Message = Properties.Langs.Lang.GrowlAsk,
|
||||
ActionBeforeClose = isConfirmed =>
|
||||
{
|
||||
Growl.Info(isConfirmed.ToString());
|
||||
return true;
|
||||
}
|
||||
}))).Value;
|
||||
|
||||
public RelayCommand FatalCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Growl.Fatal(Properties.Langs.Lang.GrowlFatal))).Value;
|
||||
new RelayCommand(() => Growl.Fatal(new GrowlInfo
|
||||
{
|
||||
Message = Properties.Langs.Lang.GrowlFatal,
|
||||
ShowDateTime = false
|
||||
}))).Value;
|
||||
|
||||
public RelayCommand ClearCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(Growl.Clear)).Value;
|
||||
|
||||
Reference in new issue
Block a user