diff --git a/Desktop/Views/Windows/DanmaOnlyWindow.xaml b/Desktop/Views/Windows/DanmaOnlyWindow.xaml index 53746e703..956d57683 100644 --- a/Desktop/Views/Windows/DanmaOnlyWindow.xaml +++ b/Desktop/Views/Windows/DanmaOnlyWindow.xaml @@ -35,7 +35,7 @@ - + diff --git a/Desktop/Views/Windows/DanmaOnlyWindow.xaml.cs b/Desktop/Views/Windows/DanmaOnlyWindow.xaml.cs index 132373bfb..44b36567c 100644 --- a/Desktop/Views/Windows/DanmaOnlyWindow.xaml.cs +++ b/Desktop/Views/Windows/DanmaOnlyWindow.xaml.cs @@ -163,5 +163,19 @@ private void DanmaOnly_DanmaInput_TextChanged(object sender, TextChangedEventArg textBox.SelectionStart = selectionStart > 20 ? 20 : selectionStart; } } + + private void DanmaOnly_DanmaInput_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) + { + if (e.KeyStates == Keyboard.GetKeyStates(Key.Enter)) + { + string T = DanmaOnly_DanmaInput.Text; + if (string.IsNullOrEmpty(T) && T.Length > 20) + { + return; + } + Danmu.SendDanmu(roomCard.RoomId.ToString(), T); + DanmaOnly_DanmaInput.Clear(); + } + } } } diff --git a/Desktop/Views/Windows/VlcPlayWindow.xaml.cs b/Desktop/Views/Windows/VlcPlayWindow.xaml.cs index 471809e41..cee01313c 100644 --- a/Desktop/Views/Windows/VlcPlayWindow.xaml.cs +++ b/Desktop/Views/Windows/VlcPlayWindow.xaml.cs @@ -407,7 +407,6 @@ private void AddDanmu(string DanmuText, bool IsSubtitle, long uid = 0) break; } } - double b = Core.Init.GetRunTime(); danMuOrbitInfos[Index].Time = (int)(Init.GetRunTime() + 5); //非UI线程调用UI组件 System.Windows.Application.Current.Dispatcher.Invoke(async () =>