Add project files.
This commit is contained in:
30
QuickMVVMSetup/AddCommand.cs
Normal file
30
QuickMVVMSetup/AddCommand.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace QuickMVVMSetup
|
||||
{
|
||||
public class AddCommand : ICommand
|
||||
{
|
||||
public event EventHandler? CanExecuteChanged;
|
||||
public MainVM assosiatedVM;
|
||||
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
assosiatedVM.AddPerson();
|
||||
}
|
||||
|
||||
public AddCommand(MainVM vm)
|
||||
{
|
||||
assosiatedVM = vm;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user