155 lines
7.9 KiB
XML
155 lines
7.9 KiB
XML
<view:BeWoView
|
|
x:Class="BeWo.View.Detail.AI.AiPromptbausteinTreeView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:administration="clr-namespace:BeWo.ViewModel.View.Administration"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local1="clr-namespace:BeWo.View.Detail.AI"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:view="clr-namespace:BeWo.View"
|
|
xmlns:vm="clr-namespace:BeWo.ViewModel"
|
|
d:DataContext="{d:DesignInstance Type=administration:AiPromptbausteinTreeViewModel,
|
|
IsDesignTimeCreatable=True}"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<view:BeWoView.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</view:BeWoView.Resources>
|
|
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
|
|
<GroupBox.Header>
|
|
Aktuell definierte KI-Prompts
|
|
</GroupBox.Header>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Orientation="Horizontal" />
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Orientation="Horizontal">
|
|
<ToggleButton
|
|
x:Name="EditToggleButton"
|
|
Grid.Column="4"
|
|
Width="157"
|
|
Height="25"
|
|
Margin="3"
|
|
Content="Bearbeiten aktivieren"
|
|
IsChecked="{Binding IsEditingMode}"
|
|
ToolTip="Wenn der Bearbeiten Modus aktiviert ist, können Sie Elemente mit Drag und Drop verschieben"
|
|
Visibility="Visible" />
|
|
|
|
<Button
|
|
Style="{StaticResource ButtonPreviousStyle}"
|
|
ToolTip="Letzte Änderung rückgängig machen"
|
|
Visibility="Collapsed" />
|
|
<Button
|
|
Style="{StaticResource ButtonRedoStyle}"
|
|
ToolTip="Nächste Änderung wiederholen"
|
|
Visibility="Collapsed" />
|
|
</StackPanel>
|
|
|
|
<GroupBox
|
|
Grid.Row="1"
|
|
Grid.ColumnSpan="3"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<TreeView
|
|
x:Name="treeView"
|
|
MinHeight="100"
|
|
Padding="3,20,3,3"
|
|
AllowDrop="True"
|
|
ContextMenuService.IsEnabled="{Binding IsChecked, ElementName=EditToggleButton}"
|
|
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
|
|
ItemTemplate="{StaticResource ai_promptbaustein_treeitemtemplate}"
|
|
ItemsSource="{Binding ListVM.VMList, UpdateSourceTrigger=PropertyChanged}"
|
|
PreviewMouseDown="Grid_PreviewMouseDown"
|
|
PreviewMouseRightButtonDown="OnPreviewMouseRightButtonDown"
|
|
SelectedItemChanged="treeView_SelectedItemChanged"
|
|
TreeViewItem.Selected="treeView_Selected">
|
|
<TreeView.Resources>
|
|
<Style x:Key="igoal_treeitemstyle" TargetType="TreeViewItem">
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</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 AddPromptCommand}" Header="Neuer Prompt">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="{Binding AddOrdnerCommand}" Header="Neuer Ordner">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="{Binding AddKetteCommand}" Header="Neue Routine">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Command="{Binding EditPromptbausteinCommand}" Header="Bearbeiten">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Rename24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Command="{Binding CopySinglePromptbausteinCommand}" Header="Einzelnes Element kopieren">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="{Binding CopyPromptbausteinCommand}" Header="Elementbaum kopieren">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="{Binding PastePromptbausteinCommand}" Header="Einfügen">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Command="{Binding DeletePromptbausteinCommand}" Header="Löschen">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</TreeView.ContextMenu>
|
|
</TreeView>
|
|
</GroupBox>
|
|
</Grid>
|
|
</GroupBox>
|
|
</view:BeWoView>
|