76 lines
1.9 KiB
C#
76 lines
1.9 KiB
C#
using BeWo.View.Windows;
|
|
using BeWo.ViewModel.View.AI;
|
|
using BeWo.ViewModel;
|
|
using BeWo.ViewModel.Light;
|
|
using BS.Shared;
|
|
using DevExpress.Mvvm.Native;
|
|
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
|
|
{
|
|
public class BeWoWindowFactory
|
|
{
|
|
private Dictionary<AiActionType, string> _UIContext2Header = new Dictionary<AiActionType, string>()
|
|
{
|
|
{AiActionType.ServiceRecordConversation, "KI Chat: Zeiterfassung" },
|
|
{AiActionType.ServiceRecordDocumentation, "KI Doku: Zeiterfassung" }
|
|
};
|
|
|
|
public Control GetModalViewWindow(string title, Control control, double height = 600, double width = 1200)
|
|
{
|
|
var popup = new GroupBox();
|
|
|
|
popup.Style = Application.Current.FindResource("PopUpWindowStyle") as Style;
|
|
popup.Header = title;
|
|
popup.Content = control;
|
|
popup.Height = height;
|
|
popup.Width = width;
|
|
|
|
return popup;
|
|
}
|
|
|
|
public AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double? height = 600, double? width = 1200)
|
|
{
|
|
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 string GetGkvTitle(GkvAbrechnungLightVM vm)
|
|
{
|
|
return "GKV-Abrechnung Nr. " + vm.Oid;
|
|
}
|
|
|
|
public string GetAiTitle(AiActionType actionType)
|
|
{
|
|
if (_UIContext2Header.TryGetValue(actionType, out string str))
|
|
return str;
|
|
|
|
return "default";
|
|
}
|
|
}
|
|
}
|