700 lines
40 KiB
XML
700 lines
40 KiB
XML
<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: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:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
|
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:view="clr-namespace:BeWo.View"
|
|
xmlns:vm="clr-namespace:BeWo.ViewModel"
|
|
x:Name="root"
|
|
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>
|
|
<Style
|
|
x:Key="PromptListBoxItem"
|
|
BasedOn="{StaticResource PhotoListBoxItem}"
|
|
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>
|
|
</view:BeWoView.Resources>
|
|
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
|
|
<GroupBox.Header>
|
|
Aktuell definierte KI-Prompts
|
|
</GroupBox.Header>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" MinWidth="200" />
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="2*" MinWidth="200" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<GroupBox
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="0,7,0,0"
|
|
Padding="0"
|
|
HorizontalAlignment="Stretch"
|
|
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"
|
|
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="IsEnabled" Value="{Binding IsEnabled}" />
|
|
<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 OpenAddFolderDialogCommand}" Header="Neu">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="{Binding OpenEditFolderDialogCommand}" Header="Bearbeiten">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
|
</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" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</TreeView.ContextMenu>
|
|
</TreeView>
|
|
</GroupBox>
|
|
<GridSplitter
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="1"
|
|
HorizontalAlignment="Center"
|
|
Background="#878890" />
|
|
<TabControl
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="2"
|
|
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>
|
|
|
|
<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>
|
|
</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>
|
|
</Grid>
|
|
</GroupBox>
|
|
</view:BeWoView>
|