Komische Fehlermeldung beim Auswhählen, sehr verstrickt
This commit is contained in:
@@ -153,117 +153,10 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="Prompts"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<!--<dxlc:FlowLayoutControl
|
||||
x:Name="flowLayoutControl1"
|
||||
ItemMovingAnimationDuration="0:0:0.1"
|
||||
Background="White"
|
||||
AnimateItemMoving="True"
|
||||
AnimateScrolling="True"
|
||||
DragScrolling="True"
|
||||
AllowItemMoving="True"
|
||||
StretchContent="True"
|
||||
Orientation="Vertical"
|
||||
ItemsSource="{Binding SelectedFolder.SubPrompts.VMList, UpdateSourceTrigger=PropertyChanged}"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening">
|
||||
<dxlc:FlowLayoutControl.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 Command="{Binding CopyPromptCommand}" Header="Kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Command="{Binding DeletePromptCommand}" Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</dxlc:FlowLayoutControl.ContextMenu>
|
||||
<dxlc:FlowLayoutControl.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="Medium"
|
||||
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>
|
||||
</dxlc:FlowLayoutControl.ItemTemplate>
|
||||
</dxlc:FlowLayoutControl>-->
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="4,16,4,16"
|
||||
AllowDrop="True"
|
||||
AllowDrop="False"
|
||||
ContextMenuOpening="ListBox_ContextMenuOpening"
|
||||
ContextMenuService.IsEnabled="{Binding IsChecked, ElementName=EditToggleButton}"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
@@ -291,9 +184,9 @@ VerticalAlignment="Stretch">
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="favorite"
|
||||
Command="{Binding ChangeFavoritenStatePromptCommand}"
|
||||
Header="Kopieren">
|
||||
x:Name="favorite"
|
||||
Command="{Binding ChangeFavoritenStatePromptCommand}"
|
||||
Header="Kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\..\Ressources\Icons\Favorites32.png" />
|
||||
</MenuItem.Icon>
|
||||
@@ -320,9 +213,9 @@ VerticalAlignment="Stretch">
|
||||
<dxe:ListBoxEdit.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Margin="0,3,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
Margin="0,3,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -333,125 +226,48 @@ VerticalAlignment="Stretch">
|
||||
<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">
|
||||
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" />
|
||||
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>
|
||||
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>-->
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</view:BeWoView>
|
||||
|
||||
@@ -155,10 +155,5 @@ namespace BeWo.View.Detail.AI
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
//private void Grid_PreviewMouseDown2(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
//{
|
||||
// IsDragging = true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,9 @@ namespace BeWo.ViewModel
|
||||
return;
|
||||
|
||||
_SubPrompts.VMList.ListChanged += (s, e) => {
|
||||
if (e.ListChangedType == System.ComponentModel.ListChangedType.ItemChanged)
|
||||
return;
|
||||
|
||||
FirePropertyChanged(nameof(Displayname));
|
||||
FirePropertyChanged(nameof(Prompts));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user