# Conflicts: # BeWo/ServiceProxy/Generated.cs # BeWo/Services/BeWoWindowService.cs # BeWo/View/Controls/GkvAbrechnungDetailControl.xaml.cs # BeWo/View/Windows/BeWoWindowBuilder.cs # Data/Data.csproj # Host/ServiceRecordPage.aspx.cs # Service/Core/ServiceHelper.cs # Service/Security/SecurityContextInitializer.cs # Service/ServiceBehavior/AdminMultitenancyContextInitializer.cs
84 lines
2.2 KiB
C#
84 lines
2.2 KiB
C#
using BeWo.View.Detail.AI;
|
|
using BeWo.View.Windows;
|
|
using BeWo.ViewModel;
|
|
using BeWo.ViewModel.Light;
|
|
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 System.Windows.Controls.Primitives;
|
|
|
|
namespace BeWo.Services
|
|
{
|
|
internal class BeWoWindowFactory : IWindowFactory
|
|
{
|
|
public AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double? height, double? width)
|
|
{
|
|
var beWoWindow = new AnimatedBeWoWindow();
|
|
|
|
if (height is double h)
|
|
beWoWindow.Height = h;
|
|
else
|
|
beWoWindow.Height = double.NaN;
|
|
|
|
if (width is double w)
|
|
beWoWindow.Width = w;
|
|
else
|
|
beWoWindow.Width = double.NaN;
|
|
|
|
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
|
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
|
beWoWindow.Title = title + " Fenster";
|
|
beWoWindow.rootGroupBox.Header = title;
|
|
beWoWindow.GroupBoxContent = control;
|
|
|
|
return beWoWindow;
|
|
}
|
|
|
|
public Control GetGenericModalViewWindow(string title, Control control, double? height , double? width)
|
|
{
|
|
var popup = new GroupBox();
|
|
|
|
popup.Style = Application.Current.FindResource("PopUpWindowStyle") as Style;
|
|
popup.Header = title;
|
|
popup.Content = control;
|
|
|
|
if(height is double h)
|
|
popup.Height = h;
|
|
|
|
if (width is double w)
|
|
popup.Width= w;
|
|
|
|
return popup;
|
|
}
|
|
|
|
public Dictionary<UIContext, string> UIContext2Header { get; set; } = new Dictionary<UIContext, string>()
|
|
{
|
|
{UIContext.ServiceRecord, "KI Chat: Zeiterfassung" },
|
|
{UIContext.Customer, "KI Chat: Klienten Übersicht" },
|
|
{UIContext.Person, "KI Chat: Personen Übersicht" },
|
|
{UIContext.Employee, "KI Chat: Mitarbeiter Übersicht" },
|
|
{UIContext.Organisation, "KI Chat: Organisation Übersicht" },
|
|
{UIContext.SupportConcept, "KI Chat: Hilfeplan Übersicht" },
|
|
{UIContext.CustomerSingle, "KI Chat: Klient" },
|
|
};
|
|
|
|
public string GetAiTitle(UIContext context)
|
|
{
|
|
if (UIContext2Header.TryGetValue(context, out string title))
|
|
return title;
|
|
|
|
return "default";
|
|
}
|
|
|
|
public string GetGkvTitle(GkvAbrechnungLightVM vm)
|
|
{
|
|
return "GKV-Abrechnung Nr. " + vm.Oid;
|
|
}
|
|
}
|
|
}
|