Auf der Oberfläche Fenster geputzt

This commit is contained in:
2026-06-03 13:01:28 +02:00
parent fb6bd47354
commit d38c504321
7 changed files with 79 additions and 56 deletions

View File

@@ -114,7 +114,7 @@ namespace BeWo.Services
var control = new AiPromptbausteinRoutineView(viewModel);
var options = new BeWoWindowOptions()
{
Height = 400,
Height = 600,
Width = 600
};
Show("KI Promptbaustein Routine", control, viewModel, options);

View File

@@ -46,4 +46,18 @@
</Trigger>
</Style.Triggers>
</Style>
<Style
x:Key="PopupBlackLabel2"
BasedOn="{StaticResource BaseLabel}"
TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource TextForegroundDarkPrimary}" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource TextForegroundDarkSecondary}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View File

@@ -4,4 +4,13 @@
<Setter Property="Margin" Value="3" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style
x:Key="PopupBlackRadioButton"
BasedOn="{StaticResource BaseRadioButton}"
TargetType="RadioButton">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</ResourceDictionary>

View File

@@ -23,6 +23,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource PopupBlackLabel2}" TargetType="Label"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid
@@ -32,7 +33,7 @@
<Grid Margin="8,4,8,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" MinWidth="80" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="3*" MinWidth="100" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -64,7 +65,7 @@
<Label
Grid.Row="2"
Grid.Column="0"
Content="Ersteller:" />
Content="Ersteller" />
<comboboxes:ComboBoxEmployeeSearch
Grid.Row="2"
Grid.Column="2"

View File

@@ -23,6 +23,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource PopupBlackLabel2}" TargetType="Label"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid
@@ -32,7 +33,7 @@
<Grid Margin="8,4,8,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" MinWidth="80" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="3*" MinWidth="100" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -60,6 +61,7 @@
Grid.Row="1"
Grid.Column="2"
MaxHeight="100"
Margin="3,6,3,6"
IsEnabled="{Binding ViewModel.CanEdit}"
MaxLength="1024"
Style="{StaticResource TextBoxNotice}"
@@ -90,7 +92,7 @@ Grid.Column="2" Foreground="DarkGray" FontSize="10"
<comboboxes:ComboBoxEmployeeSearch
Grid.Row="3"
Grid.Column="2"
Margin="3"
Margin="3,6,3,6"
IsEnabled="False"
SelectedCompactEmployeeDC="{Binding ViewModel.Creator}" />

View File

@@ -22,13 +22,14 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource PopupBlackLabel2}" TargetType="Label" />
</ResourceDictionary>
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch">
<Grid Margin="8,4,8,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" MinWidth="80" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="3*" MinWidth="100" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -55,6 +56,7 @@
Grid.Row="1"
Grid.Column="2"
MaxHeight="100"
Margin="3,6,3,6"
MaxLength="1024"
Style="{StaticResource TextBoxNotice}"
Text="{Binding PromptVM.Description, UpdateSourceTrigger=PropertyChanged, ElementName=root}"

View File

