59 lines
1.5 KiB
C#
59 lines
1.5 KiB
C#
using BeWo.View.Detail.AI;
|
|
using BS.Shared;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using static BeWo.View.Windows.BeWoWindowBuilder;
|
|
|
|
namespace BeWo.View.Windows
|
|
{
|
|
public class AiWindowBuilder
|
|
{
|
|
public Dictionary<UIContext, string> UIContext2Header { get; set; } = new Dictionary<UIContext, string>()
|
|
{
|
|
{UIContext.ServiceRecord, "Zeiterfassung KI Chat" },
|
|
{UIContext.Customer, "Klienten Übersicht KI Chat" },
|
|
};
|
|
|
|
public Window GetAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> context, double height = 600, double width = 1200)
|
|
{
|
|
#if !DEBUG
|
|
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
|
return null;
|
|
#endif
|
|
|
|
string title = null;
|
|
|
|
UIContext2Header.TryGetValue(uIContext, out title);
|
|
|
|
if (string.IsNullOrEmpty(title))
|
|
title = "default";
|
|
|
|
var control = GetAiConversationControl(uIContext, context);
|
|
|
|
var window = GetAnimatedBeWoWindow(title, control, 400, height, 1000, 500, width, 1600);
|
|
|
|
return window;
|
|
}
|
|
|
|
public UserControl GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context)
|
|
{
|
|
#if !DEBUG
|
|
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
|
|
return null;
|
|
#endif
|
|
|
|
var control = new AiConversationChatView();
|
|
|
|
control.ViewModel.UIContext = (int)uIContext;
|
|
control.ViewModel.ContextBeWoObjects = context;
|
|
|
|
return control;
|
|
}
|
|
}
|
|
}
|