improve:展台UI
This commit is contained in:
+54
-34
@@ -4973,7 +4973,7 @@
|
|||||||
<Border Margin="0,4" Width="160" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}"
|
<Border Margin="0,4" Width="160" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}"
|
||||||
BorderThickness="1">
|
BorderThickness="1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Viewbox Width="160">
|
<Viewbox Width="160" Height="120" Stretch="Uniform">
|
||||||
<InkCanvas EditingMode="None"
|
<InkCanvas EditingMode="None"
|
||||||
Background="{Binding ElementName=GridBackgroundCover, Path=Background}"
|
Background="{Binding ElementName=GridBackgroundCover, Path=Background}"
|
||||||
Strokes="{Binding Strokes}"
|
Strokes="{Binding Strokes}"
|
||||||
@@ -7141,7 +7141,7 @@
|
|||||||
<Border Margin="0,4" Width="160" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}"
|
<Border Margin="0,4" Width="160" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}"
|
||||||
BorderThickness="1">
|
BorderThickness="1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Viewbox Width="160">
|
<Viewbox Width="160" Height="120" Stretch="Uniform">
|
||||||
<InkCanvas EditingMode="None"
|
<InkCanvas EditingMode="None"
|
||||||
Background="{Binding ElementName=GridBackgroundCover, Path=Background}"
|
Background="{Binding ElementName=GridBackgroundCover, Path=Background}"
|
||||||
Strokes="{Binding Strokes}"
|
Strokes="{Binding Strokes}"
|
||||||
@@ -10540,7 +10540,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="60" />
|
<RowDefinition Height="110" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- 顶部标题栏 -->
|
<!-- 顶部标题栏 -->
|
||||||
@@ -10627,71 +10627,91 @@
|
|||||||
|
|
||||||
<!-- 底部按钮区域 -->
|
<!-- 底部按钮区域 -->
|
||||||
<Grid Grid.Row="4" Margin="0,0,0,6">
|
<Grid Grid.Row="4" Margin="0,0,0,6">
|
||||||
<WrapPanel
|
<Grid.RowDefinitions>
|
||||||
Margin="10,5"
|
<RowDefinition Height="Auto" />
|
||||||
HorizontalAlignment="Center"
|
<RowDefinition Height="Auto" />
|
||||||
VerticalAlignment="Center"
|
</Grid.RowDefinitions>
|
||||||
Orientation="Horizontal"
|
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,4,10,2">
|
||||||
ItemHeight="40">
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="BtnToggleVideoPresenterLiveOnCanvas"
|
x:Name="BtnToggleVideoPresenterLiveOnCanvas"
|
||||||
|
Width="70"
|
||||||
Height="40"
|
Height="40"
|
||||||
Margin="3,0"
|
Margin="2,0"
|
||||||
Background="{DynamicResource FloatBarBackground}"
|
Background="{DynamicResource FloatBarBackground}"
|
||||||
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Checked="BtnToggleVideoPresenterLiveOnCanvas_Checked"
|
Checked="BtnToggleVideoPresenterLiveOnCanvas_Checked"
|
||||||
Unchecked="BtnToggleVideoPresenterLiveOnCanvas_Unchecked">
|
Unchecked="BtnToggleVideoPresenterLiveOnCanvas_Unchecked">
|
||||||
<TextBlock
|
<TextBlock FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Text="上屏" />
|
||||||
FontSize="12"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
Foreground="{DynamicResource FloatBarForeground}"
|
|
||||||
Text="上屏" />
|
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="ToggleBtnPhotoCorrection"
|
x:Name="ToggleBtnPhotoCorrection"
|
||||||
|
Width="70"
|
||||||
Height="40"
|
Height="40"
|
||||||
Margin="3,0"
|
Margin="2,0"
|
||||||
Background="{DynamicResource FloatBarBackground}"
|
Background="{DynamicResource FloatBarBackground}"
|
||||||
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Checked="ToggleBtnPhotoCorrection_Checked"
|
Checked="ToggleBtnPhotoCorrection_Checked"
|
||||||
Unchecked="ToggleBtnPhotoCorrection_Unchecked">
|
Unchecked="ToggleBtnPhotoCorrection_Unchecked">
|
||||||
<TextBlock
|
<TextBlock FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Text="矫正" />
|
||||||
FontSize="12"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
Foreground="{DynamicResource FloatBarForeground}"
|
|
||||||
Text="矫正" />
|
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Button
|
<Button
|
||||||
x:Name="BtnCapturePhoto"
|
x:Name="BtnCapturePhoto"
|
||||||
|
Width="70"
|
||||||
Height="40"
|
Height="40"
|
||||||
Margin="3,0"
|
Margin="2,0"
|
||||||
Background="{DynamicResource FloatBarBackground}"
|
Background="{DynamicResource FloatBarBackground}"
|
||||||
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Click="BtnCapturePhoto_Click">
|
Click="BtnCapturePhoto_Click">
|
||||||
<TextBlock
|
<TextBlock FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Text="拍照" />
|
||||||
FontSize="12"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
Foreground="{DynamicResource FloatBarForeground}"
|
|
||||||
Text="拍照" />
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
x:Name="BtnRotateImage"
|
x:Name="BtnRotateImage"
|
||||||
|
Width="70"
|
||||||
Height="40"
|
Height="40"
|
||||||
Margin="3,0"
|
Margin="2,0"
|
||||||
Background="{DynamicResource FloatBarBackground}"
|
Background="{DynamicResource FloatBarBackground}"
|
||||||
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
BorderBrush="{DynamicResource FloatBarBorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Click="BtnRotateImage_Click">
|
Click="BtnRotateImage_Click">
|
||||||
<TextBlock
|
<TextBlock FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Text="旋转" />
|
||||||
FontSize="12"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
Foreground="{DynamicResource FloatBarForeground}"
|
|
||||||
Text="旋转" />
|
|
||||||
</Button>
|
</Button>
|
||||||
</WrapPanel>
|
</StackPanel>
|
||||||
|
<!-- 分辨率 Tab -->
|
||||||
|
<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="展台/截图分辨率">
|
||||||
|
<Grid>
|
||||||
|
<Border x:Name="BoothResolutionTabIndicator"
|
||||||
|
Background="#66CCFF"
|
||||||
|
CornerRadius="6"
|
||||||
|
Width="68" Height="38"
|
||||||
|
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||||
|
Margin="1,0,0,0"/>
|
||||||
|
<Grid>
|
||||||
|
<Button x:Name="BtnBoothResolution720" Width="70" Height="40" Background="Transparent" BorderThickness="0"
|
||||||
|
Click="BoothResolutionTab_Click" Tag="1280,720" Cursor="Hand" HorizontalAlignment="Left">
|
||||||
|
<TextBlock Text="720p" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Opacity="0.7"/>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="BtnBoothResolution1080" Width="70" Height="40" Background="Transparent" BorderThickness="0"
|
||||||
|
Click="BoothResolutionTab_Click" Tag="1920,1080" Cursor="Hand" HorizontalAlignment="Left" Margin="70,0,0,0">
|
||||||
|
<TextBlock x:Name="TbBoothResolution1080" Text="1080p" FontSize="12" FontWeight="Bold" Foreground="White"/>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="BtnBoothResolution2K" Width="70" Height="40" Background="Transparent" BorderThickness="0"
|
||||||
|
Click="BoothResolutionTab_Click" Tag="2560,1440" Cursor="Hand" HorizontalAlignment="Left" Margin="140,0,0,0">
|
||||||
|
<TextBlock Text="2K" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Opacity="0.7"/>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="BtnBoothResolution4K" Width="70" Height="40" Background="Transparent" BorderThickness="0"
|
||||||
|
Click="BoothResolutionTab_Click" Tag="3840,2160" Cursor="Hand" HorizontalAlignment="Left" Margin="210,0,0,0">
|
||||||
|
<TextBlock Text="4K" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource FloatBarForeground}" Opacity="0.7"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ namespace Ink_Canvas
|
|||||||
// 全屏处理状态标志
|
// 全屏处理状态标志
|
||||||
public bool isFullScreenApplied = false;
|
public bool isFullScreenApplied = false;
|
||||||
|
|
||||||
|
private int _boothResolutionWidth = 1920;
|
||||||
|
private int _boothResolutionHeight = 1080;
|
||||||
|
public int BoothResolutionWidth => _boothResolutionWidth;
|
||||||
|
public int BoothResolutionHeight => _boothResolutionHeight;
|
||||||
|
|
||||||
private static Cursor _cachedPenCursor = null;
|
private static Cursor _cachedPenCursor = null;
|
||||||
private static readonly object _cursorLock = new object();
|
private static readonly object _cursorLock = new object();
|
||||||
|
|
||||||
@@ -3377,6 +3382,61 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 展台/白板分辨率切换
|
||||||
|
private const int BoothResolutionTabCount = 4;
|
||||||
|
private static readonly (int w, int h)[] BoothResolutionValues = { (1280, 720), (1920, 1080), (2560, 1440), (3840, 2160) };
|
||||||
|
|
||||||
|
private void BoothResolutionTab_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Button btn && btn.Tag is string tag)
|
||||||
|
{
|
||||||
|
var parts = tag.Split(',');
|
||||||
|
if (parts.Length == 2 && int.TryParse(parts[0].Trim(), out int w) && int.TryParse(parts[1].Trim(), out int h) && w > 0 && h > 0)
|
||||||
|
{
|
||||||
|
_boothResolutionWidth = w;
|
||||||
|
_boothResolutionHeight = h;
|
||||||
|
UpdateBoothResolutionTabState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateBoothResolutionTabState()
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
for (int i = 0; i < BoothResolutionValues.Length; i++)
|
||||||
|
{
|
||||||
|
if (BoothResolutionValues[i].w == _boothResolutionWidth && BoothResolutionValues[i].h == _boothResolutionHeight)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BoothResolutionTabIndicator != null)
|
||||||
|
{
|
||||||
|
BoothResolutionTabIndicator.Margin = new Thickness(1 + index * 70, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var texts = new[] { BtnBoothResolution720?.Content as TextBlock, BtnBoothResolution1080?.Content as TextBlock, BtnBoothResolution2K?.Content as TextBlock, BtnBoothResolution4K?.Content as TextBlock };
|
||||||
|
for (int i = 0; i < texts.Length && i < 4; i++)
|
||||||
|
{
|
||||||
|
if (texts[i] == null) continue;
|
||||||
|
if (i == index)
|
||||||
|
{
|
||||||
|
texts[i].FontWeight = FontWeights.Bold;
|
||||||
|
texts[i].Foreground = new SolidColorBrush(Colors.White);
|
||||||
|
texts[i].Opacity = 1.0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
texts[i].FontWeight = FontWeights.SemiBold;
|
||||||
|
texts[i].SetResourceReference(TextBlock.ForegroundProperty, "FloatBarForeground");
|
||||||
|
texts[i].Opacity = 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 墨迹渐隐功能
|
#region 墨迹渐隐功能
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 墨迹渐隐开关切换事件处理
|
/// 墨迹渐隐开关切换事件处理
|
||||||
|
|||||||
Reference in New Issue
Block a user