@@ -23,13 +23,15 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource PopupBlackLabel2}" TargetType="Label"/>
<Style BasedOn="{StaticResource PopupBlackRadioButton}" TargetType="RadioButton"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch">
<Grid Margin="8,4,8,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" MinWidth="80" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="3*" MinWidth="100" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -52,23 +54,25 @@
<Label
Grid.Row="1"
Grid.Column="0"
Content="Beschreibung" />
Content="Beschreibung"
HorizontalAlignment="Right"/>
<TextBox
Grid.Row="1"
Grid.Column="2"
MaxHeight="100"
MaxLength="1024"
Margin="3,6,3,3"
Style="{StaticResource TextBoxNotice}"
Text="{Binding ViewModel.Description, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="Kontext Eingabe Typ" />
Content="Kontext-Eingabe-Typ" />
<StackPanel
Grid.Row="2"
Grid.Column="2"
Orientation="Horizontal">
Orientation="Horizontal" Margin="3,3">
<RadioButton IsChecked="{Binding ViewModel.RoutineType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiRoutineType.Chain}}">Kette</RadioButton>
<RadioButton IsChecked="{Binding ViewModel.RoutineType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiRoutineType.Stack}}">Stapel</RadioButton>
</StackPanel>
@@ -76,22 +80,12 @@
<Label
Grid.Row="3"
Grid.Column="0"
Content="Prompts" />
<Grid
Grid.Row="3"
Grid.Column="2"
Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<ListBox
Content="Promptbausteine" />
<ListBox
x:Name="steps"
Grid.ColumnSpan="2"
Margin="0,0,0,3"
Grid.Row="3"
Grid.Column="2"
Margin="3"
HorizontalContentAlignment="Center"
ItemsSource="{Binding ViewModel.Steps.VMList}"
SelectedItem="{Binding SelectedStep}">
@@ -133,61 +127,62 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel
Grid.Row="1"
<StackPanel
Grid.Row="4"
Grid.Column="2"
Margin="0,0,0,3"
HorizontalAlignment="Center"
Orientation="Horizontal">
<StackPanel.Resources>
<ResourceDictionary>
<Style BasedOn="{StaticResource PrimaryButton}" TargetType="Button">
<Setter Property="Width" Value="24" />
</Style>
</ResourceDictionary>
</StackPanel.Resources>
<Button Click="Button_Plus_Click">+</Button>
<Button Command="{Binding DeleteStepCommand}" CommandParameter="{Binding SelectedStep}">
-
</Button>
<Button
<StackPanel.Resources>
<ResourceDictionary>
<Style BasedOn="{StaticResource PrimaryButton}" TargetType="Button">
<Setter Property="Width" Value="24" />
</Style>
</ResourceDictionary>
</StackPanel.Resources>
<Button Click="Button_Plus_Click">+</Button>
<Button Command="{Binding DeleteStepCommand}" CommandParameter="{Binding SelectedStep}">
-
</Button>
<Button
Margin="9,3,3,3"
Command="{Binding MoveStepUpCommand}"
CommandParameter="{Binding SelectedStep}">
<Path
<Path
Width="8"
Data="{StaticResource Lucide.ChevronUp}"
Fill="White"
Stretch="Uniform" />
</Button>
<Button Command="{Binding MoveStepDownCommand}" CommandParameter="{Binding SelectedStep}">
<Path
</Button>
<Button Command="{Binding MoveStepDownCommand}" CommandParameter="{Binding SelectedStep}">
<Path
Width="8"
Data="{StaticResource Lucide.ChevronDown}"
Fill="White"
Stretch="Uniform" />
</Button>
<Popup
</Button>
<Popup
x:Name="myPopup"
Width="600"
Height="400"
Placement="Top"
PlacementTarget="{Binding ElementName=myButton}"
StaysOpen="False">
<Border
<Border
x:Name="myPopupBorder"
BorderBrush="Black"
BorderThickness="1">
<TextBlock Text="Ich bin ein Popup!" />
</Border>
</Popup>
</StackPanel>
</Grid>
<TextBlock Text="Ich bin ein Popup!" />
</Border>
</Popup>
</StackPanel>
<Label
Grid.Row="4"
Grid.Row="5"
Grid.Column="0"
Content="Ersteller" />
<comboboxes:ComboBoxEmployeeSearch
Grid.Row="4"
Grid.Row="5"
Grid.Column="2"
Margin="3"
IsEnabled="False"
@@ -201,9 +196,9 @@
IsChecked="{Binding ViewModel.IsPublic}"
IsEnabled="{Binding ViewModel.CanShareEdit, UpdateSourceTrigger=PropertyChanged}" />-->
<Label Grid.Row="5" Grid.Column="0">Favorit</Label>
<Label Grid.Row="6" Grid.Column="0">Favorit</Label>
<dxe:CheckEdit
Grid.Row="5"
Grid.Row="6"
Grid.Column="2"
Margin="3"
IsChecked="{Binding ViewModel.IsFavorite}"
@@ -211,7 +206,7 @@
<StackPanel
Grid.Row="6"
Grid.Row="7"
Grid.ColumnSpan="3"
Margin="0,19,0,0"
HorizontalAlignment="Right"