72 lines
2.1 KiB
C#
72 lines
2.1 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;
|
|
|
|
namespace BeWo.Services
|
|
{
|
|
internal class BeWoControlFactory : IControlFactory
|
|
{
|
|
public Control GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context, long? reference_oid = null)
|
|
{
|
|
var styleString = getStyleString(uIContext);
|
|
var control = styleString is object ? new AiConversationChatView(styleString) : new AiConversationChatView();
|
|
|
|
control.ViewModel.UIContext = (int)uIContext;
|
|
control.ViewModel.ReferenceObjectOid = reference_oid;
|
|
control.ViewModel.ContextBeWoObjects = context;
|
|
|
|
return control;
|
|
}
|
|
|
|
private string getStyleString(UIContext uIContext) {
|
|
switch (uIContext)
|
|
{
|
|
case UIContext.SupportConcept: return "ModuleAiControlSupportConceptStyle";
|
|
case UIContext.Customer: return "ModuleAiControlCustomerStyle";
|
|
case UIContext.Person: return "ModuleAiControlPersonStyle";
|
|
case UIContext.Employee: return "ModuleAiControlEmployeeStyle";
|
|
case UIContext.Organisation: return "ModuleAiControlOrganisationStyle";
|
|
case UIContext.Team:
|
|
break;
|
|
case UIContext.Dokumente:
|
|
break;
|
|
case UIContext.User:
|
|
break;
|
|
case UIContext.UserGroup:
|
|
break;
|
|
case UIContext.Report:
|
|
break;
|
|
case UIContext.Scheduler:
|
|
break;
|
|
case UIContext.Wohnheim:
|
|
break;
|
|
case UIContext.Vertretungen:
|
|
break;
|
|
case UIContext.CustomerTeam:
|
|
break;
|
|
case UIContext.Scheduling:
|
|
break;
|
|
case UIContext.Finance:
|
|
break;
|
|
case UIContext.Administration:
|
|
break;
|
|
case UIContext.AiConversation:
|
|
break;
|
|
case UIContext.AiConversationPopup:
|
|
break;
|
|
case UIContext.ServiceRecord: return "ModuleAiControlZeiterfassungStyle";
|
|
case UIContext.CustomerSingle: return "ModuleAiControlCustomerStyle";
|
|
case UIContext.PersonSingle: return "ModuleAiControlPersonStyle";
|
|
case UIContext.EmployeeSingle: return "ModuleAiControlEmployeeStyle";
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
} |