summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs')
-rw-r--r--Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs b/Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs
new file mode 100644
index 0000000..fb4891a
--- /dev/null
+++ b/Decompiler/Gestor.Application.ViewModels.Command/RelayCommand.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Windows.Input;
+
+namespace Gestor.Application.ViewModels.Command;
+
+public class RelayCommand : ICommand
+{
+ private Action mAction;
+
+ public event EventHandler CanExecuteChanged = delegate
+ {
+ };
+
+ public RelayCommand(Action action)
+ {
+ mAction = action;
+ }
+
+ public bool CanExecute(object parameter)
+ {
+ return true;
+ }
+
+ public void Execute(object parameter)
+ {
+ mAction();
+ }
+}