222 lines
9.8 KiB
XML
222 lines
9.8 KiB
XML
<UserControl
|
|
x:Class="BeWo.View.Detail.AI.AiPromptbausteinComplexSelectionView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ai="clr-namespace:BeWo.ViewModel.View.AI"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
|
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="clr-namespace:BeWo.ViewModel"
|
|
d:DataContext="{d:DesignInstance Type=ai:AiPromptbausteinSelectionComplexViewModel,
|
|
IsDesignTimeCreatable=True}"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<Style
|
|
x:Key="PromptListBoxItem"
|
|
BasedOn="{StaticResource PhotoListBoxItem}"
|
|
TargetType="ListBoxItem">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" MinWidth="200" />
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="2*" MinWidth="200" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<GroupBox
|
|
Grid.Column="0"
|
|
HorizontalAlignment="Stretch"
|
|
Header="Ordner"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<TreeView
|
|
x:Name="treeView"
|
|
MinHeight="100"
|
|
Padding="4,16,4,16"
|
|
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
|
|
ItemTemplate="{StaticResource ai_promptbaustein_folder_itemtemplate}"
|
|
ItemsSource="{Binding Folders.VMList, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedItemChanged="treeView_SelectedItemChanged">
|
|
<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>
|
|
</GroupBox>
|
|
<GridSplitter
|
|
Grid.Column="1"
|
|
Width="1"
|
|
HorizontalAlignment="Center"
|
|
Background="#878890" />
|
|
<GroupBox
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="2"
|
|
HorizontalAlignment="Stretch"
|
|
Header="Prompts"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<dxe:ListBoxEdit
|
|
x:Name="listBoxEdit1"
|
|
Padding="4,16,4,16"
|
|
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
|
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedItem="{Binding SelectedPrompt, Mode=TwoWay}">
|
|
<dxe:ListBoxEdit.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid
|
|
Margin="0,3,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch">
|
|
<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>
|
|
|
|
<!--<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}" />
|
|
</Grid>
|
|
</GroupBox>-->
|
|
<Button
|
|
Grid.Row="1"
|
|
Grid.ColumnSpan="3"
|
|
Command="{Binding SendCommand}"
|
|
Style="{StaticResource PrimaryButton}">
|
|
Absenden
|
|
</Button>
|
|
</Grid>
|
|
</UserControl>
|
|
|