Files
BeWoPlaner/BeWo/ViewModel/View/AI/AiPromptbausteinActionResultViewModel.cs
Rene Evertz 5a34c0dc04 Prompt Result Fenster
+ Info nur bei Selected
+ Welche DCs sollen gespeichert werden
2026-01-09 14:47:01 +01:00

80 lines
1.7 KiB
C#

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;
}
}
}