support for .NET framework 3.5
Still have bugs
This commit is contained in:
1 parent
5878039e21
commit
7d6b491f25
704 files changed
+48273
-33
No files matched your search
@@ -0,0 +1,62 @@
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class GrowlDemoViewModel
|
||||
{
|
||||
private RelayCommand _infoCmd;
|
||||
|
||||
public RelayCommand InfoCmd =>
|
||||
_infoCmd ?? (_infoCmd = new RelayCommand(() => Growl.Info(Properties.Langs.Lang.GrowlInfo)));
|
||||
|
||||
private RelayCommand _successCmd;
|
||||
|
||||
public RelayCommand SuccessCmd =>
|
||||
_successCmd ?? (_successCmd = new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess)));
|
||||
|
||||
private RelayCommand _warningCmd;
|
||||
|
||||
public RelayCommand WarningCmd =>
|
||||
_warningCmd ?? (_warningCmd = new RelayCommand(() =>
|
||||
Growl.Warning(new GrowlInfo
|
||||
{
|
||||
Message = Properties.Langs.Lang.GrowlWarning,
|
||||
CancelStr = Properties.Langs.Lang.Ignore,
|
||||
ActionBeforeClose = isConfirmed =>
|
||||
{
|
||||
Growl.Info(isConfirmed.ToString());
|
||||
return true;
|
||||
}
|
||||
})));
|
||||
|
||||
private RelayCommand _errorCmd;
|
||||
|
||||
public RelayCommand ErrorCmd =>
|
||||
_errorCmd ?? (_errorCmd = new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError)));
|
||||
|
||||
private RelayCommand _askCmd;
|
||||
|
||||
public RelayCommand AskCmd =>
|
||||
_askCmd ?? (_askCmd = new RelayCommand(() =>
|
||||
Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||
{
|
||||
Growl.Info(isConfirmed.ToString());
|
||||
return true;
|
||||
})));
|
||||
|
||||
private RelayCommand _fatalCmd;
|
||||
|
||||
public RelayCommand FatalCmd =>
|
||||
_fatalCmd ?? (_fatalCmd = new RelayCommand(() => Growl.Fatal(new GrowlInfo
|
||||
{
|
||||
Message = Properties.Langs.Lang.GrowlFatal,
|
||||
ShowDateTime = false
|
||||
})));
|
||||
|
||||
private RelayCommand _clearCmd;
|
||||
|
||||
public RelayCommand ClearCmd => _clearCmd ?? (_clearCmd = new RelayCommand(Growl.Clear));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user