Nach erfolgreichem Senden Message Box fokussieren
This commit is contained in:
@@ -34,6 +34,12 @@ namespace BeWo.View.Detail.AI
|
||||
((INotifyCollectionChanged)listbox_messages.Items).CollectionChanged += listbox_conversations_SelectionChanged;
|
||||
|
||||
popup_settings.Closed += (s, e) => ViewModel.UpdateConfig();
|
||||
|
||||
ViewModel.SendNewMessageSuccess += (s, e) =>
|
||||
{
|
||||
if (txt_input_message.Visibility == Visibility.Visible)
|
||||
txt_input_message.Focus();
|
||||
};
|
||||
}
|
||||
|
||||
public AiConversationChatView(string stylestring) : this()
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
AskDeleteCommand = new DelegateCommand(AskDelete, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatDelete) && SelectedVM is object);
|
||||
}
|
||||
|
||||
public event EventHandler SendNewMessageSuccess;
|
||||
|
||||
public DelegateCommand SendNewMessageCommand { get; set; }
|
||||
public DelegateCommand RequestNewConversationCommand { get; set; }
|
||||
public DelegateCommand TestCommand { get; set; }
|
||||
@@ -200,6 +202,8 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
MessageInput = string.Empty;
|
||||
|
||||
IsSending = false;
|
||||
|
||||
SendNewMessageSuccess?.Invoke(this, EventArgs.Empty);
|
||||
},
|
||||
(exception) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user