mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Server Monitor Changes
- removed old button click events and replaced with commands. - removed shutdown methods and added shutdown parameter to stop methods.
This commit is contained in:
parent
3f4cc944b7
commit
61991ac55f
12 changed files with 490 additions and 469 deletions
|
|
@ -31,10 +31,7 @@ namespace ServerManagerTool.Common.Lib
|
|||
/// <param name="canExecute">The execution status logic.</param>
|
||||
public RelayCommand(Action<T> execute, Predicate<T> canExecute)
|
||||
{
|
||||
if (execute == null)
|
||||
throw new ArgumentNullException("execute");
|
||||
|
||||
_execute = execute;
|
||||
_execute = execute ?? throw new ArgumentNullException("execute");
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +50,7 @@ namespace ServerManagerTool.Common.Lib
|
|||
{
|
||||
try
|
||||
{
|
||||
return _canExecute == null ? true : _canExecute((T)parameter);
|
||||
return _canExecute == null || _canExecute((T)parameter);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue