improve:展台

This commit is contained in:
2026-02-23 13:40:19 +08:00
parent 1fb0ea29a3
commit 5119652ca5
4 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -40,13 +40,13 @@ namespace Ink_Canvas.Helpers
public int ResolutionWidth
{
get => _resolutionWidth;
set => _resolutionWidth = Math.Max(320, Math.Min(1920, value));
set => _resolutionWidth = Math.Max(320, Math.Min(3840, value));
}
public int ResolutionHeight
{
get => _resolutionHeight;
set => _resolutionHeight = Math.Max(240, Math.Min(1080, value));
set => _resolutionHeight = Math.Max(240, Math.Min(2160, value));
}
public CameraService()
+1 -1
View File
@@ -10683,7 +10683,7 @@
<Grid Grid.Row="1" HorizontalAlignment="Center" Margin="10,6,10,4">
<Border Background="{DynamicResource FloatBarBackground}"
CornerRadius="8" BorderThickness="1" BorderBrush="#616161"
Width="280" Height="40" ToolTip="展台/截图分辨率">
Width="282" Height="40" ToolTip="展台/截图分辨率">
<Grid>
<Border x:Name="BoothResolutionTabIndicator"
Background="#66CCFF"
+1
View File
@@ -3396,6 +3396,7 @@ namespace Ink_Canvas
_boothResolutionWidth = w;
_boothResolutionHeight = h;
UpdateBoothResolutionTabState();
SyncBoothResolutionToCameraService();
}
}
}
@@ -20,7 +20,7 @@ namespace Ink_Canvas
{
public partial class MainWindow : Window
{
private static readonly SolidColorBrush BoothButtonHighlightBrush = new SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#66CCFF"));
private static readonly SolidColorBrush BoothButtonHighlightBrush = new SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#FF66CCFF"));
private bool _boothButtonPressHandlersAttached;
// 标记:用于在保存/恢复白板内容时排除“展台实时上屏”画面
@@ -153,6 +153,14 @@ namespace Ink_Canvas
_cameraService = new CameraService();
_cameraService.FrameReceived += CameraService_FrameReceived;
_cameraService.ErrorOccurred += CameraService_ErrorOccurred;
SyncBoothResolutionToCameraService();
}
internal void SyncBoothResolutionToCameraService()
{
if (_cameraService == null) return;
_cameraService.ResolutionWidth = BoothResolutionWidth;
_cameraService.ResolutionHeight = BoothResolutionHeight;
}
/// <summary>