Erster Entwurf
This commit is contained in:
@@ -116,30 +116,47 @@
|
||||
<Compile Include="ServiceProxy\GeneratedStreamingService.cs" />
|
||||
<Compile Include="ServiceProxy\GeneratedUserService.cs" />
|
||||
<Compile Include="ServiceProxy\GeneratedValueListService.cs" />
|
||||
<Compile Include="Services\AiWindowService.cs" />
|
||||
<Compile Include="Services\BeWoControlFactory.cs" />
|
||||
<Compile Include="Services\BeWoWindowFactory.cs" />
|
||||
<Compile Include="Services\BeWoWindowService.cs" />
|
||||
<Compile Include="Services\IBeWoWindowService.cs" />
|
||||
<Compile Include="ViewModel\AddressVM.cs" />
|
||||
<Compile Include="ViewModel\AiConfigVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinFolderVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinPromptVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinTreeVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinPromptListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinFolderListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinTreeListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\TextModuleListVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinVM.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinDetailViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinComplexTreeViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinFolderViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinPromptViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Administration\AiPromptbausteinTreeViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\AI\AiConversationChatViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\AI\AiPromptbausteinSelectionViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Dialogs\BaseDialogViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\Dialogs\GkvAbrechnungDialogViewModel.cs" />
|
||||
<Compile Include="ViewModel\View\WindowViewModel.cs" />
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinPromptView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinPromptView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinFolderView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinFolderView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinDetailView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinDetailView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Core\WaitLayer3.xaml.cs">
|
||||
<DependentUpon>WaitLayer3.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinComplexTreeView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinComplexTreeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinTreeView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinTreeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -196,6 +213,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinPromptView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinFolderView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinDetailView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -204,6 +229,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinComplexTreeView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinTreeView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
12
BeWo/Services/AiWindowService.cs
Normal file
12
BeWo/Services/AiWindowService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Services
|
||||
{
|
||||
public class AiWindowService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,30 @@ namespace BeWo.Services
|
||||
_controlFactory = controlFactory;
|
||||
}
|
||||
|
||||
public void Show<T>(T windowViewModel) where T : WindowViewModel
|
||||
{
|
||||
if(windowViewModel is AiConversationChatViewModel viewModel)
|
||||
{
|
||||
ShowAiConversationWindow(viewModel);
|
||||
}
|
||||
else if (windowViewModel is AiPromptbausteinDetailViewModel viewModel2)
|
||||
{
|
||||
ShowAiPromptbausteinDetailWindow(viewModel2);
|
||||
}
|
||||
else if (windowViewModel is AiPromptbausteinFolderViewModel viewModel3)
|
||||
{
|
||||
ShowAiPromptbausteinFolderPopup(viewModel3);
|
||||
}
|
||||
else if(windowViewModel is AiPromptbausteinPromptViewModel viewModel4)
|
||||
{
|
||||
ShowAiPromptbausteinPromptPopup(viewModel4);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException($"type not implemented: {typeof(T)}");
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowAiConversationWindow(AiConversationChatViewModel viewModel)
|
||||
{
|
||||
var control = _controlFactory.GetAiConversationControl(viewModel);
|
||||
@@ -57,7 +81,6 @@ namespace BeWo.Services
|
||||
};
|
||||
Show(title, control, viewModel, options);
|
||||
}
|
||||
|
||||
public void ShowAiPromptbausteinDetailWindow(AiPromptbausteinDetailViewModel viewModel)
|
||||
{
|
||||
var control = new AiPromptbausteinDetailView(viewModel);
|
||||
@@ -68,7 +91,6 @@ namespace BeWo.Services
|
||||
};
|
||||
Show("KI Promptbaustein", control, viewModel, options);
|
||||
}
|
||||
|
||||
public void ShowAiPromptbausteinSelectionWindow(AiPromptbausteinSelectionViewModel viewModel)
|
||||
{
|
||||
var control = new AiPromptbausteinSelectionView(viewModel);
|
||||
@@ -79,6 +101,27 @@ namespace BeWo.Services
|
||||
};
|
||||
Show("KI Promptbaustein Auswahl", control, viewModel, options);
|
||||
}
|
||||
public void ShowAiPromptbausteinFolderPopup(AiPromptbausteinFolderViewModel viewModel)
|
||||
{
|
||||
var control = new AiPromptbausteinFolderView(viewModel);
|
||||
var options = new BeWoWindowOptions()
|
||||
{
|
||||
Height = 400,
|
||||
Width = 600
|
||||
};
|
||||
Show("KI Promptbaustein Ordner", control, viewModel, options);
|
||||
}
|
||||
public void ShowAiPromptbausteinPromptPopup(AiPromptbausteinPromptViewModel viewModel)
|
||||
{
|
||||
var control = new AiPromptbausteinPromptView(viewModel);
|
||||
var options = new BeWoWindowOptions()
|
||||
{
|
||||
Height = 400,
|
||||
Width = 600
|
||||
};
|
||||
Show("KI Promptbaustein Prompt", control, viewModel, options);
|
||||
}
|
||||
|
||||
|
||||
public void ShowGkvAbrechnungDetailWindow(GkvAbrechnungDialogViewModel vm)
|
||||
{
|
||||
@@ -116,7 +159,7 @@ namespace BeWo.Services
|
||||
var control = _controlFactory.GetPdfViewer(pdf);
|
||||
Show(title, control, null, pOptions);
|
||||
}
|
||||
|
||||
|
||||
private void Show(string title, Control control, WindowViewModel windowViewModel, BeWoWindowOptions options)
|
||||
{
|
||||
if (options.ShowAsModal)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using BeWo.View.Detail.AI;
|
||||
using BeWo.ViewModel;
|
||||
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.Dialogs;
|
||||
@@ -36,5 +36,7 @@ namespace BeWo.Services
|
||||
void ShowTextViewerWindow(string title, string text, BeWoWindowOptions pOptions = null);
|
||||
void ShowPdfViewerWindow(string title, MemoryStream pdf, BeWoWindowOptions pOptions = null);
|
||||
#endregion
|
||||
|
||||
void Show<T>(T windowViewModel) where T : WindowViewModel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,93 @@
|
||||
</TextBox>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<HierarchicalDataTemplate
|
||||
x:Key="ai_promptbaustein_folder_itemtemplate"
|
||||
DataType="{x:Type vm:AiPromptbausteinFolderVM}"
|
||||
ItemsSource="{Binding Path=SubFolders.VMList}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0,0,0,0"
|
||||
Padding="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight}"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
ToolTipService.ShowDuration="100000">
|
||||
<TextBox.ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding Path=Title, Mode=OneWay}" FontWeight="Bold" />
|
||||
<TextBox
|
||||
MaxWidth="500"
|
||||
Padding="3,1,0,0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Description}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<HierarchicalDataTemplate
|
||||
x:Key="ai_promptbaustein_prompt_itemtemplate"
|
||||
DataType="{x:Type vm:AiPromptbausteinPromptVM}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0,0,0,0"
|
||||
Padding="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="Medium"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
ToolTipService.ShowDuration="100000">
|
||||
<TextBox.ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding Path=Title, Mode=OneWay}" FontWeight="Bold" />
|
||||
<TextBox
|
||||
MaxWidth="500"
|
||||
Padding="3,1,0,0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Description}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -4,10 +4,10 @@
|
||||
x:Key="AiDesignsIconKIChatWeissOrange"
|
||||
Stretch="Uniform">
|
||||
<Canvas
|
||||
Name="svg15"
|
||||
Width="257.1"
|
||||
Height="255.97"
|
||||
Background="Transparent">
|
||||
Name="svg15"
|
||||
Width="257.1"
|
||||
Height="255.97"
|
||||
Background="Transparent">
|
||||
<Canvas.RenderTransform>
|
||||
<TranslateTransform X="0" Y="0" />
|
||||
</Canvas.RenderTransform>
|
||||
@@ -16,25 +16,25 @@
|
||||
<Canvas Name="g13">
|
||||
<Canvas Name="Ebene_1">
|
||||
<Path
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path6"
|
||||
Fill="#FF5F00">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path6"
|
||||
Fill="#FF5F00">
|
||||
<Path.Data>
|
||||
<PathGeometry Figures="M244.27 79.58c-.05-8.1-6.56-14.44-14.81-14.44h-9.01s-11.17 0-11.17 0c-8.93 0-17.87 0-26.8 0-8.13 0-14.78 6.39-14.81 14.23-.06 15.44-.11 31.89.03 48.3.05 5.88 3.11 10.38 8.86 13.04 2.61 1.2 5.31 1.2 7.9 1.18h.53s.08 0 .12 0v.08c-.02 2.53-.03 5.07-.03 7.61 0 2.43 0 4.85-.02 7.27-.02 2.52 1 4.26 3.04 5.17.75.34 1.51.5 2.25.5 1.3 0 2.56-.52 3.67-1.54l5.05-4.62c2.5-2.29 5.01-4.58 7.5-6.88 2.57-2.36 5.11-4.75 7.64-7.16.53-.5.89-.57 1.3-.55 1.2.09 2.41.16 3.61.16 12.81 0-3.34-.02 9.47-.07 1.46 0 3.15-.04 4.7-.47 6.85-1.88 10.95-7.19 10.99-14.21.08-18.35.08-33.48 0-47.61ZM195.38 136.66c-.06-3.01-2.31-5.2-5.34-5.21h-3.39c-1.41 0-2.81.01-4.22 0-2.46-.02-4.15-1.6-4.3-4.04-.04-.64-.04-1.28-.04-1.92v-.39s0-44.42 0-44.42c0-2.81.88-4.23 3.02-4.92.5-.16 1.12-.18 1.65-.18 25.12-.01 21.29-.01 46.4 0 3.09 0 4.72 1.64 4.72 4.72 0 15.49 0 30.97 0 46.46 0 3.02-1.69 4.69-4.77 4.69h-5.54c-12.92 0 3.1.01-9.82-.02h-.03c-2.08 0-3.73.65-5.19 2.03-3.5 3.32-7.05 6.58-10.6 9.85l-1.87 1.72c-.22.2-.45.4-.68.59v-5.45c0-1.17 0-2.35-.01-3.51Z" FillRule="NonZero" />
|
||||
</Path.Data>
|
||||
</Path>
|
||||
<Path
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path8"
|
||||
Fill="#FFFFFF">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path8"
|
||||
Fill="#FFFFFF">
|
||||
<Path.Data>
|
||||
<PathGeometry Figures="M128.82 78.96h17.82c1.87 0 3.39 1.52 3.39 3.39v105.12c0 1.87-1.52 3.39-3.39 3.39h-17.82c-1.87 0-3.39-1.52-3.39-3.39v-105.12c0-1.87 1.52-3.39 3.39-3.39Z" FillRule="NonZero" />
|
||||
</Path.Data>
|
||||
</Path>
|
||||
<Path
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path10"
|
||||
Fill="#FFFFFF">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Name="path10"
|
||||
Fill="#FFFFFF">
|
||||
<Path.Data>
|
||||
<PathGeometry Figures="M55.62 78.96h20.5c1.43 0 2.71.89 3.21 2.22l39.29 105.06c.84 2.24-.82 4.62-3.21 4.62h-18.16c-1.47 0-2.77-.93-3.24-2.32l-6.89-20.28c-.47-1.39-1.78-2.32-3.24-2.32h-36.97c-1.45 0-2.75.92-3.23 2.29l-7.17 20.35c-.48 1.37-1.78 2.29-3.23 2.29H15.75c-2.4 0-4.05-2.4-3.2-4.64l39.87-105.06c.5-1.33 1.78-2.21 3.2-2.21ZM55.76 147.61h19.35c2.35 0 4-2.31 3.24-4.54l-12.55-36.53h-.31l-12.95 36.49c-.79 2.23.86 4.57 3.23 4.57Z" FillRule="NonZero" />
|
||||
</Path.Data>
|
||||
|
||||
150
BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml
Normal file
150
BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml
Normal file
@@ -0,0 +1,150 @@
|
||||
<view:BeWoView
|
||||
x:Class="BeWo.View.Detail.AI.AiPromptbausteinComplexTreeView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:administration="clr-namespace:BeWo.ViewModel.View.Administration"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local1="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:view="clr-namespace:BeWo.View"
|
||||
xmlns:vm="clr-namespace:BeWo.ViewModel"
|
||||
d:DataContext="{d:DesignInstance Type=administration:AiPromptbausteinComplexTreeViewModel,
|
||||
IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<view:BeWoView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</view:BeWoView.Resources>
|
||||
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
|
||||
<GroupBox.Header>
|
||||
Aktuell definierte KI-Prompts
|
||||
</GroupBox.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="300" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Orientation="Horizontal" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<ToggleButton
|
||||
x:Name="EditToggleButton"
|
||||
Grid.Column="4"
|
||||
Width="157"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Content="Bearbeiten aktivieren"
|
||||
IsChecked="{Binding IsEditingMode}"
|
||||
ToolTip="Wenn der Bearbeiten Modus aktiviert ist, können Sie Elemente mit Drag und Drop verschieben"
|
||||
Visibility="Visible" />
|
||||
|
||||
<Button
|
||||
Style="{StaticResource ButtonPreviousStyle}"
|
||||
ToolTip="Letzte Änderung rückgängig machen"
|
||||
Visibility="Collapsed" />
|
||||
<Button
|
||||
Style="{StaticResource ButtonRedoStyle}"
|
||||
ToolTip="Nächste Änderung wiederholen"
|
||||
Visibility="Collapsed" />
|
||||
</StackPanel>
|
||||
|
||||
<GroupBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Header="Ordner"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<TreeView
|
||||
x:Name="treeView"
|
||||
MinHeight="100"
|
||||
Padding="4,16,4,16"
|
||||
AllowDrop="True"
|
||||
ContextMenuService.IsEnabled="{Binding IsChecked, ElementName=EditToggleButton}"
|
||||
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
|
||||
ItemTemplate="{StaticResource ai_promptbaustein_folder_itemtemplate}"
|
||||
ItemsSource="{Binding Folders.VMList, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewMouseDown="Grid_PreviewMouseDown"
|
||||
PreviewMouseRightButtonDown="OnPreviewMouseRightButtonDown"
|
||||
SelectedItemChanged="treeView_SelectedItemChanged"
|
||||
TreeViewItem.Selected="treeView_Selected">
|
||||
<TreeView.Resources>
|
||||
<Style x:Key="igoal_treeitemstyle" TargetType="TreeViewItem">
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding AddOrdnerCommand}" Header="Neu">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding EditPromptbausteinCommand}" Header="Bearbeiten">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding CopySinglePromptbausteinCommand}" Header="Einzelnes Element kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding CopyPromptbausteinCommand}" Header="Elementbaum kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PastePromptbausteinCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding DeletePromptbausteinCommand}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</TreeView.ContextMenu>
|
||||
</TreeView>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Header="Prompts"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<ListBox
|
||||
Padding="4,16,4,16"
|
||||
ItemContainerStyle="{StaticResource PhotoListBoxItem}"
|
||||
ItemTemplate="{StaticResource ai_promptbaustein_prompt_itemtemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.SubPrompts.VMList, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</view:BeWoView>
|
||||
106
BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml.cs
Normal file
106
BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Xpf.Accordion;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiPromptbausteinTreeView.xaml
|
||||
/// </summary>
|
||||
public partial class AiPromptbausteinComplexTreeView : BeWoView
|
||||
{
|
||||
public AiPromptbausteinComplexTreeView(AiPromptbausteinComplexTreeViewModel viewModel = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (viewModel == null )
|
||||
viewModel = new AiPromptbausteinComplexTreeViewModel(BeWoApp.MainControl.WindowService, BS.Shared.AiActionType.ServiceRecordConversation);
|
||||
|
||||
DataContext = ViewModel = viewModel;
|
||||
|
||||
Loaded += (s, e) => ViewModel.ReloadVMList();
|
||||
}
|
||||
|
||||
public AiPromptbausteinComplexTreeViewModel ViewModel { get; set; }
|
||||
|
||||
public override bool IsDirty => ViewModel is object && ViewModel.IsDirty;
|
||||
|
||||
protected override void Save() => ViewModel.SaveVMList();
|
||||
|
||||
private void OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
TreeViewItem treeViewItem = VisualUpwardSearch(e.OriginalSource as DependencyObject);
|
||||
|
||||
if (treeViewItem != null)
|
||||
{
|
||||
treeViewItem.Focus();
|
||||
e.Handled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if (ViewModel.SelectedFolder == null)
|
||||
return;
|
||||
|
||||
|
||||
_LastTreeViewItem.IsSelected = false;
|
||||
|
||||
treeView.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
static TreeViewItem VisualUpwardSearch(DependencyObject source)
|
||||
{
|
||||
while (source != null && !(source is TreeViewItem))
|
||||
source = VisualTreeHelper.GetParent(source);
|
||||
|
||||
return source as TreeViewItem;
|
||||
}
|
||||
|
||||
private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
if (ViewModel is null)
|
||||
return;
|
||||
|
||||
ViewModel.SelectedFolder = treeView.SelectedValue as AiPromptbausteinFolderVM;
|
||||
}
|
||||
|
||||
private void Grid_PreviewMouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
TreeViewItem treeViewItem = VisualUpwardSearch(e.OriginalSource as DependencyObject);
|
||||
|
||||
if (treeViewItem is null)
|
||||
return;
|
||||
|
||||
if (e.ClickCount == 2)
|
||||
{
|
||||
ViewModel.OpenEditFolderDialogCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private TreeViewItem _LastTreeViewItem;
|
||||
private void treeView_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_LastTreeViewItem = e.OriginalSource as TreeViewItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
93
BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml
Normal file
93
BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml
Normal file
@@ -0,0 +1,93 @@
|
||||
<UserControl
|
||||
x:Class="BeWo.View.Detail.AI.AiPromptbausteinFolderView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:comboboxes="clr-namespace:BeWo.View.Controls.ComboBoxes"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodel="clr-namespace:BeWo.ViewModel.View.Administration"
|
||||
Width="auto"
|
||||
Height="auto"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:AiPromptbausteinFolderViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid
|
||||
MaxWidth="700"
|
||||
Margin="2,0,2,10"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#eeeeee">
|
||||
<Grid Margin="8,4,8,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" MinWidth="80" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="3*" MinWidth="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0">Name</Label>
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
Text="{Binding Node.Displayname, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="{Binding PromptLabelDescription}" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
MaxLength="1024"
|
||||
Style="{StaticResource TextBoxNoticeLarge}"
|
||||
Text="{Binding Node.Content, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextWrapping="Wrap" />
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Content="Ersteller:" />
|
||||
<comboboxes:ComboBoxEmployeeSearch
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsEnabled="False"
|
||||
SelectedCompactEmployeeDC="{Binding Node.Creator}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0">Verborgen</Label>
|
||||
<dxe:CheckEdit
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsChecked="{Binding Node.IsOnlyForCreator}"
|
||||
IsEnabled="{Binding IsEditingMode, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Button
|
||||
Grid.Row="6"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="3,19,10,3"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding AddCommand}"
|
||||
Visibility="{Binding IsAdd, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
Speichern
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
32
BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml.cs
Normal file
32
BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
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.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiPromptbausteinFolderView.xaml
|
||||
/// </summary>
|
||||
public partial class AiPromptbausteinFolderView : UserControl
|
||||
{
|
||||
public AiPromptbausteinFolderView(AiPromptbausteinFolderViewModel vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DataContext = vm;
|
||||
}
|
||||
}
|
||||
}
|
||||
93
BeWo/View/Detail/AI/AiPromptbausteinPromptView.xaml
Normal file
93
BeWo/View/Detail/AI/AiPromptbausteinPromptView.xaml
Normal file
@@ -0,0 +1,93 @@
|
||||
<UserControl
|
||||
x:Class="BeWo.View.Detail.AI.AiPromptbausteinPromptView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:comboboxes="clr-namespace:BeWo.View.Controls.ComboBoxes"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodel="clr-namespace:BeWo.ViewModel.View.Administration"
|
||||
Width="auto"
|
||||
Height="auto"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:AiPromptbausteinPromptViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid
|
||||
MaxWidth="700"
|
||||
Margin="2,0,2,10"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#eeeeee">
|
||||
<Grid Margin="8,4,8,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" MinWidth="80" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="3*" MinWidth="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0">Name</Label>
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
Text="{Binding Node.Displayname, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="{Binding PromptLabelDescription}" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
MaxLength="1024"
|
||||
Style="{StaticResource TextBoxNoticeLarge}"
|
||||
Text="{Binding Node.Content, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextWrapping="Wrap" />
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Content="Ersteller:" />
|
||||
<comboboxes:ComboBoxEmployeeSearch
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsEnabled="False"
|
||||
SelectedCompactEmployeeDC="{Binding Node.Creator}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0">Verborgen</Label>
|
||||
<dxe:CheckEdit
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsChecked="{Binding Node.IsOnlyForCreator}"
|
||||
IsEnabled="{Binding IsEditingMode, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Button
|
||||
Grid.Row="6"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="3,19,10,3"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding AddCommand}"
|
||||
Visibility="{Binding IsAdd, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
Speichern
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
32
BeWo/View/Detail/AI/AiPromptbausteinPromptView.xaml.cs
Normal file
32
BeWo/View/Detail/AI/AiPromptbausteinPromptView.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
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.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiPromptbausteinPromptView.xaml
|
||||
/// </summary>
|
||||
public partial class AiPromptbausteinPromptView : UserControl
|
||||
{
|
||||
public AiPromptbausteinPromptView(AiPromptbausteinPromptViewModel vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DataContext = vm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,6 @@ using Size = System.Windows.Size;
|
||||
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
|
||||
using VerticalAlignment = System.Windows.VerticalAlignment;
|
||||
using DependencyObject = System.Windows.DependencyObject;
|
||||
using BeWo.View.Detail.AI;
|
||||
using BeWo.View.Windows;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.ViewModel.View.AI;
|
||||
|
||||
@@ -329,6 +329,21 @@
|
||||
Foreground="Black"
|
||||
Header="{markup:Translate AiPromptbausteine2}"
|
||||
Selected="Tabitem_Selected" />
|
||||
<dxa:AccordionItem
|
||||
Name="TabitemAiPromptbausteineComplexTree"
|
||||
Foreground="Black"
|
||||
Header="{markup:Translate AiPromptbausteine3}" >
|
||||
<dxa:AccordionItem
|
||||
Name="TabitemAiPromptbausteineComplexTree1"
|
||||
Foreground="Black"
|
||||
Header="{markup:Translate AiPromptbausteineServiceConversation}"
|
||||
Selected="Tabitem_Selected" />
|
||||
<dxa:AccordionItem
|
||||
Name="TabitemAiPromptbausteineComplexTree2"
|
||||
Foreground="Black"
|
||||
Header="{markup:Translate AiPromptbausteineServiceDocumentation}"
|
||||
Selected="Tabitem_Selected" />
|
||||
</dxa:AccordionItem>
|
||||
</dxa:AccordionItem>
|
||||
<dxa:AccordionItem Foreground="{StaticResource TabItemTextBrush}" Header="Sonstiges">
|
||||
<dxa:AccordionItem
|
||||
|
||||
@@ -18,6 +18,8 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using BeWo.View.Detail.AI;
|
||||
using BeWo.ViewModel.View.Administration;
|
||||
|
||||
namespace BeWo.View.Master
|
||||
{
|
||||
@@ -569,10 +571,18 @@ namespace BeWo.View.Master
|
||||
return;
|
||||
case nameof(TabitemAiPromptbausteine):
|
||||
VMFactory.CreateAiPromptbausteinListVMAsync(
|
||||
r => this.Dispatch(() => AddView(TabitemAiPromptbausteine, new Detail.AI.AiPromptbausteinView(r))));
|
||||
r => this.Dispatch(() => AddView(TabitemAiPromptbausteine, new AiPromptbausteinView(r))));
|
||||
return;
|
||||
case nameof(TabitemAiPromptbausteineTree):
|
||||
AddView(TabitemAiPromptbausteineTree, new Detail.AI.AiPromptbausteinTreeView());
|
||||
AddView(TabitemAiPromptbausteineTree, new AiPromptbausteinTreeView());
|
||||
return;
|
||||
case nameof(TabitemAiPromptbausteineComplexTree1):
|
||||
var vm11 = new AiPromptbausteinComplexTreeViewModel(BeWoApp.MainControl.WindowService, AiActionType.ServiceRecordConversation);
|
||||
AddView(TabitemAiPromptbausteineComplexTree1, new AiPromptbausteinComplexTreeView(vm11));
|
||||
return;
|
||||
case nameof(TabitemAiPromptbausteineComplexTree2):
|
||||
var vm12 = new AiPromptbausteinComplexTreeViewModel(BeWoApp.MainControl.WindowService, AiActionType.ServiceRecordDocumentation);
|
||||
AddView(TabitemAiPromptbausteineComplexTree2, new AiPromptbausteinComplexTreeView(vm12));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
118
BeWo/ViewModel/AiPromptbausteinFolderVM.cs
Normal file
118
BeWo/ViewModel/AiPromptbausteinFolderVM.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AiPromptbausteinFolderVM : AbstractDCMapperVM<AiPromptbausteinFolderDC>
|
||||
{
|
||||
private string _Title;
|
||||
private string _Description;
|
||||
private long? _ParentFolderOid;
|
||||
private long _CreatorOid;
|
||||
private bool _IsPrivate;
|
||||
private int _Position;
|
||||
private bool _IsExpanded;
|
||||
private AiActionType _ActionType;
|
||||
private AiPromptbausteinFolderListVM _SubFolders;
|
||||
private AiPromptbausteinPromptListVM _SubPrompts;
|
||||
|
||||
public AiPromptbausteinFolderVM(AiPromptbausteinFolderDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get => _Title;
|
||||
set => SetProperty(ref _Title, value, nameof(Title), () => DataContract.Title);
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => _Description;
|
||||
set => SetProperty(ref _Description, value, nameof(Description), () => DataContract.Description);
|
||||
}
|
||||
|
||||
public long? ParentFolderOid
|
||||
{
|
||||
get => _ParentFolderOid;
|
||||
set => SetProperty(ref _ParentFolderOid, value, nameof(ParentFolderOid), () => DataContract.ParentFolderOid);
|
||||
}
|
||||
|
||||
public long CreatorOid
|
||||
{
|
||||
get => _CreatorOid;
|
||||
set => SetProperty(ref _CreatorOid, value, nameof(CreatorOid), () => DataContract.CreatorOid);
|
||||
}
|
||||
|
||||
public bool IsPrivate
|
||||
{
|
||||
get => _IsPrivate;
|
||||
set => SetProperty(ref _IsPrivate, value, nameof(IsPrivate), () => DataContract.IsPrivate);
|
||||
}
|
||||
|
||||
public int Position
|
||||
{
|
||||
get => _Position;
|
||||
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get => _IsExpanded;
|
||||
set => SetProperty(ref _IsExpanded, value, nameof(IsExpanded), () => DataContract.IsExpanded);
|
||||
}
|
||||
|
||||
public AiActionType ActionType
|
||||
{
|
||||
get => _ActionType;
|
||||
set => SetProperty(ref _ActionType, value, nameof(ActionType), () => DataContract.ActionType);
|
||||
}
|
||||
|
||||
public AiPromptbausteinFolderListVM SubFolders
|
||||
{
|
||||
get => _SubFolders;
|
||||
set => SetProperty(ref _SubFolders, value, nameof(SubFolders));
|
||||
}
|
||||
|
||||
public AiPromptbausteinPromptListVM SubPrompts
|
||||
{
|
||||
get => _SubPrompts;
|
||||
set => SetProperty(ref _SubPrompts, value, nameof(SubPrompts));
|
||||
}
|
||||
|
||||
public FontWeight FontWeight => ParentFolderOid is null ? FontWeights.SemiBold : FontWeights.Medium;
|
||||
|
||||
protected override void InitByDataContract(AiPromptbausteinFolderDC pDataContract)
|
||||
{
|
||||
_Title = pDataContract.Title;
|
||||
_Description = pDataContract.Description;
|
||||
_ParentFolderOid = pDataContract.ParentFolderOid;
|
||||
_CreatorOid = pDataContract.CreatorOid;
|
||||
_IsPrivate = pDataContract.IsPrivate;
|
||||
_Position = pDataContract.Position;
|
||||
_IsExpanded = pDataContract.IsExpanded;
|
||||
_ActionType = pDataContract.ActionType;
|
||||
_SubFolders = new AiPromptbausteinFolderListVM(pDataContract.SubFolders);
|
||||
_SubPrompts = new AiPromptbausteinPromptListVM(pDataContract.SubPrompts);
|
||||
}
|
||||
|
||||
protected override AiPromptbausteinFolderDC MapToDataContract(AiPromptbausteinFolderDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Title = _Title;
|
||||
pDataContract.Description = _Description;
|
||||
pDataContract.ParentFolderOid = _ParentFolderOid;
|
||||
pDataContract.CreatorOid = _CreatorOid;
|
||||
pDataContract.IsPrivate = _IsPrivate;
|
||||
pDataContract.Position = _Position;
|
||||
pDataContract.ActionType = _ActionType;
|
||||
pDataContract.SubFolders = _SubFolders.CopyToDCList(doCommit);
|
||||
pDataContract.SubPrompts = _SubPrompts.CopyToDCList(doCommit);
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
125
BeWo/ViewModel/AiPromptbausteinPromptVM.cs
Normal file
125
BeWo/ViewModel/AiPromptbausteinPromptVM.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AiPromptbausteinPromptVM : AbstractDCMapperVM<AiPromptbausteinPromptDC>
|
||||
{
|
||||
private string _Title;
|
||||
private string _Description;
|
||||
private long _ParentFolderOid;
|
||||
private long _CreatorOid;
|
||||
private bool _IsPrivate;
|
||||
private int _Position;
|
||||
private string _Prompt;
|
||||
private bool _ShowPrompt;
|
||||
private bool _ShowPromptByTenant;
|
||||
private bool _IsOwnsoftPrompt;
|
||||
private string _OwnsoftRefLink;
|
||||
|
||||
public AiPromptbausteinPromptVM(AiPromptbausteinPromptDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get => _Title;
|
||||
set => SetProperty(ref _Title, value, nameof(Title), () => DataContract.Title);
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => _Description;
|
||||
set => SetProperty(ref _Description, value, nameof(Description), () => DataContract.Description);
|
||||
}
|
||||
|
||||
public long ParentFolderOid
|
||||
{
|
||||
get => _ParentFolderOid;
|
||||
set => SetProperty(ref _ParentFolderOid, value, nameof(ParentFolderOid), () => DataContract.ParentFolderOid);
|
||||
}
|
||||
|
||||
public long CreatorOid
|
||||
{
|
||||
get => _CreatorOid;
|
||||
set => SetProperty(ref _CreatorOid, value, nameof(CreatorOid), () => DataContract.CreatorOid);
|
||||
}
|
||||
|
||||
public bool IsPrivate
|
||||
{
|
||||
get => _IsPrivate;
|
||||
set => SetProperty(ref _IsPrivate, value, nameof(IsPrivate), () => DataContract.IsPrivate);
|
||||
}
|
||||
|
||||
public int Position
|
||||
{
|
||||
get => _Position;
|
||||
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
|
||||
}
|
||||
|
||||
public string Prompt
|
||||
{
|
||||
get => _Prompt;
|
||||
set => SetProperty(ref _Prompt, value, nameof(Prompt), () => DataContract.Prompt);
|
||||
}
|
||||
|
||||
public bool ShowPrompt
|
||||
{
|
||||
get => _ShowPrompt;
|
||||
set => SetProperty(ref _ShowPrompt, value, nameof(ShowPrompt), () => DataContract.ShowPrompt);
|
||||
}
|
||||
|
||||
public bool ShowPromptByTenant
|
||||
{
|
||||
get => _ShowPromptByTenant;
|
||||
set => SetProperty(ref _ShowPromptByTenant, value, nameof(ShowPromptByTenant), () => DataContract.ShowPromptByTenant);
|
||||
}
|
||||
|
||||
public bool IsOwnsoftPrompt
|
||||
{
|
||||
get => _IsOwnsoftPrompt;
|
||||
set => SetProperty(ref _IsOwnsoftPrompt, value, nameof(IsOwnsoftPrompt), () => DataContract.IsOwnsoftPrompt);
|
||||
}
|
||||
|
||||
public string OwnsoftRefLink
|
||||
{
|
||||
get => _OwnsoftRefLink;
|
||||
set => SetProperty(ref _OwnsoftRefLink, value, nameof(OwnsoftRefLink), () => DataContract.OwnsoftRefLink);
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiPromptbausteinPromptDC pDataContract)
|
||||
{
|
||||
_Title = pDataContract.Title;
|
||||
_Description = pDataContract.Description;
|
||||
_ParentFolderOid = pDataContract.ParentFolderOid;
|
||||
_CreatorOid = pDataContract.CreatorOid;
|
||||
_IsPrivate = pDataContract.IsPrivate;
|
||||
_Position = pDataContract.Position;
|
||||
_Prompt = pDataContract.Prompt;
|
||||
_ShowPrompt = pDataContract.ShowPrompt;
|
||||
_ShowPromptByTenant = pDataContract.ShowPromptByTenant;
|
||||
_IsOwnsoftPrompt = pDataContract.IsOwnsoftPrompt;
|
||||
_OwnsoftRefLink = pDataContract.OwnsoftRefLink;
|
||||
}
|
||||
|
||||
protected override AiPromptbausteinPromptDC MapToDataContract(AiPromptbausteinPromptDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Title = _Title;
|
||||
pDataContract.Description = _Description;
|
||||
pDataContract.ParentFolderOid = _ParentFolderOid;
|
||||
pDataContract.CreatorOid = _CreatorOid;
|
||||
pDataContract.IsPrivate = _IsPrivate;
|
||||
pDataContract.Position = _Position;
|
||||
pDataContract.Prompt = _Prompt;
|
||||
pDataContract.ShowPrompt = _ShowPrompt;
|
||||
pDataContract.ShowPromptByTenant = _ShowPromptByTenant;
|
||||
pDataContract.IsOwnsoftPrompt = _IsOwnsoftPrompt;
|
||||
pDataContract.OwnsoftRefLink = _OwnsoftRefLink;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
BeWo/ViewModel/ListViewModel/AiPromptbausteinFolderListVM.cs
Normal file
18
BeWo/ViewModel/ListViewModel/AiPromptbausteinFolderListVM.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class AiPromptbausteinFolderListVM : AbstractDCListMapperVM<AiPromptbausteinFolderDC, AiPromptbausteinFolderVM>
|
||||
{
|
||||
public AiPromptbausteinFolderListVM(IEnumerable<AiPromptbausteinFolderDC> pDataContracts = null) : base(pDataContracts)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
17
BeWo/ViewModel/ListViewModel/AiPromptbausteinPromptListVM.cs
Normal file
17
BeWo/ViewModel/ListViewModel/AiPromptbausteinPromptListVM.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class AiPromptbausteinPromptListVM : AbstractDCListMapperVM<AiPromptbausteinPromptDC, AiPromptbausteinPromptVM>
|
||||
{
|
||||
public AiPromptbausteinPromptListVM(IEnumerable<AiPromptbausteinPromptDC> pDataContracts = null) : base(pDataContracts)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Services;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using BS.Shared.Extensions.CustomInterfaces;
|
||||
using DevExpress.Xpf.Layout.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using DelegateCommand = DevExpress.Mvvm.DelegateCommand;
|
||||
|
||||
namespace BeWo.ViewModel.View.Administration
|
||||
{
|
||||
public class AiPromptbausteinComplexTreeViewModel : WindowViewModel
|
||||
{
|
||||
private AiPromptbausteinFolderVM _SelectedFolder;
|
||||
|
||||
private IBeWoWindowService WindowService { get; set; }
|
||||
private AiActionType AiActionType { get; set; }
|
||||
|
||||
public AiPromptbausteinFolderListVM Folders { get; set; }
|
||||
public AiPromptbausteinPromptVM SelectedPrompt { get; set; }
|
||||
public AiPromptbausteinFolderVM CopiedFolder { get; set; }
|
||||
|
||||
public ICommand OpenAddFolderDialogCommand { get; private set; }
|
||||
public ICommand OpenEditFolderDialogCommand { get; private set; }
|
||||
public ICommand CopyFolderCommand { get; private set; }
|
||||
public ICommand PasteFolderCommand { get; private set; }
|
||||
public ICommand DeleteFolderCommand { get; private set; }
|
||||
|
||||
public ICommand OpenAddPromptDialogCommand { get; private set; }
|
||||
public ICommand OpenEditPromptDialogCommand { get; private set; }
|
||||
public ICommand CopyPromptCommand { get; private set; }
|
||||
public ICommand PastePromptCommand { get; private set; }
|
||||
public ICommand DeletePromptCommand { get; private set; }
|
||||
|
||||
public AiPromptbausteinFolderVM SelectedFolder
|
||||
{
|
||||
get => _SelectedFolder;
|
||||
set => SetProperty(ref _SelectedFolder, value, nameof(SelectedFolder));
|
||||
}
|
||||
|
||||
public AiPromptbausteinComplexTreeViewModel()
|
||||
{
|
||||
if (BeWoApp.IsInDesignMode)
|
||||
{
|
||||
AiActionType = AiActionType.ServiceRecordConversation;
|
||||
ReloadVMList();
|
||||
return;
|
||||
}
|
||||
|
||||
OpenAddFolderDialogCommand = new DelegateCommand(OpenAddFolderDialog, CanOpenAddFolderDialog, false);
|
||||
OpenEditFolderDialogCommand = new DelegateCommand(OpenEditFolderDialog, CanOpenEditFolderDialog, false);
|
||||
CopyFolderCommand = new DelegateCommand(CopyFolder, CanCopyFolder, false);
|
||||
PasteFolderCommand = new DelegateCommand(PasteFolder, CanPasteFolder, false);
|
||||
DeleteFolderCommand = new DelegateCommand(DeleteFolder, CanDeleteFolder, false);
|
||||
}
|
||||
|
||||
public AiPromptbausteinComplexTreeViewModel(IBeWoWindowService windowService, AiActionType aiActionType) : this()
|
||||
{
|
||||
WindowService = windowService;
|
||||
AiActionType = aiActionType;
|
||||
}
|
||||
|
||||
public override bool IsDirty
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveVMList()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
internal void ReloadVMList()
|
||||
{
|
||||
var folders_dc = PredefinedAiPromptbausteinFolders.CreateSubTree(AiActionType);
|
||||
|
||||
Folders = new AiPromptbausteinFolderListVM(folders_dc);
|
||||
|
||||
FirePropertyChanged(nameof(Folders));
|
||||
}
|
||||
public void UpdateVMList(AiPromptbausteinTreeListVM new_list)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OpenAddFolderDialog()
|
||||
{
|
||||
var vm = new AiPromptbausteinFolderViewModel();
|
||||
|
||||
WindowService.Show(vm);
|
||||
}
|
||||
void OpenEditFolderDialog()
|
||||
{
|
||||
|
||||
}
|
||||
void CopyFolder()
|
||||
{
|
||||
|
||||
}
|
||||
void PasteFolder()
|
||||
{
|
||||
|
||||
}
|
||||
void DeleteFolder()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CanOpenAddFolderDialog()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CanOpenEditFolderDialog()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool CanCopyFolder()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool CanPasteFolder()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool CanDeleteFolder()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.View.Administration
|
||||
{
|
||||
public class AiPromptbausteinFolderViewModel : BaseDialogViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using BeWo.ViewModel.View.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ViewModel.View.Administration
|
||||
{
|
||||
public class AiPromptbausteinPromptViewModel : BaseDialogViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
118
Shared/DataContracts/AiPromptbausteinFolderDC.cs
Normal file
118
Shared/DataContracts/AiPromptbausteinFolderDC.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using BS.Shared.Text;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class AiPromptbausteinFolderDC : BeWoDataContract
|
||||
{
|
||||
[DataMember] public string Title { get; set; }
|
||||
[DataMember] public string Description { get; set; }
|
||||
[DataMember] public long? ParentFolderOid { get; set; }
|
||||
[DataMember] public long CreatorOid { get; set; }
|
||||
[DataMember] public bool IsPrivate { get; set; }
|
||||
[DataMember] public int Position { get; set; }
|
||||
[DataMember] public bool IsExpanded { get; set; }
|
||||
[DataMember] public AiActionType ActionType { get; set; }
|
||||
[DataMember] public List<AiPromptbausteinFolderDC> SubFolders { get; set; }
|
||||
[DataMember] public List<AiPromptbausteinPromptDC> SubPrompts { get; set; }
|
||||
}
|
||||
|
||||
public static class PredefinedAiPromptbausteinFolders
|
||||
{
|
||||
public static IEnumerable<AiPromptbausteinFolderDC> CreateSubTree(AiActionType aiActionType)
|
||||
{
|
||||
var example_node = CreateExampleNode(aiActionType);
|
||||
example_node.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
example_node.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
example_node.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
var own_bib = CreateOwnBibNode(aiActionType);
|
||||
own_bib.SubFolders.Add(example_node);
|
||||
example_node.ParentFolderOid = own_bib.Oid;
|
||||
own_bib.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
own_bib.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
own_bib.SubPrompts.Add(CreateExamplePrompt(aiActionType));
|
||||
var shared_bib = CreateSharedBibNode(aiActionType);
|
||||
var public_bib = CreatePublicBibNode(aiActionType);
|
||||
|
||||
return new List<AiPromptbausteinFolderDC>() {
|
||||
own_bib, shared_bib, public_bib
|
||||
};
|
||||
}
|
||||
|
||||
private static AiPromptbausteinFolderDC CreateOwnBibNode(AiActionType aiActionType)
|
||||
{
|
||||
return new AiPromptbausteinFolderDC()
|
||||
{
|
||||
ActionType = aiActionType,
|
||||
Description = AiPromptbausteineTexts.OwnBibNodeDescription,
|
||||
Oid = -1,
|
||||
ParentFolderOid = null,
|
||||
SubFolders = new List<AiPromptbausteinFolderDC>(),
|
||||
SubPrompts = new List<AiPromptbausteinPromptDC>(),
|
||||
Title = AiPromptbausteineTexts.OwnBibNodeTitle,
|
||||
Version = 1
|
||||
};
|
||||
}
|
||||
|
||||
private static AiPromptbausteinFolderDC CreateSharedBibNode(AiActionType aiActionType)
|
||||
{
|
||||
return new AiPromptbausteinFolderDC()
|
||||
{
|
||||
ActionType = aiActionType,
|
||||
Description = AiPromptbausteineTexts.SharedBibNodeDescription,
|
||||
Oid = -2,
|
||||
ParentFolderOid = null,
|
||||
SubFolders = new List<AiPromptbausteinFolderDC>(),
|
||||
SubPrompts = new List<AiPromptbausteinPromptDC>(),
|
||||
Title = AiPromptbausteineTexts.SharedBibNodeTitle,
|
||||
Version = 1
|
||||
};
|
||||
}
|
||||
|
||||
private static AiPromptbausteinFolderDC CreatePublicBibNode(AiActionType aiActionType)
|
||||
{
|
||||
return new AiPromptbausteinFolderDC()
|
||||
{
|
||||
ActionType = aiActionType,
|
||||
Description = AiPromptbausteineTexts.PublicBibNodeDescription,
|
||||
Oid = -3,
|
||||
ParentFolderOid = null,
|
||||
SubFolders = new List<AiPromptbausteinFolderDC>(),
|
||||
SubPrompts = new List<AiPromptbausteinPromptDC>(),
|
||||
Title = AiPromptbausteineTexts.PublicBibNodeTitle,
|
||||
Version = 1
|
||||
};
|
||||
}
|
||||
|
||||
private static AiPromptbausteinFolderDC CreateExampleNode(AiActionType aiActionType)
|
||||
{
|
||||
return new AiPromptbausteinFolderDC()
|
||||
{
|
||||
ActionType = aiActionType,
|
||||
Description = "Beispielbeschreibung",
|
||||
Oid = -4,
|
||||
ParentFolderOid = null,
|
||||
SubFolders = new List<AiPromptbausteinFolderDC>(),
|
||||
SubPrompts = new List<AiPromptbausteinPromptDC>(),
|
||||
Title = "Beispiel Ordner",
|
||||
Version = 1
|
||||
};
|
||||
}
|
||||
|
||||
private static AiPromptbausteinPromptDC CreateExamplePrompt(AiActionType aiActionType)
|
||||
{
|
||||
return new AiPromptbausteinPromptDC()
|
||||
{
|
||||
Oid = -5,
|
||||
Description = "Beispielbeschreibung",
|
||||
Title = "Beispieltitel",
|
||||
Prompt = "Beispielprompt",
|
||||
IsOwnsoftPrompt = true,
|
||||
OwnsoftRefLink = "https://help.bewoplaner.de/"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Shared/DataContracts/AiPromptbausteinPromptDC.cs
Normal file
21
Shared/DataContracts/AiPromptbausteinPromptDC.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class AiPromptbausteinPromptDC : BeWoDataContract
|
||||
{
|
||||
[DataMember] public string Title { get; set; }
|
||||
[DataMember] public string Description { get; set; }
|
||||
[DataMember] public long ParentFolderOid { get; set; }
|
||||
[DataMember] public long CreatorOid { get; set; }
|
||||
[DataMember] public bool IsPrivate { get; set; }
|
||||
[DataMember] public int Position { get; set; }
|
||||
[DataMember] public string Prompt { get; set; }
|
||||
[DataMember] public bool ShowPrompt { get; set; }
|
||||
[DataMember] public bool ShowPromptByTenant { get; set; }
|
||||
[DataMember] public bool IsOwnsoftPrompt { get; set; }
|
||||
[DataMember] public string OwnsoftRefLink { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -187,6 +187,8 @@
|
||||
<Compile Include="DataContracts\AdminService\AdminServiceSumResponseDetailDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\IAdminServiceDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\AdminServiceSumReqDC.cs" />
|
||||
<Compile Include="DataContracts\AiPromptbausteinFolderDC.cs" />
|
||||
<Compile Include="DataContracts\AiPromptbausteinPromptDC.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberRequestDC.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberResponseDC.cs" />
|
||||
<Compile Include="DataContracts\Person2TeamDC.cs" />
|
||||
@@ -579,6 +581,7 @@
|
||||
<Compile Include="Extensions\UIElementCollectionExtensions.cs" />
|
||||
<Compile Include="Services\SupportConceptService.cs" />
|
||||
<Compile Include="Settings\ApplicationSettings.cs" />
|
||||
<Compile Include="Text\AiPromptbausteineTexts.cs" />
|
||||
<Compile Include="Translation\ITranslator.cs" />
|
||||
<Compile Include="Translation\Translator.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
18
Shared/Text/AiPromptbausteineTexts.cs
Normal file
18
Shared/Text/AiPromptbausteineTexts.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Text
|
||||
{
|
||||
public static class AiPromptbausteineTexts
|
||||
{
|
||||
public static string OwnBibNodeTitle => "Eigene Bibliothek";
|
||||
public static string OwnBibNodeDescription => "Hier können Sie Ihre eigenen Prompts verwalten";
|
||||
public static string SharedBibNodeTitle => "Geteilt mit mir";
|
||||
public static string SharedBibNodeDescription => "Hier sehen Sie Prompts, welche von Ihren Kollegin";
|
||||
public static string PublicBibNodeTitle => "Öffentlich";
|
||||
public static string PublicBibNodeDescription => "Hier sehen Sie öffentliche Prompts";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user