diff --git a/Core/Config.cs b/Core/Config.cs index cfa3fdb9..1c5517c4 100644 --- a/Core/Config.cs +++ b/Core/Config.cs @@ -750,10 +750,10 @@ public string _MainDomainName } } - private static string HTTP_UA = $"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"; + private static string HTTP_UA = $"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0"; /// /// 请求是默认使用的UA(字符串) - /// 默认值:$"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0" + /// 默认值:$"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" /// public string _HTTP_UA { get { return HTTP_UA; } } diff --git a/Desktop/Views/Windows/VlcPlayWindow.xaml.cs b/Desktop/Views/Windows/VlcPlayWindow.xaml.cs index 0b492680..e7061835 100644 --- a/Desktop/Views/Windows/VlcPlayWindow.xaml.cs +++ b/Desktop/Views/Windows/VlcPlayWindow.xaml.cs @@ -18,6 +18,7 @@ using Key = System.Windows.Input.Key; using MenuItem = Wpf.Ui.Controls.MenuItem; + namespace Desktop.Views.Windows { /// @@ -60,6 +61,10 @@ public partial class VlcPlayWindow : FluentWindow /// 宽高比是否初始化 /// public bool InitializeAspectRatio = false; + /// + /// 用于跟踪当前是否为全屏状态 + /// + public bool isFullScreen = false; public class DanMuOrbitInfo { public string Text { get; set; } @@ -398,10 +403,37 @@ private void FluentWindow_Closing(object sender, System.ComponentModel.CancelEve } } + private DateTime lastClickTime = DateTime.MinValue; // 上次点击的时间 private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.DragMove(); + DateTime now = DateTime.Now; + // 检查是否为双击(两次点击间隔小于系统双击时间) + if ((now - lastClickTime).TotalMilliseconds <= SystemInformation.DoubleClickTime) + { + ToggleFullScreen(); + } + lastClickTime = now; + } + private void ToggleFullScreen() + { + if (!isFullScreen) + { + // 切换到全屏模式 + this.WindowStyle = WindowStyle.None; + this.WindowState = WindowState.Maximized; + this.ResizeMode = ResizeMode.NoResize; + isFullScreen = true; + } + else + { + // 切换回窗口模式 + this.WindowStyle = WindowStyle.SingleBorderWindow; + this.WindowState = WindowState.Normal; + this.ResizeMode = ResizeMode.CanResize; + isFullScreen = false; + } } private void Grid_MouseWheel(object sender, MouseWheelEventArgs e) @@ -682,5 +714,7 @@ private void MenuItem_OpenLiveUlr_Click(object sender, RoutedEventArgs e) }; Process.Start(psi); } + + } }