diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 7246f1dd3..42093a7fa 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -173,6 +173,8 @@
+
+
@@ -219,6 +221,9 @@
DatenbereinigungView.xaml
+
+ DeveloperView.xaml
+
TeamFolderRightView.xaml
@@ -371,6 +376,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 1c526e7e4..bf48c71a8 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -37,6 +37,7 @@ using DevExpress.XtraScheduler;
using System.ServiceModel;
using BeWo.View.Windows;
using System.Diagnostics;
+using BeWo.Services;
namespace BeWo
{
@@ -81,6 +82,8 @@ namespace BeWo
public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject());
+ internal static IBeWoWindowService WindowService { get; set; }
+
public static EmployeeDC LoggedOnEmployee
{
get => _LoggedOnEmployee;
@@ -1083,16 +1086,11 @@ namespace BeWo
FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
- BeWoAppInfo.BeWoAppVersion.TryActiveDeveloperMode(e.Args);
+ var controlFactory = new BeWoControlFactory();
+ var windowFactory = new BeWoWindowFactory();
+ WindowService = new BeWoWindowService(windowFactory, controlFactory);
- //if(e.Args.LastOrDefault(x => x.StartsWith("/timeout:") || x.StartsWith("--timeout:")) is string str)
- //{
- // var valuePart = str.Substring(str.IndexOf(':') + 1);
- // if(int.TryParse(valuePart, out int parsedTimeout))
- // {
- // AiTimeout = parsedTimeout;
- // }
- //}
+ BeWoAppInfo.BeWoAppVersion.TryActiveDeveloperMode(e.Args);
}
public static void ShowInfoMessage(string message)
diff --git a/BeWo/Converter/TestDebugConverter.cs b/BeWo/Converter/TestDebugConverter.cs
index d428f40b1..a44afd236 100644
--- a/BeWo/Converter/TestDebugConverter.cs
+++ b/BeWo/Converter/TestDebugConverter.cs
@@ -1,4 +1,5 @@
using BeWo.ViewModel;
+using DevExpress.Mvvm;
using System;
using System.Globalization;
using System.Windows.Data;
@@ -12,6 +13,8 @@ namespace BeWo.Converter
if (value is null)
return null;
+ var t = ((DelegateCommand)value).CanExecute(null);
+
return value;
}
diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs
index 4b82cedc8..4bd0935f8 100644
--- a/BeWo/DebugConfig.cs
+++ b/BeWo/DebugConfig.cs
@@ -53,6 +53,8 @@ namespace BeWo
public bool EnableAutoRemoteDebugging { get; set; }
public bool EnableAllUserRightsInDebug { get; set; } = false;
+ public bool EnableDeveloperView { get; set; } = false;
+
public static DebugConfig SimpleAutoLogin => new DebugConfig()
{
DebugConfigMode = DebugConfigMode.SimpleAutoLogin,
@@ -152,7 +154,8 @@ namespace BeWo
//DefaultLoginUsername = "m1",
//DefaultLoginPassword = "bewobewo",
//DefaultProfilename = "5000000000",
- EnableAutoRemoteDebugging = true
+ EnableAutoRemoteDebugging = true,
+ EnableDeveloperView = true
});
name2config.Add("FeatureXRechnung",
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index 62539f6d8..51863271c 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -192,11 +192,16 @@ namespace BeWo
UpdateMandator();
- var controlFactory = new BeWoControlFactory();
- var windowFactory = new BeWoWindowFactory();
- WindowService = new BeWoWindowService(windowFactory, controlFactory);
+#if DEBUG
+ if (DebugConfig.CurrentConfig is DebugConfig config && config.EnableDeveloperView)
+ {
+ WindowService.ShowDeveloper();
+ }
+#endif
}
+ public IBeWoWindowService WindowService => BeWoApp.WindowService;
+
private AnimatedBeWoWindow _CurrentAnimatedBeWoWindow;
public AnimatedBeWoWindow CurrentAnimatedBeWoWindow
{
@@ -217,8 +222,6 @@ namespace BeWo
}
}
- internal IBeWoWindowService WindowService { get; set; }
-
public List OpenedModalViewWindows { get; set; }
internal Dictionary Views
diff --git a/BeWo/Services/BeWoWindowService.cs b/BeWo/Services/BeWoWindowService.cs
index f4bf4b8bb..efed9b5cc 100644
--- a/BeWo/Services/BeWoWindowService.cs
+++ b/BeWo/Services/BeWoWindowService.cs
@@ -23,6 +23,10 @@ using System.Windows.Controls.Primitives;
using static DevExpress.XtraPrinting.Native.ExportOptionsPropertiesNames;
using DevExpress.Mvvm.Native;
using BeWo.ViewModel.View.Gkv;
+using BeWo.ViewModel.View.Developer;
+using BeWo.View.Developer;
+using System.Windows.Forms;
+using static DevExpress.Mvvm.Native.Either;
namespace BeWo.Services
{
@@ -78,7 +82,7 @@ namespace BeWo.Services
}
}
- public void ShowAiConversationWindow(AiConversationChatViewModel viewModel)
+ private void ShowAiConversationWindow(AiConversationChatViewModel viewModel)
{
var control = _controlFactory.GetAiConversationControl(viewModel);
var title = _windowFactory.GetAiTitle(viewModel.ActionType);
@@ -89,7 +93,7 @@ namespace BeWo.Services
};
Show(title, control, viewModel, options);
}
- public void ShowAiPromptbausteinFolderWindow(AiPromptbausteinFolderViewModel viewModel)
+ private void ShowAiPromptbausteinFolderWindow(AiPromptbausteinFolderViewModel viewModel)
{
var control = new AiPromptbausteinFolderView(viewModel);
var options = new BeWoWindowOptions()
@@ -99,7 +103,7 @@ namespace BeWo.Services
};
Show("KI Promptbaustein Ordner", control, viewModel, options);
}
- public void ShowAiPromptbausteinPromptWindow(AiPromptbausteinPromptViewModel viewModel)
+ private void ShowAiPromptbausteinPromptWindow(AiPromptbausteinPromptViewModel viewModel)
{
var control = new AiPromptbausteinPromptView(viewModel);
var options = new BeWoWindowOptions()
@@ -109,7 +113,7 @@ namespace BeWo.Services
};
Show("KI Promptbaustein Prompt", control, viewModel, options);
}
- public void ShowAiPromptbausteinRoutineWindow(AiPromptbausteinRoutineViewModel viewModel)
+ private void ShowAiPromptbausteinRoutineWindow(AiPromptbausteinRoutineViewModel viewModel)
{
var control = new AiPromptbausteinRoutineView(viewModel);
var options = new BeWoWindowOptions()
@@ -119,7 +123,7 @@ namespace BeWo.Services
};
Show("KI Promptbaustein Routine", control, viewModel, options);
}
- public void ShowAiPromptbausteinActionResultWindow(AiPromptbausteinActionResultViewModel viewModel)
+ private void ShowAiPromptbausteinActionResultWindow(AiPromptbausteinActionResultViewModel viewModel)
{
var control = new AiPromptbausteinActionResultView(viewModel);
var options = new BeWoWindowOptions()
@@ -130,7 +134,7 @@ namespace BeWo.Services
Show("KI Promptbaustein Ergebnis", control, viewModel, options);
}
- public void ShowAiPromptbausteinSelectionComplexWindow(AiPromptbausteinSelectionComplexViewModel viewModel)
+ private void ShowAiPromptbausteinSelectionComplexWindow(AiPromptbausteinSelectionComplexViewModel viewModel)
{
var control = new AiPromptbausteinComplexSelectionView(viewModel);
var options = new BeWoWindowOptions()
@@ -140,7 +144,45 @@ namespace BeWo.Services
};
Show("KI Promptbaustein Auswahl", control, viewModel, options);
}
-
+
+#if DEBUG
+ public void ShowDeveloper(DeveloperViewModel viewModel = null)
+ {
+ if(viewModel == null)
+ viewModel = new DeveloperViewModel();
+
+ var control = new DeveloperView(viewModel);
+
+ var window = new Window();
+
+ window.Title = "Developer Informations";
+ window.Content = control;
+ window.Height = 600;
+ window.Width = 800;
+ window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ window.Topmost = true;
+ window.Deactivated += (s, e) =>
+ {
+ window.Topmost = false; // set topmost false first
+ window.Topmost = true; // then set topmost true again.
+ };
+
+ var screens = Screen.AllScreens;
+ var firstSecondary = screens.LastOrDefault(s => s.Primary == false);
+ if (firstSecondary != null)
+ {
+ window.WindowStartupLocation = WindowStartupLocation.Manual;
+ // Ensure Window is minimized on creation
+ window.WindowState = WindowState.Minimized;
+ // Define Position on Secondary screen, for "Normal" window-mode
+ // ( Here Top/Left-Position )
+ window.Left = firstSecondary.Bounds.Left;
+ window.Top = firstSecondary.Bounds.Top;
+ }
+
+ window.Show();
+ }
+#endif
public void ShowGkvAbrechnungDetailWindow(GkvAbrechnungDialogViewModel vm)
{
@@ -179,7 +221,7 @@ namespace BeWo.Services
Show(title, control, null, pOptions);
}
- private void Show(string title, Control control, WindowViewModel windowViewModel, BeWoWindowOptions options)
+ private void Show(string title, System.Windows.Controls.Control control, WindowViewModel windowViewModel, BeWoWindowOptions options)
{
if (options.ShowAsModal)
{
diff --git a/BeWo/Services/IBeWoWindowService.cs b/BeWo/Services/IBeWoWindowService.cs
index b64ea2caa..6338cd40a 100644
--- a/BeWo/Services/IBeWoWindowService.cs
+++ b/BeWo/Services/IBeWoWindowService.cs
@@ -1,8 +1,10 @@
-using BeWo.ViewModel;
+using BeWo.View.Developer;
+using BeWo.ViewModel;
using BeWo.ViewModel.Light;
using BeWo.ViewModel.View;
using BeWo.ViewModel.View.Administration;
using BeWo.ViewModel.View.AI;
+using BeWo.ViewModel.View.Developer;
using BeWo.ViewModel.View.Gkv;
using BS.Shared;
using System;
@@ -20,7 +22,6 @@ namespace BeWo.Services
public interface IBeWoWindowService
{
#region special
- void ShowAiConversationWindow(AiConversationChatViewModel viewModel);
void ShowGkvAbrechnungDetailWindow(GkvAbrechnungDialogViewModel vm);
#endregion
@@ -34,5 +35,9 @@ namespace BeWo.Services
#endregion
void Show(T windowViewModel) where T : WindowViewModel;
+
+#if DEBUG
+ void ShowDeveloper(DeveloperViewModel windowViewModel = null);
+#endif
}
}
diff --git a/BeWo/Styles/ControlStyles/ButtonStyles.xaml b/BeWo/Styles/ControlStyles/ButtonStyles.xaml
index 8cb76f064..8b60d1bf0 100644
--- a/BeWo/Styles/ControlStyles/ButtonStyles.xaml
+++ b/BeWo/Styles/ControlStyles/ButtonStyles.xaml
@@ -2,6 +2,7 @@
\ No newline at end of file
diff --git a/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml b/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml
index 65b0b5792..8595c2dc7 100644
--- a/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml
+++ b/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml
@@ -13,8 +13,10 @@
xmlns:view="clr-namespace:BeWo.View"
xmlns:vm="clr-namespace:BeWo.ViewModel"
x:Name="root"
+ Focusable="True"
+ Background="Transparent"
d:DataContext="{d:DesignInstance Type=administration:AiPromptbausteinComplexTreeViewModel,
- IsDesignTimeCreatable=True}"
+ IsDesignTimeCreatable=True}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
@@ -29,6 +31,7 @@
TargetType="ListBoxItem" />
+
+
+
+
+
@@ -399,6 +407,7 @@
AllowDrop="True"
BorderThickness="1,0,0,1"
ContextMenuOpening="treeView_ContextMenuOpening"
+ Focusable="True"
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
ItemTemplate="{StaticResource ai_promptbaustein_folder_itemtemplate}"
ItemsSource="{Binding Folders.VMList, UpdateSourceTrigger=PropertyChanged}"
@@ -416,14 +425,14 @@
-
+ Modifiers="Ctrl" />-->
@@ -436,7 +445,7 @@