Gui neu angelegt
This commit is contained in:
24
StammGenerator/Commands/ProjektSelectCommand.cs
Normal file
24
StammGenerator/Commands/ProjektSelectCommand.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using StammGenerator.Commands;
|
||||
using StammGenerator.ViewModel;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StammGenerator.Commands
|
||||
{
|
||||
internal class ProjektSelectCommand : AsyncCommandBase
|
||||
{
|
||||
private readonly IActualState _actualState;
|
||||
private readonly ProjektListViewModel _projektListViewModel;
|
||||
|
||||
public ProjektSelectCommand(IActualState actualState, ProjektListViewModel projektListViewModel)
|
||||
{
|
||||
_actualState = actualState;
|
||||
_projektListViewModel = projektListViewModel;
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
if (_projektListViewModel.SelectedProjekt == null) return;
|
||||
_actualState.SetProjekt(_projektListViewModel.SelectedProjekt);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user