improve:展台
This commit is contained in:
@@ -40,13 +40,13 @@ namespace Ink_Canvas.Helpers
|
|||||||
public int ResolutionWidth
|
public int ResolutionWidth
|
||||||
{
|
{
|
||||||
get => _resolutionWidth;
|
get => _resolutionWidth;
|
||||||
set => _resolutionWidth = Math.Max(320, Math.Min(1920, value));
|
set => _resolutionWidth = Math.Max(320, Math.Min(3840, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ResolutionHeight
|
public int ResolutionHeight
|
||||||
{
|
{
|
||||||
get => _resolutionHeight;
|
get => _resolutionHeight;
|
||||||
set => _resolutionHeight = Math.Max(240, Math.Min(1080, value));
|
set => _resolutionHeight = Math.Max(240, Math.Min(2160, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CameraService()
|
public CameraService()
|
||||||
|
|||||||
@@ -10683,7 +10683,7 @@
|
|||||||
<Grid Grid.Row="1" HorizontalAlignment="Center" Margin="10,6,10,4">
|
<Grid Grid.Row="1" HorizontalAlignment="Center" Margin="10,6,10,4">
|
||||||
<Border Background="{DynamicResource FloatBarBackground}"
|
<Border Background="{DynamicResource FloatBarBackground}"
|
||||||
CornerRadius="8" BorderThickness="1" BorderBrush="#616161"
|
CornerRadius="8" BorderThickness="1" BorderBrush="#616161"
|
||||||
Width="280" Height="40" ToolTip="展台/截图分辨率">
|
Width="282" Height="40" ToolTip="展台/截图分辨率">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="BoothResolutionTabIndicator"
|
<Border x:Name="BoothResolutionTabIndicator"
|
||||||
Background="#66CCFF"
|
Background="#66CCFF"
|
||||||
|
|||||||
@@ -3396,6 +3396,7 @@ namespace Ink_Canvas
|
|||||||
_boothResolutionWidth = w;
|
_boothResolutionWidth = w;
|
||||||
_boothResolutionHeight = h;
|
_boothResolutionHeight = h;
|
||||||
UpdateBoothResolutionTabState();
|
UpdateBoothResolutionTabState();
|
||||||
|
SyncBoothResolutionToCameraService();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
public partial class MainWindow : Window
|
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;
|
private bool _boothButtonPressHandlersAttached;
|
||||||
|
|
||||||
// 标记:用于在保存/恢复白板内容时排除“展台实时上屏”画面
|
// 标记:用于在保存/恢复白板内容时排除“展台实时上屏”画面
|
||||||
@@ -153,6 +153,14 @@ namespace Ink_Canvas
|
|||||||
_cameraService = new CameraService();
|
_cameraService = new CameraService();
|
||||||
_cameraService.FrameReceived += CameraService_FrameReceived;
|
_cameraService.FrameReceived += CameraService_FrameReceived;
|
||||||
_cameraService.ErrorOccurred += CameraService_ErrorOccurred;
|
_cameraService.ErrorOccurred += CameraService_ErrorOccurred;
|
||||||
|
SyncBoothResolutionToCameraService();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SyncBoothResolutionToCameraService()
|
||||||
|
{
|
||||||
|
if (_cameraService == null) return;
|
||||||
|
_cameraService.ResolutionWidth = BoothResolutionWidth;
|
||||||
|
_cameraService.ResolutionHeight = BoothResolutionHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user