using DevExpress.Mvvm; using DevExpress.XtraBars.Docking2010.Views.WindowsUI; using DevExpress.XtraRichEdit.Commands; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BeWo.ViewModel.View.AI { public class AiPromptbausteinActionResultViewModel : DialogViewModel { public event EventHandler Accept_Button_Clicked; public event EventHandler Cancel_Button_Clicked; public event EventHandler Retry_Button_Clicked; public event EventHandler Replace_Button_Clicked; public AiPromptbausteinActionResultViewModel() : base() { AcceptCommand = new DelegateCommand(Accept, canAccept, false); CancelCommand = new DelegateCommand(Cancel, canCancel, false); RetryCommand = new DelegateCommand(Retry, canRetry, false); ReplaceCommand = new DelegateCommand(Replace, canReplace, false); } public DelegateCommand AcceptCommand { get; set; } public DelegateCommand CancelCommand { get; set; } public DelegateCommand RetryCommand { get; set; } public DelegateCommand ReplaceCommand { get; set; } public string Result { get; set; } public void Accept() { Close(); Accept_Button_Clicked?.Invoke(this, EventArgs.Empty); } public void Cancel() { Close(); Cancel_Button_Clicked?.Invoke(this, EventArgs.Empty); } public void Retry() { Close(); Retry_Button_Clicked?.Invoke(this, EventArgs.Empty); } public void Replace() { Close(); Replace_Button_Clicked?.Invoke(this, EventArgs.Empty); } private bool canAccept() { return true; } private bool canCancel() { return true; } private bool canRetry() { return true; } private bool canReplace() { return true; } } }