ServiceReocrdEditView AIDocu Popup Update
Resizing/Spacing von AI Buttons
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Button x:Name="ButtonOpenTranskriptionView" Click="ButtonOpenTranskriptionView_Click">
|
||||
|
||||
<Image
|
||||
Width="22"
|
||||
Height="22"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
x:Class="BeWo.View.Controls.AI.AiPromptbausteinButton"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:draw="clr-namespace:System.Drawing;assembly=System.Drawing"
|
||||
xmlns:local="clr-namespace:BeWo.View.Controls.AI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
|
||||
x:Name="root"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
@@ -22,12 +22,12 @@
|
||||
</ResourceDictionary>
|
||||
</StackPanel.Resources>
|
||||
<Button
|
||||
x:Name="btnOpenAi5"
|
||||
Margin="3"
|
||||
x:Name="btnOpenAi5"
|
||||
Margin="0"
|
||||
Click="btnOpenAi5_Click"
|
||||
Style="{StaticResource PrimaryButton}"
|
||||
Content="{StaticResource AiDesignsIconKIFunktionWeissGruen}"
|
||||
MouseRightButtonUp="btnOpenAi5_MouseRightButtonUp"
|
||||
Style="{StaticResource PrimaryButton}"
|
||||
ToolTip="KI Chat mit Prompt-Baustein starten"
|
||||
ToolTipService.ShowOnDisabled="True">
|
||||
<!--<Button.InputBindings>
|
||||
@@ -38,23 +38,19 @@
|
||||
</StackPanel>
|
||||
<Popup
|
||||
x:Name="popup_promptbaustein_all"
|
||||
Width="600"
|
||||
Height="400"
|
||||
Placement="Top"
|
||||
PlacementTarget="{Binding ElementName=btnOpenAi5}"
|
||||
StaysOpen="False"
|
||||
Width="600"
|
||||
Height="400">
|
||||
<Border BorderThickness="1" x:Name="border_promptbaustein_al">
|
||||
|
||||
</Border>
|
||||
StaysOpen="False">
|
||||
<Border x:Name="border_promptbaustein_al" BorderThickness="1" />
|
||||
</Popup>
|
||||
<Popup
|
||||
x:Name="popup_promptbaustein_favoriten"
|
||||
Placement="Top"
|
||||
PlacementTarget="{Binding ElementName=btnOpenAi5}"
|
||||
StaysOpen="False">
|
||||
<Border BorderThickness="1" x:Name="border_promptbaustein_favoriten">
|
||||
|
||||
</Border>
|
||||
<Border x:Name="border_promptbaustein_favoriten" BorderThickness="1" />
|
||||
</Popup>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -42,6 +42,7 @@ namespace BeWo.View.Detail.AI
|
||||
|
||||
item.IsSelected = false;
|
||||
}
|
||||
listBoxEdit1.UnSelectAll();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:zeit="clr-namespace:BeWo.View.Detail.Zeiterfassung"
|
||||
xmlns:ai="clr-namespace:BeWo.View.Controls.AI"
|
||||
x:Name="root"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
@@ -1507,7 +1508,8 @@
|
||||
<StackPanel
|
||||
x:Name="stackpanel_ai"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,3,3,6"
|
||||
HorizontalAlignment="Right"
|
||||
DataContext=""
|
||||
Orientation="Horizontal"
|
||||
@@ -1521,23 +1523,23 @@
|
||||
</StackPanel.Resources>
|
||||
<Button
|
||||
x:Name="btn_AiPromptbausteinUndo"
|
||||
Padding="0"
|
||||
Margin="3,0,0,0"
|
||||
Command="{Binding UndoEditAiActionCommand}"
|
||||
Style="{StaticResource ButtonPreviousStyle}"
|
||||
Visibility="{Binding IsEditUndoButtonVisible, Converter={StaticResource BoolVisibilityHiddenConverter}}" />
|
||||
<Button
|
||||
x:Name="btn_AiPromptbausteinRedo"
|
||||
Padding="0"
|
||||
Margin="3,0,3,0"
|
||||
Command="{Binding RedoEditAiActionCommand}"
|
||||
Style="{StaticResource ButtonRedoStyle}"
|
||||
Visibility="{Binding IsEditRedoButtonVisible, Converter={StaticResource BoolVisibilityHiddenConverter}}" />
|
||||
|
||||
<Button
|
||||
x:Name="btn_AiPromptbaustein"
|
||||
Padding="0"
|
||||
Command="{Binding OpenEditAiPromptSelectionCommand}"
|
||||
Content="{StaticResource AiDesignsIconKIFunktionWeissGruen}"
|
||||
Style="{StaticResource PrimaryButton}" />
|
||||
<ai:AiPromptbausteinButton
|
||||
Margin="3,0,0,0"
|
||||
x:Name="btn_AiPromptbaustein"
|
||||
ActionType="ServiceRecordDocumentation"
|
||||
CanExecute="{Binding EditVM.Notice, Converter={StaticResource StringEmptyBoolConverter}}"
|
||||
PromptAccepted="btn_AiPromptbaustein_PromptAccepted" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -1168,5 +1168,10 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_AiPromptbaustein_PromptAccepted(object sender, AiPromptbausteinPromptVM e)
|
||||
{
|
||||
ViewModel.EditPromptAccepted(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1692,6 +1692,7 @@
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="4"
|
||||
Margin="3,3,3,6"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel.Resources>
|
||||
@@ -1707,19 +1708,20 @@
|
||||
Visibility="{Binding IsAiDocuButtonVisible, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
<Button
|
||||
x:Name="btn_AiPromptbausteinUndo"
|
||||
Padding="0"
|
||||
Margin="3,0,3,0"
|
||||
Command="{Binding UndoAiActionCommand}"
|
||||
Style="{StaticResource ButtonPreviousStyle}"
|
||||
Visibility="{Binding IsUndoButtonVisible, Converter={StaticResource BoolVisibilityHiddenConverter}}" />
|
||||
<Button
|
||||
x:Name="btn_AiPromptbausteinRedo"
|
||||
Padding="0"
|
||||
Margin="3,0,0,0"
|
||||
Command="{Binding RedoAiActionCommand}"
|
||||
Style="{StaticResource ButtonRedoStyle}"
|
||||
Visibility="{Binding IsRedoButtonVisible, Converter={StaticResource BoolVisibilityHiddenConverter}}" />
|
||||
|
||||
<ai:AiPromptbausteinButton
|
||||
x:Name="btn_AiPromptbaustein2"
|
||||
Margin="3,0,0,0"
|
||||
ActionType="ServiceRecordDocumentation"
|
||||
CanExecute="{Binding PrototypeVM.Notice, Converter={StaticResource StringEmptyBoolConverter}}"
|
||||
PromptAccepted="btn_AiPromptbaustein2_PromptAccepted" />
|
||||
|
||||
@@ -1189,10 +1189,10 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
serviceRecordEditView = new ServiceRecordEditView();
|
||||
}
|
||||
|
||||
ViewModel.ResetEditAiAction();
|
||||
|
||||
popup_content.Child = serviceRecordEditView;
|
||||
|
||||
|
||||
double height = MainControl.ActualHeight * 0.8;
|
||||
double width = 810;
|
||||
|
||||
|
||||
@@ -215,6 +215,10 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
_AiActionHistory = new List<string>();
|
||||
_AiActionHistory.Add(AktuellerDokutext);
|
||||
_AiActionHistoryIndex = 0;
|
||||
|
||||
_EditAiActionHistory = new List<string>();
|
||||
_EditAiActionHistory.Add(AktuellerEditDokutext);
|
||||
_EditAiActionHistoryIndex = 0;
|
||||
}
|
||||
|
||||
public AiConversationButtonState AiConversationButtonState
|
||||
@@ -506,6 +510,16 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
FirePropertyChanged(nameof(IsUndoButtonVisible));
|
||||
}
|
||||
|
||||
public void ResetEditAiAction()
|
||||
{
|
||||
_EditAiActionHistory.Clear();
|
||||
_EditAiActionHistory.Add(AktuellerDokutext);
|
||||
_EditAiActionHistoryIndex = 0;
|
||||
|
||||
FirePropertyChanged(nameof(IsEditRedoButtonVisible));
|
||||
FirePropertyChanged(nameof(IsEditUndoButtonVisible));
|
||||
}
|
||||
|
||||
public Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable<ServiceRecordVM> selected_records)
|
||||
{
|
||||
var current = SelectedCustomerNode;
|
||||
|
||||
@@ -4,6 +4,7 @@ using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions.CustomInterfaces;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Mvvm.POCO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -43,7 +44,7 @@ namespace BeWo.ViewModel.View.AI
|
||||
|
||||
public bool IsFavorite { get; set; }
|
||||
|
||||
public ICommand SendCommand { get; set; }
|
||||
public DelegateCommand SendCommand { get; set; }
|
||||
|
||||
public AiActionType AiActionType { get; set; }
|
||||
|
||||
@@ -52,8 +53,17 @@ namespace BeWo.ViewModel.View.AI
|
||||
get => _SelectedFolder;
|
||||
set
|
||||
{
|
||||
if (value == _SelectedFolder)
|
||||
return;
|
||||
|
||||
_SelectedFolder = value;
|
||||
FirePropertyChanged(nameof(SelectedFolder));
|
||||
|
||||
if(SelectedPrompt is object)
|
||||
{
|
||||
SelectedPrompt.IsSelected = false;
|
||||
SelectedPrompt = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
public AiPromptbausteinPromptVM SelectedPrompt
|
||||
@@ -63,6 +73,7 @@ namespace BeWo.ViewModel.View.AI
|
||||
{
|
||||
_SelectedPrompt = value;
|
||||
FirePropertyChanged(nameof(SelectedPrompt));
|
||||
SendCommand.RaiseCanExecuteChanged();
|
||||
}
|
||||
}
|
||||
public AiPromptbausteinFolderListVM Folders { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user