Routine + Item Accepted
This commit is contained in:
@@ -48,7 +48,7 @@ namespace BeWo.View.Controls.AI
|
||||
|
||||
public event RoutedEventHandler OpenAiWindowClick;
|
||||
|
||||
public event EventHandler<AiPromptbausteinPromptVM> PromptAccepted;
|
||||
public event EventHandler<AbstractBaseVM> ItemAccepted;
|
||||
|
||||
public AiConversationButton()
|
||||
{
|
||||
@@ -176,12 +176,12 @@ namespace BeWo.View.Controls.AI
|
||||
VMFactory.CreateAiPromptbausteinFolderListVM(folders, (listvm) =>
|
||||
{
|
||||
var viewmodel = new AiPromptbausteinSelectionComplexViewModel(actionType, listvm);
|
||||
viewmodel.PromptAccepted += PromptAccepted;
|
||||
viewmodel.ItemAccepted += ItemAccepted;
|
||||
viewmodel.RequestClose += (s, e) => viewmodel.ResetSelection();
|
||||
AllPromptsViewModel = viewmodel;
|
||||
|
||||
var viewmodel2 = new AiPromptbausteinSelectionComplexViewModel(actionType, listvm, true);
|
||||
viewmodel2.PromptAccepted += PromptAccepted;
|
||||
viewmodel2.ItemAccepted += ItemAccepted;
|
||||
popup_promptbaustein_favoriten.Closed += (s, e) => viewmodel2.ResetSelection();
|
||||
var view2 = new AiPromptbausteinComplexSelectionFavoritenView(viewmodel2);
|
||||
viewmodel2.SelectedFolder = viewmodel2.Folders.VMList[0];
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BeWo.View.Controls.AI
|
||||
public static readonly DependencyProperty ActionTypeProperty =
|
||||
DependencyProperty.Register("ActionType", typeof(AiActionType), typeof(AiPromptbausteinButton), new PropertyMetadata(AiActionType.ServiceRecord, OnActionTypeChanged));
|
||||
|
||||
public event EventHandler<AiPromptbausteinPromptVM> PromptAccepted;
|
||||
public event EventHandler<AbstractBaseVM> ItemAccepted;
|
||||
|
||||
public AiPromptbausteinSelectionComplexViewModel AllPromptsViewModel { get; set; }
|
||||
|
||||
@@ -114,12 +114,12 @@ namespace BeWo.View.Controls.AI
|
||||
VMFactory.CreateAiPromptbausteinFolderListVM(folders, (listvm) =>
|
||||
{
|
||||
var viewmodel = new AiPromptbausteinSelectionComplexViewModel(actionType, listvm);
|
||||
viewmodel.PromptAccepted += PromptAccepted;
|
||||
viewmodel.ItemAccepted += ItemAccepted;
|
||||
viewmodel.RequestClose += (s, e) => viewmodel.ResetSelection();
|
||||
AllPromptsViewModel = viewmodel;
|
||||
|
||||
var viewmodel2 = new AiPromptbausteinSelectionComplexViewModel(actionType, listvm, true);
|
||||
viewmodel2.PromptAccepted += PromptAccepted;
|
||||
viewmodel2.ItemAccepted += ItemAccepted;
|
||||
popup_promptbaustein_favoriten.Closed += (s, e) => viewmodel2.ResetSelection();
|
||||
var view2 = new AiPromptbausteinComplexSelectionFavoritenView(viewmodel2);
|
||||
viewmodel2.SelectedFolder = viewmodel2.Folders.VMList[0];
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace BeWo.View.Detail.AI
|
||||
if (vm is null)
|
||||
return;
|
||||
|
||||
ViewModel.SelectedPrompt = vm;
|
||||
ViewModel.SelectedItem = vm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:local1="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
|
||||
xmlns:vm="clr-namespace:BeWo.ViewModel"
|
||||
d:DataContext="{d:DesignInstance Type=ai:AiPromptbausteinSelectionComplexViewModel,
|
||||
IsDesignTimeCreatable=True}"
|
||||
@@ -23,9 +24,342 @@
|
||||
<Style
|
||||
x:Key="PromptListBoxItem"
|
||||
BasedOn="{StaticResource PhotoListBoxItem}"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
</Style>
|
||||
TargetType="ListBoxItem" />
|
||||
<DataTemplate x:Key="AiPromptbausteinPromptItemTemplate" DataType="{x:Type vm:AiPromptbausteinPromptVM}">
|
||||
<Border
|
||||
Background="#09000000"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=dxe:ListBoxEdit}}">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.OpenAddPromptDialogCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Neuer Prompt">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.OpenEditPromptDialogCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Bearbeiten">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.ChangeFavoritenStatePromptCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="{Binding FavoritenHeader}">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Favorites32.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.CopyPromptCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.PastePromptCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.DeletePromptCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
|
||||
<Grid
|
||||
Margin="6"
|
||||
Background="Transparent"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
PreviewMouseDown="Grid_PreviewMouseDown_1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="6" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Grid.RowSpan="2"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Fill="White" />
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="2,0,0,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight, UpdateSourceTrigger=PropertyChanged}"
|
||||
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>
|
||||
<TextBlock
|
||||
x:Name="infobox"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type ListBoxItem}}" />
|
||||
<Binding Path="IsInfoVisible" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
<Hyperlink NavigateUri="{Binding OwnsoftRefLink}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||
(i)
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<Border
|
||||
x:Name="border1"
|
||||
Width="46"
|
||||
Margin="0,0,3,0"
|
||||
Padding="3"
|
||||
HorizontalAlignment="Left"
|
||||
Background="#EEEDFE"
|
||||
CornerRadius="7">
|
||||
<TextBlock
|
||||
Margin="1,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10"
|
||||
Text="Prompt"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
<TextBlock
|
||||
Margin="3,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10">
|
||||
Bearbeitet vor x Minuten
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="AiPromptbausteinRoutineItemTemplate" DataType="vm:AiPromptbausteinRoutineVM">
|
||||
<Border
|
||||
Background="#09000000"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=dxe:ListBoxEdit}}">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.OpenAddRoutineDialogCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Neue Routine">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.OpenEditRoutineDialogCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Bearbeiten">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="favorite2"
|
||||
Command="{Binding PlacementTarget.Tag.ChangeFavoritenStateRoutineCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
||||
Header="{Binding FavoritenHeader}">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Favorites32.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PlacementTarget.Tag.DeleteRoutineCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
<Grid
|
||||
Margin="6"
|
||||
Background="Transparent"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
PreviewMouseDown="Grid_PreviewMouseDown_2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="9" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Grid.RowSpan="2"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Fill="White" />
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0,0,0,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight, UpdateSourceTrigger=PropertyChanged}"
|
||||
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>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Margin="0,-1,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Border
|
||||
x:Name="border1"
|
||||
Width="46"
|
||||
Margin="0,0,3,0"
|
||||
Padding="3"
|
||||
HorizontalAlignment="Left"
|
||||
Background="#E1F5EE"
|
||||
CornerRadius="7">
|
||||
<TextBlock
|
||||
Margin="1,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10"
|
||||
Text="Routine"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
<TextBlock
|
||||
Margin="3,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0} Schritte">
|
||||
<Binding Path="Steps.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<ListBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Margin="3,9,3,3"
|
||||
AllowDrop="False"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Focusable="False"
|
||||
IsHitTestVisible="False"
|
||||
ItemsSource="{Binding Steps.VMList}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
x:Name="arrow"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Text="➔" />
|
||||
<Border
|
||||
x:Name="border1"
|
||||
Height="19"
|
||||
Margin="0"
|
||||
Padding="3"
|
||||
HorizontalAlignment="Left"
|
||||
Background="DarkGray"
|
||||
CornerRadius="7">
|
||||
<TextBlock
|
||||
Margin="3,0,3,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10"
|
||||
Text="{Binding PromptReference.Title, StringFormat={}✦ {0}}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource PreviousData}}" Value="{x:Null}">
|
||||
<Setter TargetName="arrow" Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<templateselectors:AiPromptbausteinFolderItemTemplateSelector
|
||||
x:Key="AiPromptbausteinFolderItemTemplateSelector"
|
||||
AiPromptbausteinPromptTemplate="{StaticResource AiPromptbausteinPromptItemTemplate}"
|
||||
AiPromptbausteinRoutineTemplate="{StaticResource AiPromptbausteinRoutineItemTemplate}" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
@@ -44,27 +378,31 @@
|
||||
<ColumnDefinition Width="2*" MinWidth="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox
|
||||
x:Name="groupBox1"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,7,0,0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="Ordner"
|
||||
Header="Bibliothek"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<TreeView
|
||||
x:Name="treeView"
|
||||
MinHeight="100"
|
||||
Padding="4,16,4,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="True"
|
||||
BorderThickness="1,0,0,1"
|
||||
ContextMenuOpening="treeView_ContextMenuOpening"
|
||||
ContextMenuService.IsEnabled="{Binding CanOpenContextMenu}"
|
||||
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">
|
||||
@@ -94,6 +432,17 @@
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding CopyFolderCommand}" Header="Kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PasteFolderCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding DeleteFolderCommand}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
@@ -104,203 +453,253 @@
|
||||
</TreeView>
|
||||
</GroupBox>
|
||||
<GridSplitter
|
||||
x:Name="splitter"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
HorizontalAlignment="Center"
|
||||
Background="#878890" />
|
||||
<GroupBox
|
||||
x:Name="groupbox2"
|
||||
<TabControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="Prompts"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="4,16,4,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ContextMenuService.IsEnabled="{Binding CanOpenContextMenu}"
|
||||
EditValue="{Binding SelectedPrompt, Mode=TwoWay}"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectionMode="Single">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neu">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding OpenEditPromptDialogCommand}" Header="Bearbeiten">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="favorite"
|
||||
Command="{Binding ChangeFavoritenStatePromptCommand}"
|
||||
Header="Favorit hinzufügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Favorites32.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding DeletePromptCommand}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
<dxe:ListBoxEdit.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Margin="0,3,0,0"
|
||||
Background="Transparent"
|
||||
PreviewMouseDown="Grid_PreviewMouseDown_1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight, UpdateSourceTrigger=PropertyChanged}"
|
||||
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>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Visibility="{Binding IsInfoVisible, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
<Hyperlink NavigateUri="{Binding OwnsoftRefLink}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||
(i)
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxe:ListBoxEdit.ItemTemplate>
|
||||
</dxe:ListBoxEdit>
|
||||
</GroupBox>
|
||||
Padding="0"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="0,1,1,1"
|
||||
SelectionChanged="TabControl_SelectionChanged">
|
||||
<TabControl.Resources>
|
||||
<Style TargetType="TabControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=treeView, Path=SelectedItem}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TabItem}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
MinHeight="20"
|
||||
Padding="12,3,12,3"
|
||||
Background="Transparent"
|
||||
TextElement.FontFamily="Microsoft Sans Serif"
|
||||
TextElement.FontSize="16"
|
||||
TextElement.Foreground="{StaticResource TabItemHotTextBrush}">
|
||||
<ContentPresenter ContentSource="Header" RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Panel.ZIndex" Value="100" />
|
||||
<Setter TargetName="Border" Property="Background" Value="#22000000" />
|
||||
<Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background" Value="DarkRed" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="Black" />
|
||||
<Setter Property="Foreground" Value="DarkGray" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TabControl.Resources>
|
||||
|
||||
<!--<GroupBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Header="Details"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid
|
||||
MaxWidth="700"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#fdfdfd">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" MinWidth="80" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="3*" MinWidth="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<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 ViewModel.Title, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Content="Beschreibung" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
MaxLength="1024"
|
||||
Style="{StaticResource TextBoxNotice}"
|
||||
Text="{Binding ViewModel.Description, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Content="Prompt" />
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{Binding IsEditingMode}"
|
||||
MaxLength="1024"
|
||||
Style="{StaticResource TextBoxNoticeLarge}"
|
||||
Text="{Binding ViewModel.Prompt, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Content="Ersteller:" />
|
||||
<comboboxes:ComboBoxEmployeeSearch
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsEnabled="False"
|
||||
SelectedCompactEmployeeDC="{Binding ViewModel.Creator}" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0">Öffentlich</Label>
|
||||
<dxe:CheckEdit
|
||||
Grid.Row="4"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
IsChecked="{Binding ViewModel.IsPublic}"
|
||||
IsEnabled="{Binding IsEditingMode, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TabItem Header="Alle">
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit3"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplateSelector="{StaticResource AiPromptbausteinFolderItemTemplateSelector}"
|
||||
ItemsSource="{Binding SelectedFolder.AlleFolderItems, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.AlleFolderItems.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddPrompt" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Prompts/Routinen angelegt.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>-->
|
||||
</TabItem>
|
||||
<TabItem Header="Prompts">
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinPromptItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.Prompts.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddPrompt" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Prompts angelegt.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Routinen">
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit2"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinRoutineItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Routines, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.Routines.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddRoutine" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Routinen angelegt.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="3"
|
||||
MinWidth="50"
|
||||
Command="{Binding SendCommand}"
|
||||
|
||||
@@ -45,14 +45,6 @@ namespace BeWo.View.Detail.AI
|
||||
};
|
||||
}
|
||||
|
||||
private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
if (ViewModel is null)
|
||||
return;
|
||||
|
||||
ViewModel.SelectedFolder = treeView.SelectedValue as AiPromptbausteinFolderVM;
|
||||
}
|
||||
|
||||
private void OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
TreeViewItem treeViewItem = VisualUpwardSearch(e.OriginalSource as DependencyObject);
|
||||
@@ -69,7 +61,9 @@ namespace BeWo.View.Detail.AI
|
||||
if (ViewModel.SelectedFolder == null)
|
||||
return;
|
||||
|
||||
|
||||
_LastTreeViewItem.IsSelected = false;
|
||||
|
||||
treeView.Focus();
|
||||
}
|
||||
}
|
||||
@@ -82,18 +76,12 @@ namespace BeWo.View.Detail.AI
|
||||
return source as TreeViewItem;
|
||||
}
|
||||
|
||||
private void Grid_PreviewMouseDown(object sender, MouseButtonEventArgs e)
|
||||
private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
TreeViewItem treeViewItem = VisualUpwardSearch(e.OriginalSource as DependencyObject);
|
||||
|
||||
if (treeViewItem is null)
|
||||
if (ViewModel is null)
|
||||
return;
|
||||
|
||||
if (e.ClickCount == 2)
|
||||
{
|
||||
ViewModel.OpenEditFolderDialogCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
ViewModel.SelectedFolder = treeView.SelectedValue as AiPromptbausteinFolderVM;
|
||||
}
|
||||
|
||||
private TreeViewItem _LastTreeViewItem;
|
||||
@@ -110,7 +98,12 @@ namespace BeWo.View.Detail.AI
|
||||
private void ListBox_ContextMenuOpening(object sender, ContextMenuEventArgs e)
|
||||
{
|
||||
ViewModel.UpdatePromptCommands();
|
||||
favorite.Header = (ViewModel.SelectedPrompt?.IsFavorite ?? false) ? "Favorit entfernen" : "Favorit hinzufügen";
|
||||
}
|
||||
|
||||
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void Grid_PreviewMouseDown_1(object sender, MouseButtonEventArgs e)
|
||||
@@ -125,10 +118,112 @@ namespace BeWo.View.Detail.AI
|
||||
}
|
||||
}
|
||||
|
||||
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
||||
private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
||||
e.Handled = true;
|
||||
if (e.OriginalSource is TabControl)
|
||||
{
|
||||
listBoxEdit1.UnSelectAll();
|
||||
listBoxEdit2.UnSelectAll();
|
||||
listBoxEdit3.UnSelectAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void Grid_PreviewMouseDown_2(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (!ViewModel.SendCommand.CanExecute(null))
|
||||
return;
|
||||
|
||||
if (e.ClickCount == 2)
|
||||
{
|
||||
ViewModel.SendCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
//private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
//{
|
||||
// if (ViewModel is null)
|
||||
// return;
|
||||
|
||||
// ViewModel.SelectedFolder = treeView.SelectedValue as AiPromptbausteinFolderVM;
|
||||
//}
|
||||
|
||||
//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 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;
|
||||
//}
|
||||
|
||||
//private void treeView_ContextMenuOpening(object sender, ContextMenuEventArgs e)
|
||||
//{
|
||||
// ViewModel.UpdateFolderCommands();
|
||||
//}
|
||||
|
||||
//private void ListBox_ContextMenuOpening(object sender, ContextMenuEventArgs e)
|
||||
//{
|
||||
// ViewModel.UpdatePromptCommands();
|
||||
// favorite.Header = (ViewModel.SelectedPrompt?.IsFavorite ?? false) ? "Favorit entfernen" : "Favorit hinzufügen";
|
||||
//}
|
||||
|
||||
//private void Grid_PreviewMouseDown_1(object sender, MouseButtonEventArgs e)
|
||||
//{
|
||||
// if (!ViewModel.SendCommand.CanExecute(null))
|
||||
// return;
|
||||
|
||||
// if (e.ClickCount == 2)
|
||||
// {
|
||||
// ViewModel.SendCommand.Execute(null);
|
||||
// e.Handled = true;
|
||||
// }
|
||||
//}
|
||||
|
||||
//private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
||||
//{
|
||||
// Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
||||
// e.Handled = true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,8 +295,7 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0} Schritte · {1} min">
|
||||
<Binding Path="Steps.Count" />
|
||||
<MultiBinding StringFormat="{}{0} Schritte">
|
||||
<Binding Path="Steps.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
@@ -380,16 +379,6 @@
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Orientation="Horizontal" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal" />
|
||||
|
||||
<GroupBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
@@ -466,7 +455,6 @@
|
||||
Width="1"
|
||||
HorizontalAlignment="Center"
|
||||
Background="#878890" />
|
||||
|
||||
<TabControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
@@ -566,13 +554,19 @@
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding Path="SelectedFolder.AlleFolderItems.Count" Converter="{StaticResource CollectionCountToBoolConverter}" ConverterParameter="reverse" />
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.AlleFolderItems.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddPrompt" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path Fill="Black" Stretch="Uniform" Height="32" Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}">
|
||||
</Path>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Prompts/Routinen angelegt.
|
||||
</TextBlock>
|
||||
@@ -582,56 +576,62 @@
|
||||
<TabItem Header="Prompts">
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinPromptItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinPromptItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding Path="SelectedFolder.Prompts.Count" Converter="{StaticResource CollectionCountToBoolConverter}" ConverterParameter="reverse" />
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.Prompts.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddPrompt" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path Fill="Black" Stretch="Uniform" Height="32" Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}">
|
||||
</Path>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Prompts angelegt.
|
||||
Hier sind noch keine Prompts angelegt.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
@@ -639,57 +639,61 @@
|
||||
<TabItem Header="Routinen">
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit2"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinRoutineItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Routines, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
x:Name="listBoxEdit2"
|
||||
Padding="8,16,8,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemTemplate="{StaticResource AiPromptbausteinRoutineItemTemplate}"
|
||||
ItemsSource="{Binding SelectedFolder.Routines, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
ShowBorder="False">
|
||||
<dxe:ListBoxEdit.ContextMenu>
|
||||
<ContextMenu>
|
||||
<ContextMenu.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContextMenu.Resources>
|
||||
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxe:ListBoxEdit.ContextMenu>
|
||||
</dxe:ListBoxEdit>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False">
|
||||
<StackPanel.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
||||
<Binding Path="SelectedFolder.Routines.Count" Converter="{StaticResource CollectionCountToBoolConverter}" ConverterParameter="reverse" />
|
||||
<Binding
|
||||
Converter="{StaticResource CollectionCountToBoolConverter}"
|
||||
ConverterParameter="reverse"
|
||||
Path="SelectedFolder.Routines.Count" />
|
||||
<Binding Path="SelectedFolder.CanAddRoutine" />
|
||||
</MultiBinding>
|
||||
</StackPanel.Visibility>
|
||||
<Path Fill="Black" Stretch="Uniform" Height="32" Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}">
|
||||
</Path>
|
||||
<Path
|
||||
Height="32"
|
||||
Margin="6"
|
||||
Data="{StaticResource GeometryFileAdd2}"
|
||||
Fill="Black"
|
||||
Stretch="Uniform" />
|
||||
<TextBlock>
|
||||
Hier sind noch keine Routinen angelegt.
|
||||
Hier sind noch keine Routinen angelegt.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</view:BeWoView>
|
||||
|
||||
@@ -54,20 +54,27 @@ namespace BeWo.View.Detail.AI
|
||||
var viewmodel2 = new AiPromptbausteinSelectionComplexViewModel(ViewModel.ViewModel.ActionType, ViewModel.FolderListVM, false, false);
|
||||
var control = new AiPromptbausteinComplexSelectionView(viewmodel2);
|
||||
|
||||
viewmodel2.PromptAccepted += (s, e) =>
|
||||
viewmodel2.ItemAccepted += (s, e) =>
|
||||
{
|
||||
if (e is null)
|
||||
return;
|
||||
|
||||
if (e is AiPromptbausteinRoutineVM)
|
||||
{
|
||||
MessageBox.Show("Es können keine Routinen hinzugefügt werden.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.DataContract.Version is null)
|
||||
var prompt = e as AiPromptbausteinPromptVM;
|
||||
if (prompt.DataContract.Version is null)
|
||||
{
|
||||
MessageBox.Show("Es können keine Promptbausteine hinzugefügt werden, die noch nicht gespeichert wurden. Speichern Sie bitte zuvor.");
|
||||
return;
|
||||
}
|
||||
|
||||
var step = new AiPromptbausteinRoutineStepDC();
|
||||
step.PromptReference = e.DataContract;
|
||||
step.ReferenceVersion = e.DataContract.Version.Value;
|
||||
step.PromptReference = prompt.DataContract;
|
||||
step.ReferenceVersion = prompt.DataContract.Version.Value;
|
||||
var step_vm = new AiPromptbausteinRoutineStepVM(step);
|
||||
|
||||
ViewModel.ViewModel.Steps.VMList.Add(step_vm);
|
||||
|
||||
@@ -1539,7 +1539,7 @@
|
||||
x:Name="btn_AiPromptbaustein"
|
||||
ActionType="ServiceRecordDocumentation"
|
||||
CanExecute="{Binding EditVM.Notice, Converter={StaticResource StringEmptyBoolConverter}}"
|
||||
PromptAccepted="btn_AiPromptbaustein_PromptAccepted" />
|
||||
ItemAccepted="btn_AiPromptbaustein_ItemAccepted" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -1168,10 +1168,9 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_AiPromptbaustein_PromptAccepted(object sender, AiPromptbausteinPromptVM e)
|
||||
private void btn_AiPromptbaustein_ItemAccepted(object sender, AbstractBaseVM e)
|
||||
{
|
||||
ViewModel.EditPromptAccepted(sender, e);
|
||||
ViewModel.ItemAccepted(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1729,7 +1729,7 @@
|
||||
Margin="3,0,0,0"
|
||||
ActionType="ServiceRecordDocumentation"
|
||||
CanExecute="{Binding PrototypeVM.Notice, Converter={StaticResource StringEmptyBoolConverter}}"
|
||||
PromptAccepted="btn_AiPromptbaustein2_PromptAccepted" />
|
||||
ItemAccepted="btn_AiPromptbaustein2_ItemAccepted" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -3338,8 +3338,8 @@
|
||||
x:Name="ai_conversation_btn"
|
||||
Margin="10,0,0,0"
|
||||
ActionType="ServiceRecordConversation"
|
||||
ItemAccepted="ItemAccepted"
|
||||
OpenAiWindowClick="AiConversationButton_OpenAiWindowClick"
|
||||
PromptAccepted="PromptAccepted"
|
||||
State="{Binding AiConversationButtonState}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
|
||||
@@ -5147,9 +5147,14 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
return list;
|
||||
}
|
||||
|
||||
private void btn_AiPromptbaustein2_PromptAccepted(object sender, AiPromptbausteinPromptVM e)
|
||||
private void ItemAccepted(object sender, AbstractBaseVM e)
|
||||
{
|
||||
ViewModel.PromptAccepted(sender, e);
|
||||
ViewModel.ItemAccepted(sender, e);
|
||||
}
|
||||
|
||||
private void btn_AiPromptbaustein2_ItemAccepted(object sender, AbstractBaseVM e)
|
||||
{
|
||||
ViewModel.ItemAccepted(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,18 +228,6 @@ namespace BeWo.ViewModel
|
||||
|
||||
public FontWeight FontWeight => !IsNew && Parent is null ? FontWeights.SemiBold : FontWeights.Medium;
|
||||
public bool HasSubFolders => SubFolders is object && SubFolders.Count > 0;
|
||||
//public string Displayname
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// if (TotalPromptCount > 0)
|
||||
// {
|
||||
// return $"{Title} ({TotalPromptCount})";
|
||||
// }
|
||||
|
||||
// return Title;
|
||||
// }
|
||||
//}
|
||||
|
||||
public int TotalPromptCount
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace BeWo.ViewModel
|
||||
private bool _ShowPromptByTenant;
|
||||
private bool _IsOwnsoftPrompt;
|
||||
private string _OwnsoftRefLink;
|
||||
private bool _IsSelected;
|
||||
private bool _IsFavorite;
|
||||
private AiActionType _ActionType;
|
||||
|
||||
@@ -117,12 +116,6 @@ namespace BeWo.ViewModel
|
||||
set => DataContract.CanEdit = value;
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _IsSelected;
|
||||
set => SetProperty(ref _IsSelected, value, nameof(IsSelected), nameof(IsInfoVisible));
|
||||
}
|
||||
|
||||
public bool IsInfoVisible
|
||||
{
|
||||
get => IsOwnsoftPrompt && !string.IsNullOrWhiteSpace(OwnsoftRefLink);
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
@@ -280,8 +281,16 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
public bool IsEditUndoButtonVisible => _EditAiActionHistoryIndex > 0;
|
||||
public bool IsEditRedoButtonVisible => _EditAiActionHistoryIndex < (_EditAiActionHistory?.Count ?? 0) - 1;
|
||||
|
||||
public void PromptAccepted(object sender, AiPromptbausteinPromptVM prompt)
|
||||
public void ItemAccepted(object sender, AbstractBaseVM item)
|
||||
{
|
||||
if(item is AiPromptbausteinRoutineVM)
|
||||
{
|
||||
MessageBox.Show("");
|
||||
return;
|
||||
}
|
||||
|
||||
var prompt = item as AiPromptbausteinPromptVM;
|
||||
|
||||
if (prompt is null)
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -379,7 +388,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
};
|
||||
viewModel.Retry_Button_Clicked += (s, e) =>
|
||||
{
|
||||
PromptAccepted(sender, prompt);
|
||||
ItemAccepted(sender, prompt);
|
||||
};
|
||||
|
||||
BeWoApp.MainControl.WindowService.Show(viewModel);
|
||||
@@ -485,7 +494,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
};
|
||||
viewModel.Retry_Button_Clicked += (s, e) =>
|
||||
{
|
||||
PromptAccepted(sender, prompt);
|
||||
ItemAccepted(sender, prompt);
|
||||
};
|
||||
|
||||
BeWoApp.MainControl.WindowService.Show(viewModel);
|
||||
|
||||
@@ -22,12 +22,11 @@ namespace BeWo.ViewModel.View.AI
|
||||
{
|
||||
public class AiPromptbausteinSelectionComplexViewModel : DialogViewModel
|
||||
{
|
||||
public event EventHandler<AiPromptbausteinPromptVM> PromptAccepted;
|
||||
public event EventHandler<AbstractBaseVM> ItemAccepted;
|
||||
public event EventHandler VMListReloaded;
|
||||
|
||||
private AiPromptbausteinFolderVM _SelectedFolder;
|
||||
private AiPromptbausteinPromptVM _SelectedPrompt;
|
||||
private AiPromptbausteinRoutineVM _SelectedRoutine;
|
||||
private AbstractBaseVM _SelectedItem;
|
||||
|
||||
private IBeWoWindowService WindowService { get; set; }
|
||||
|
||||
@@ -92,9 +91,11 @@ namespace BeWo.ViewModel.View.AI
|
||||
|
||||
OpenAddPromptDialogCommand = new DelegateCommand(OpenAddPromptDialog, canOpenAddPromptDialog, false);
|
||||
OpenEditPromptDialogCommand = new DelegateCommand(OpenEditPromptDialog, canOpenEditPromptDialog, false);
|
||||
CopyPromptCommand = new DelegateCommand(CopyPrompt, canCopyPrompt, false);
|
||||
PastePromptCommand = new DelegateCommand(PastePrompt, canPastePrompt, false);
|
||||
DeletePromptCommand = new DelegateCommand(OpenDeletePromptDialog, canOpenDeletePromptDialog, false);
|
||||
ChangeFavoritenStatePromptCommand = new DelegateCommand(ChangeFavoritenStatePrompt, canChangeFavoritenStatePrompt, false);
|
||||
|
||||
|
||||
OpenAddRoutineDialogCommand = new DelegateCommand(OpenAddRoutineDialog, canOpenAddRoutineDialog, false);
|
||||
OpenEditRoutineDialogCommand = new DelegateCommand(OpenEditRoutineDialog, canOpenEditRoutineDialog, false);
|
||||
DeleteRoutineCommand = new DelegateCommand(OpenDeleteRoutineDialog, canOpenDeleteRoutineDialog, false);
|
||||
@@ -115,30 +116,22 @@ namespace BeWo.ViewModel.View.AI
|
||||
set
|
||||
{
|
||||
SetProperty(ref _SelectedFolder, value, nameof(SelectedFolder));
|
||||
if (SelectedPrompt is object)
|
||||
|
||||
if (SelectedItem is AiPromptbausteinPromptVM vm)
|
||||
{
|
||||
SelectedPrompt.IsSelected = false;
|
||||
SelectedPrompt = null;
|
||||
SelectedItem = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
public AiPromptbausteinPromptVM SelectedPrompt
|
||||
public AbstractBaseVM SelectedItem
|
||||
{
|
||||
get => _SelectedPrompt;
|
||||
get => _SelectedItem;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _SelectedPrompt, value, nameof(SelectedPrompt));
|
||||
SetProperty(ref _SelectedItem, value, nameof(SelectedItem));
|
||||
SendCommand.RaiseCanExecuteChanged();
|
||||
}
|
||||
}
|
||||
public AiPromptbausteinRoutineVM SelectedRoutine
|
||||
{
|
||||
get => _SelectedRoutine;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _SelectedRoutine, value, nameof(SelectedRoutine));
|
||||
}
|
||||
}
|
||||
public AiPromptbausteinFolderListVM Folders { get; private set; }
|
||||
public AiActionType LoadedActionType { get; set; }
|
||||
|
||||
@@ -164,15 +157,15 @@ namespace BeWo.ViewModel.View.AI
|
||||
}
|
||||
public void Send()
|
||||
{
|
||||
var selected_prompt = SelectedPrompt;
|
||||
var selected_prompt = SelectedItem;
|
||||
|
||||
CloseDialogCommand.Execute(null);
|
||||
|
||||
PromptAccepted?.Invoke(this, selected_prompt);
|
||||
ItemAccepted?.Invoke(this, selected_prompt);
|
||||
}
|
||||
public bool CanSend()
|
||||
{
|
||||
return SelectedPrompt is object;
|
||||
return SelectedItem is object;
|
||||
}
|
||||
public void InitVMList()
|
||||
{
|
||||
@@ -302,7 +295,6 @@ namespace BeWo.ViewModel.View.AI
|
||||
bool canDeleteFolder() => CanEditPromptbausteine && (SelectedFolder?.CanEdit ?? false);
|
||||
|
||||
// --- Prompt Commands ---
|
||||
|
||||
void OpenAddPromptDialog()
|
||||
{
|
||||
var sel_folder = SelectedFolder;
|
||||
@@ -319,10 +311,15 @@ namespace BeWo.ViewModel.View.AI
|
||||
|
||||
vm.Accept_Button_Clicked += (s, e) =>
|
||||
{
|
||||
var new_dc = new_vm.CommitToDataContract();
|
||||
var dc = new_vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinPrompt(new_dc),
|
||||
(new_dcs) => ReloadVMList());
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinPrompt(dc),
|
||||
new_dc =>
|
||||
{
|
||||
new_vm.UpdateByDataContract(new_dc);
|
||||
sel_folder.SubPrompts.VMList.Add(new_vm);
|
||||
SelectedItem = new_vm;
|
||||
});
|
||||
};
|
||||
|
||||
Close();
|
||||
@@ -331,9 +328,13 @@ namespace BeWo.ViewModel.View.AI
|
||||
}
|
||||
void OpenEditPromptDialog()
|
||||
{
|
||||
var sel_prompt = SelectedPrompt;
|
||||
var sel_prompt = SelectedItem as AiPromptbausteinPromptVM;
|
||||
|
||||
if (SelectedItem is null)
|
||||
throw new Exception("invalid operation");
|
||||
|
||||
var sel_dc = sel_prompt.CopyToEmptyDataContract();
|
||||
sel_dc.CanEdit = SelectedPrompt.CanEdit;
|
||||
sel_dc.CanEdit = sel_prompt.CanEdit;
|
||||
sel_dc.Oid = sel_prompt.DataContract.Oid;
|
||||
sel_dc.Version = sel_prompt.DataContract.Version;
|
||||
var edit_vm = new AiPromptbausteinPromptVM(sel_dc);
|
||||
@@ -345,84 +346,210 @@ namespace BeWo.ViewModel.View.AI
|
||||
var edit_dc = edit_vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.UpdateAiPromptbausteinPrompt(edit_dc),
|
||||
(update_dc) => ReloadVMList());
|
||||
new_dc =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
};
|
||||
|
||||
Close();
|
||||
|
||||
WindowService.Show(vm);
|
||||
}
|
||||
|
||||
void CopyPrompt()
|
||||
{
|
||||
CopiedPrompt = SelectedItem as AiPromptbausteinPromptVM;
|
||||
}
|
||||
void PastePrompt()
|
||||
{
|
||||
var copied_dc = CopiedPrompt.CommitToDataContract();
|
||||
copied_dc.Creator = CurrentEmployee;
|
||||
copied_dc.CanEdit = true;
|
||||
copied_dc.IsPublic = false;
|
||||
copied_dc.IsFavorite = false;
|
||||
copied_dc.Oid = null;
|
||||
copied_dc.Version = null;
|
||||
copied_dc.ParentFolderOid = SelectedFolder.DataContract.Oid;
|
||||
copied_dc.ActionType = AiActionType;
|
||||
copied_dc.PromptId = null;
|
||||
|
||||
var copied_vm = new AiPromptbausteinPromptVM(copied_dc);
|
||||
|
||||
SelectedFolder.SubPrompts.VMList.Add(copied_vm);
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinPrompt(copied_dc),
|
||||
new_dc =>
|
||||
{
|
||||
copied_vm.UpdateByDataContract(new_dc);
|
||||
SelectedFolder.SubPrompts.VMList.Add(copied_vm);
|
||||
SelectedItem = copied_vm;
|
||||
});
|
||||
}
|
||||
void OpenDeletePromptDialog()
|
||||
{
|
||||
var sel_prompt = SelectedPrompt;
|
||||
var sel_prompt = SelectedItem as AiPromptbausteinPromptVM;
|
||||
var folder = SelectedFolder;
|
||||
|
||||
var result = MessageBox.Show("Möchten Sie den ausgewählten Prompt wirklich löschen?", "Hinweis", MessageBoxButton.OKCancel);
|
||||
var txt = "Möchten Sie den ausgewählten Prompt wirklich löschen?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
|
||||
var delete_dc = sel_prompt.CommitToDataContract();
|
||||
if (sel_prompt.IsFavorite)
|
||||
{
|
||||
sel_prompt.IsFavorite = false;
|
||||
}
|
||||
|
||||
var delete_dc = sel_prompt.CommitToDataContract();
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.DeleteAiPromptbausteinPrompt(delete_dc),
|
||||
() => ReloadVMList());
|
||||
() =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
}
|
||||
|
||||
void ChangeFavoritenStatePrompt()
|
||||
{
|
||||
var sel_prompt = SelectedPrompt;
|
||||
var sel_prompt = SelectedItem as AiPromptbausteinPromptVM;
|
||||
|
||||
sel_prompt.IsFavorite = !sel_prompt.IsFavorite;
|
||||
|
||||
var edit_dc = sel_prompt.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.UpdateAiPromptbausteinPrompt(edit_dc),
|
||||
(update_dc) => ReloadVMList());
|
||||
new_dc =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
}
|
||||
|
||||
bool canOpenAddPromptDialog() => CanEditPromptbausteine && (SelectedFolder?.CanAddPrompt ?? false);
|
||||
bool canOpenEditPromptDialog() => SelectedPrompt is object;
|
||||
bool canOpenDeletePromptDialog() => CanEditPromptbausteine && (SelectedPrompt?.CanEdit ?? false);
|
||||
bool canChangeFavoritenStatePrompt() => SelectedPrompt is object;
|
||||
bool canOpenAddPromptDialog()
|
||||
{
|
||||
return CanEditPromptbausteine && (SelectedFolder?.CanAddPrompt ?? false);
|
||||
}
|
||||
bool canOpenEditPromptDialog()
|
||||
{
|
||||
return SelectedItem as AiPromptbausteinPromptVM is object;
|
||||
}
|
||||
bool canCopyPrompt()
|
||||
{
|
||||
return CanEditPromptbausteine && SelectedItem as AiPromptbausteinPromptVM is object;
|
||||
}
|
||||
bool canPastePrompt()
|
||||
{
|
||||
return canOpenAddPromptDialog() && HasCopiedPrompt;
|
||||
}
|
||||
bool canOpenDeletePromptDialog()
|
||||
{
|
||||
return CanEditPromptbausteine && ((SelectedItem as AiPromptbausteinPromptVM)?.CanEdit ?? false);
|
||||
}
|
||||
|
||||
bool canChangeFavoritenStatePrompt()
|
||||
{
|
||||
return SelectedItem as AiPromptbausteinPromptVM is object;
|
||||
}
|
||||
|
||||
// --- Routine Commands
|
||||
|
||||
void OpenAddRoutineDialog()
|
||||
{
|
||||
//var sel_folder = SelectedFolder;
|
||||
//var new_vm = sel_folder.SubRoutines.CreateNewVM();
|
||||
var sel_folder = SelectedFolder;
|
||||
var new_vm = sel_folder.SubRoutines.CreateNewVM();
|
||||
|
||||
//new_vm.Creator = CurrentEmployee;
|
||||
//new_vm.ParentFolderOid = sel_folder.DataContract.Oid;
|
||||
//new_vm.CanEdit = true;
|
||||
//new_vm.ActionType = AiActionType;
|
||||
new_vm.Creator = CurrentEmployee;
|
||||
new_vm.ParentFolderOid = sel_folder.DataContract.Oid;
|
||||
new_vm.CanEdit = true;
|
||||
new_vm.ActionType = AiActionType;
|
||||
|
||||
//var vm = new AiPromptbausteinRoutineViewModel(new_vm, Folders, true);
|
||||
var vm = new AiPromptbausteinRoutineViewModel(new_vm, Folders, true);
|
||||
|
||||
//vm.Accept_Button_Clicked += (s, e) =>
|
||||
//{
|
||||
// var new_dc = new_vm.CommitToDataContract();
|
||||
vm.Accept_Button_Clicked += (s, e) =>
|
||||
{
|
||||
var dc = new_vm.CommitToDataContract();
|
||||
|
||||
// ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinPrompt(new List<AiPromptbausteinRoutineDC> { new_dc }),
|
||||
// (new_dcs) => ReloadVMList());
|
||||
//};
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinRoutine(dc),
|
||||
new_dc =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
};
|
||||
|
||||
//Close();
|
||||
Close();
|
||||
|
||||
//WindowService.Show(vm);
|
||||
WindowService.Show(vm);
|
||||
}
|
||||
void OpenEditRoutineDialog()
|
||||
{
|
||||
|
||||
var sel_prompt = SelectedItem as AiPromptbausteinRoutineVM;
|
||||
|
||||
if (SelectedItem is null)
|
||||
throw new Exception("invalid operation");
|
||||
|
||||
var sel_dc = sel_prompt.CopyToEmptyDataContract();
|
||||
sel_dc.CanEdit = sel_prompt.CanEdit;
|
||||
sel_dc.Oid = sel_prompt.DataContract.Oid;
|
||||
sel_dc.Version = sel_prompt.DataContract.Version;
|
||||
var edit_vm = new AiPromptbausteinRoutineVM(sel_dc);
|
||||
|
||||
var vm = new AiPromptbausteinRoutineViewModel(edit_vm, Folders, false);
|
||||
|
||||
vm.Accept_Button_Clicked += (s, e) =>
|
||||
{
|
||||
var edit_dc = edit_vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.UpdateAiPromptbausteinRoutine(edit_dc),
|
||||
new_dc =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
};
|
||||
|
||||
Close();
|
||||
|
||||
WindowService.Show(vm);
|
||||
}
|
||||
void OpenDeleteRoutineDialog()
|
||||
{
|
||||
|
||||
var sel_prompt = SelectedItem as AiPromptbausteinRoutineVM;
|
||||
var folder = SelectedFolder;
|
||||
|
||||
var txt = "Möchten Sie die ausgewählte Routine wirklich löschen?";
|
||||
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
|
||||
|
||||
if (result != MessageBoxResult.OK)
|
||||
return;
|
||||
|
||||
if (sel_prompt.IsFavorite)
|
||||
{
|
||||
sel_prompt.IsFavorite = false;
|
||||
}
|
||||
|
||||
var delete_dc = sel_prompt.CommitToDataContract();
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.DeleteAiPromptbausteinRoutine(delete_dc),
|
||||
() =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
}
|
||||
void ChangeFavoritenStateRoutine()
|
||||
{
|
||||
|
||||
var sel_routine = SelectedItem as AiPromptbausteinRoutineVM;
|
||||
|
||||
sel_routine.IsFavorite = !sel_routine.IsFavorite;
|
||||
|
||||
var edit_dc = sel_routine.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.UpdateAiPromptbausteinRoutine(edit_dc),
|
||||
new_dc =>
|
||||
{
|
||||
ReloadVMList();
|
||||
});
|
||||
}
|
||||
|
||||
bool canOpenAddRoutineDialog() => CanEditPromptbausteine && (SelectedFolder?.CanAddPrompt ?? false);
|
||||
bool canOpenEditRoutineDialog() => SelectedRoutine is object;
|
||||
bool canOpenDeleteRoutineDialog() => CanEditPromptbausteine && (SelectedRoutine?.CanEdit ?? false);
|
||||
bool canChangeFavoritenStateRoutine() => SelectedRoutine is object;
|
||||
bool canOpenEditRoutineDialog() => SelectedItem is AiPromptbausteinRoutineVM;
|
||||
bool canOpenDeleteRoutineDialog() => CanEditPromptbausteine && ((SelectedItem as AiPromptbausteinRoutineVM)?.CanEdit ?? false);
|
||||
bool canChangeFavoritenStateRoutine() => SelectedItem is AiPromptbausteinRoutineVM;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ namespace BeWo.ViewModel.View.Administration
|
||||
|
||||
if (SelectedItem is AiPromptbausteinPromptVM vm)
|
||||
{
|
||||
vm.IsSelected = false;
|
||||
SelectedItem = null;
|
||||
}
|
||||
}
|
||||
@@ -370,14 +369,23 @@ namespace BeWo.ViewModel.View.Administration
|
||||
copied_dc.Creator = CurrentEmployee;
|
||||
copied_dc.CanEdit = true;
|
||||
copied_dc.IsPublic = false;
|
||||
copied_dc.IsFavorite = false;
|
||||
copied_dc.Oid = null;
|
||||
copied_dc.Version = 0;
|
||||
copied_dc.Version = null;
|
||||
copied_dc.ParentFolderOid = SelectedFolder.DataContract.Oid;
|
||||
copied_dc.ActionType = AiActionType;
|
||||
copied_dc.PromptId = null;
|
||||
|
||||
var copied_vm = new AiPromptbausteinPromptVM(copied_dc);
|
||||
|
||||
SelectedFolder.SubPrompts.VMList.Add(copied_vm);
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.InsertAiPromptbausteinPrompt(copied_dc),
|
||||
new_dc =>
|
||||
{
|
||||
copied_vm.UpdateByDataContract(new_dc);
|
||||
SelectedFolder.SubPrompts.VMList.Add(copied_vm);
|
||||
SelectedItem = copied_vm;
|
||||
});
|
||||
}
|
||||
void OpenDeletePromptDialog()
|
||||
{
|
||||
|
||||
@@ -89,6 +89,8 @@ namespace Dakota.Logic
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2839,6 +2839,25 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
|
||||
return criteria.List<AiPromptbausteinPrompt>();
|
||||
}
|
||||
|
||||
public IEnumerable<AiPromptbausteinRoutine> GetOwnActiveRootAiPromptbausteineRoutines(AiActionType? aiActionType = null)
|
||||
{
|
||||
var emp = UserRightHelper.GetLoggedInEmployee();
|
||||
var emp_oid = emp.Oid;
|
||||
|
||||
var criteria = CreateCriteriaIsActive<AiPromptbausteinRoutine>();
|
||||
|
||||
criteria.Add(Restrictions.IsNull(nameof(AiPromptbausteinRoutine.ParentFolderOid)));
|
||||
|
||||
if (aiActionType is AiActionType actionType)
|
||||
{
|
||||
criteria.Add(Restrictions.Eq(nameof(AiPromptbausteinRoutine.ActionType), actionType));
|
||||
}
|
||||
|
||||
criteria.Add(Restrictions.Eq(nameof(AiPromptbausteinRoutine.CreatorOid), emp_oid));
|
||||
|
||||
return criteria.List<AiPromptbausteinRoutine>();
|
||||
}
|
||||
|
||||
public IEnumerable<AiPromptbausteinFolder> GetPublicActiveRootAiPromptbausteineFolders(AiActionType? aiActionType = null)
|
||||
{
|
||||
var emp = UserRightHelper.GetLoggedInEmployee();
|
||||
|
||||
@@ -68,37 +68,17 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
own_bib.SubPrompts.AddRange(own_prompts_dcs);
|
||||
|
||||
var example_routine = new AiPromptbausteinRoutineDC();
|
||||
example_routine.ActionType = aiActionType;
|
||||
example_routine.CanEdit = true;
|
||||
example_routine.IsPublic = true;
|
||||
example_routine.Description = "Beschreibung";
|
||||
example_routine.Oid = 1000;
|
||||
example_routine.ParentFolderOid = own_bib.Oid;
|
||||
example_routine.Title = "Routine Title";
|
||||
example_routine.Steps = new List<AiPromptbausteinRoutineStepDC>();
|
||||
var own_routines = DAOFactory.SearchDAO.GetOwnActiveRootAiPromptbausteineRoutines(aiActionType);
|
||||
var own_routines_dcs = MapperFactory.AiPromptbausteinRoutine.MapToNewDCs(own_routines);
|
||||
|
||||
if (own_prompts_dcs.Count > 0)
|
||||
example_routine.Steps.Add(new AiPromptbausteinRoutineStepDC()
|
||||
{
|
||||
Oid = 1001,
|
||||
Position = 0,
|
||||
PromptReference = own_prompts_dcs?[0],
|
||||
});
|
||||
|
||||
if (own_bib.SubFolders.Count > 0 && own_bib.SubFolders[0].SubPrompts.Count > 0)
|
||||
example_routine.Steps.Add(new AiPromptbausteinRoutineStepDC()
|
||||
{
|
||||
Oid = 1001,
|
||||
Position = 0,
|
||||
PromptReference = own_bib.SubFolders[0].SubPrompts[0],
|
||||
});
|
||||
|
||||
if (own_prompts_dcs.Count > 0)
|
||||
foreach (var dc in own_routines_dcs)
|
||||
{
|
||||
own_bib.SubRoutines = new List<AiPromptbausteinRoutineDC> { example_routine };
|
||||
dc.CanEdit = true;
|
||||
dc.ParentFolderOid = own_bib.Oid;
|
||||
}
|
||||
|
||||
own_bib.SubRoutines.AddRange(own_routines_dcs);
|
||||
|
||||
return own_bib;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace BS.Shared.DataContracts.Feature.AI
|
||||
ParentFolderOid = null,
|
||||
SubFolders = new List<AiPromptbausteinFolderDC>(),
|
||||
SubPrompts = new List<AiPromptbausteinPromptDC>(),
|
||||
SubRoutines = new List<AiPromptbausteinRoutineDC>(),
|
||||
Title = AiPromptbausteineTexts.OwnBibNodeTitle,
|
||||
Version = 1,
|
||||
CanAddFolder = true,
|
||||
|
||||
6
Tools/KTDReaderGUI/.cr/personal/FavoritesList/List.xml
Normal file
6
Tools/KTDReaderGUI/.cr/personal/FavoritesList/List.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
|
||||
<Options Language="Neutral">
|
||||
<Groups />
|
||||
</Options>
|
||||
</Root>
|
||||
Reference in New Issue
Block a user