summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Lepp <jlepp@arcresources.com>2010-10-18 13:52:26 -0600
committerJason Lepp <jlepp@arcresources.com>2010-10-18 13:52:26 -0600
commit07c518957ec11f336b7e3c8304b8eca20d4d6aba (patch)
tree1be4f601aaf3d24c5b533142f16c68725eba768b
parentf321ee8c3533ac6b086a2eb89b29afe42343a1fc (diff)
Small refactoring on SimpleCommand
-rw-r--r--src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs1
-rw-r--r--src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs9
2 files changed, 3 insertions, 7 deletions
diff --git a/src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs b/src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs
index 2e59e0d..78509f1 100644
--- a/src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs
+++ b/src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Windows.Input;
diff --git a/src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs b/src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs
index 904b000..97e5b48 100644
--- a/src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs
+++ b/src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs
@@ -5,12 +5,10 @@ namespace MVPtoMVVM.mvvm.viewmodels
public class SimpleCommand : IObservableCommand
{
private readonly Action command;
- private Func<bool> predicate;
+ private readonly Func<bool> predicate;
+ public event EventHandler CanExecuteChanged = (o, e) => { };
- public SimpleCommand(Action command): this(command, () => true)
- {
-
- }
+ public SimpleCommand(Action command): this(command, () => true) {}
public SimpleCommand(Action command, Func<bool> predicate)
{
@@ -33,6 +31,5 @@ namespace MVPtoMVVM.mvvm.viewmodels
CanExecuteChanged(this, EventArgs.Empty);
}
- public event EventHandler CanExecuteChanged = (o,e)=>{};
}
} \ No newline at end of file