27 lines
876 B
C#
27 lines
876 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using eSuite.WorkBench.Services;
|
|
using eSuite.WorkBench.WpfHelper;
|
|
|
|
namespace eSuite.WorkBench.Commands;
|
|
|
|
public class ClearFeedBackCommand : AsyncCommandBase
|
|
{
|
|
private readonly MainWindowViewModel _mainWindowViewModel;
|
|
private readonly ICommandsService _commandService;
|
|
|
|
public ClearFeedBackCommand(MainWindowViewModel mainWindowViewModel, ICommandsService commandsService, Action<Exception> onException, EventHandler<FeedbackEventArgs> addFeedbackMessage) : base(onException)
|
|
{
|
|
FeedbackMessage += addFeedbackMessage;
|
|
_mainWindowViewModel = mainWindowViewModel;
|
|
_commandService = commandsService;
|
|
IsEnabled = true;
|
|
}
|
|
|
|
protected override Task ExecuteAsync(object parameter)
|
|
{
|
|
_mainWindowViewModel.FeedbackOutput = "";
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
} |