Files
BeWoPlaner/BeWo/ViewModel/View/AI/AiPromptbausteinSelectionViewModel.cs
Rene Evertz 2832bb9c5e Merge branch 'master' into feature_rene_18_ai - kein kommentar...
# Conflicts:
#	BeWo/BeWo.csproj
#	BeWo/BeWoApp.xaml.cs
#	BeWo/ServiceProxy/GeneratedAiEnhancedService.cs
#	BeWo/Services/BeWoControlFactory.cs
#	BeWo/Services/BeWoWindowFactory.cs
#	BeWo/Services/BeWoWindowService.cs
#	BeWo/Services/IControlFactory.cs
#	BeWo/Services/IWindowFactory.cs
#	BeWo/Services/IWindowService.cs
#	BeWo/View/BeWoFileView.xaml
#	BeWo/View/Detail/Report/AbwesenheitsView.xaml
#	BeWo/View/Windows/AnimatedBeWoWindow.xaml.cs
#	BeWo/app.config
#	BeWoAllReports.sln
#	BeWoPlanerMobil.sln
#	BeWoPlanerMobil/.vs/BeWoPlanerMobil.csproj.dtbcache.json
#	BeWoTests.sln
#	Dakota/DakotaUtils.cs
#	Dakota/Logic/DakotaInfoCreator.cs
#	Dakota/Models/DakotaFile.cs
#	Data/Access/GenericDAO.cs
#	Data/Access/SearchDAO.cs
#	Data/Data.csproj
#	Host/Web.config
#	Server/Components/ServerUtils/ApiFacade/WebClientFacade.cs
#	Service/BeWoServiceEnums.cs
#	Service/Core/ServiceHelper.cs
#	Service/Core/ServiceValidator.cs
#	Service/Extensions/ServiceEnumExtension.cs
#	Service/Service.csproj
#	Service/ServiceContracts/Enhanced/IAiEnhancedService.cs
#	Service/ServiceContracts/Enhanced/IOperationsEnhancedService.cs
#	Service/ServiceImplementations/EmployeeServiceImp.cs
#	Service/ServiceImplementations/Enhanced/AiEnhancedServiceImp.cs
#	Service/ServiceImplementations/Enhanced/OperationsEnhancedServiceImp.cs
#	Service/ServiceProxy/OpenWebUIFacade.cs
#	Service/ServiceProxy/ServiceFacade.cs
#	Service/ServiceUtils/DistanceCalculator/GoogleDistanceMatrixAPI.cs
#	Shared/BeWoEntityEnums.cs
#	Shared/Core/AppError.cs
#	Shared/Core/Facade/WebClientFacade.cs
#	Shared/Core/WebClientFacade.cs
#	Shared/Shared.csproj
2025-11-28 12:07:35 +01:00

57 lines
1.3 KiB
C#

using BeWo.ServiceProxy;
using BeWo.Services;
using BeWo.ViewModel.ListViewModel;
using BeWo.ViewModel.View.Dialogs;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Input;
namespace BeWo.ViewModel.View.AI
{
public class AiPromptbausteinSelectionViewModel : BaseDialogViewModel
{
public AiPromptbausteinSelectionViewModel()
{
Func<bool> isPrompt = () => SelectedNode is object && !SelectedNode.IsKategorie;
SendCommand = new DelegateCommand(Send, isPrompt);
if (BeWoApp.IsInDesignMode)
{
ListVM = new AiPromptbausteinTreeListVM();
}
}
public AiPromptbausteinSelectionViewModel(AiPromptbausteinTreeListVM viewModel) : this()
{
ListVM = viewModel;
}
public event EventHandler<AiPromptbausteinTreeVM> PromptAccepted;
public AiPromptbausteinTreeVM SelectedNode { get; set; }
public AiPromptbausteinTreeListVM ListVM { get; private set; }
public ICommand SendCommand { get; set; }
public void Send()
{
CloseDialogCommand.Execute(null);
PromptAccepted?.Invoke(this, SelectedNode);
}
public void UpdateVMList(AiPromptbausteinTreeListVM new_list)
{
ListVM = new_list;
FirePropertyChanged(nameof(ListVM));
}
}
}