This commit is contained in:
PrefacedCorg
2026-04-17 09:26:29 +08:00
parent c4b5be783e
commit 7003bb8426
3 changed files with 19 additions and 9 deletions
+5 -5
View File
@@ -4509,7 +4509,7 @@
Label="上一页"
IconGeometry="F1 M24,24z M0,0z M7.40091,10.456L14.5033,3.35357 12.3198,1.17001 1.48978,12 12.3198,22.83 14.5033,20.6465 7.40089,13.544 22.5102,13.544 22.5102,10.456 7.40091,10.456z"
IsEnabledBinding="{Binding ElementName=BtnWhiteBoardSwitchPrevious, Path=IsEnabled}"
ButtonMouseUp="BtnWhiteBoardSwitchPrevious_Click" />
ButtonMouseUp="BoardBtnWhiteBoardSwitchPrevious_MouseUp" />
<Border Width="75" Height="50" MouseUp="BtnWhiteBoardPageIndex_Click"
Name="BtnLeftPageListWB"
BorderThickness="1,1,1,1" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}" Background="{DynamicResource BoardFloatBarBackground}"
@@ -4587,7 +4587,7 @@
Label="下一页"
IconGeometry="F1 M24,24z M0,0z M16.5991,10.456L9.49667,3.35357 11.6802,1.17001 22.5102,12 11.6802,22.83 9.49667,20.6465 16.5991,13.544 1.48978,13.544 1.48978,10.456 16.5991,10.456z"
IsEnabledBinding="{Binding ElementName=BtnWhiteBoardSwitchNext, Path=IsEnabled}"
ButtonMouseUp="BtnWhiteBoardSwitchNext_Click" />
ButtonMouseUp="BoardBtnWhiteBoardSwitchNext_MouseUp" />
</ikw:SimpleStackPanel>
</Border>
<Border Width="60" Height="50"
@@ -5715,7 +5715,7 @@
Position="Single"
Label="{i18n:I18n Key=Board_NewPage}"
IconGeometry="F0 M24,24z M0,0z M7.39778,13.723L10.7693,13.723 10.7693,10.3514 13.2307,10.3514 13.2307,13.723 16.6022,13.723 16.6022,16.1843 13.2307,16.1843 13.2307,19.5559 10.7693,19.5559 10.7693,16.1843 7.39778,16.1843 7.39778,13.723z M3.1391,1.17001L3.1391,22.83 20.8609,22.83 20.8609,6.66948 15.3614,1.17002 3.1391,1.17001z M12.9846,3.13911L5.10819,3.1391 5.10819,20.8609 18.8918,20.8609 18.8918,9.04638 12.9846,9.04638 12.9846,3.13911z M18.484,7.07729L14.9536,3.54692 14.9536,7.07729 18.484,7.07729z"
ButtonMouseUp="BtnWhiteBoardAdd_Click" />
ButtonMouseUp="BoardBtnWhiteBoardAdd_MouseUp" />
<Border CornerRadius="5,5,5,5" Background="{DynamicResource BoardFloatBarBackground}" Margin="0,0,0,0">
<ikw:SimpleStackPanel Orientation="Horizontal">
<controls:BoardToolbarButton x:Name="BtnRightWhiteBoardSwitchPrevious"
@@ -5723,7 +5723,7 @@
Label="{i18n:I18n Key=Board_PreviousPage}"
IconGeometry="F1 M24,24z M0,0z M7.40091,10.456L14.5033,3.35357 12.3198,1.17001 1.48978,12 12.3198,22.83 14.5033,20.6465 7.40089,13.544 22.5102,13.544 22.5102,10.456 7.40091,10.456z"
IsEnabledBinding="{Binding ElementName=BtnWhiteBoardSwitchPrevious, Path=IsEnabled}"
ButtonMouseUp="BtnWhiteBoardSwitchPrevious_Click" />
ButtonMouseUp="BoardBtnWhiteBoardSwitchPrevious_MouseUp" />
<Border Width="75" Height="50" MouseUp="BtnWhiteBoardPageIndex_Click"
Name="BtnRightPageListWB"
BorderThickness="1,1,1,1" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}" Background="{DynamicResource BoardFloatBarBackground}"
@@ -5801,7 +5801,7 @@
Label="{i18n:I18n Key=Board_NextPage}"
IconGeometry="F1 M24,24z M0,0z M16.5991,10.456L9.49667,3.35357 11.6802,1.17001 22.5102,12 11.6802,22.83 9.49667,20.6465 16.5991,13.544 1.48978,13.544 1.48978,10.456 16.5991,10.456z"
IsEnabledBinding="{Binding ElementName=BtnWhiteBoardSwitchNext, Path=IsEnabled}"
ButtonMouseUp="BtnWhiteBoardSwitchNext_Click" />
ButtonMouseUp="BoardBtnWhiteBoardSwitchNext_MouseUp" />
</ikw:SimpleStackPanel>
</Border>
</ikw:SimpleStackPanel>
+13 -3
View File
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
@@ -426,7 +427,10 @@ namespace Ink_Canvas
/// <remarks>
/// 该方法在切换前会取消当前选中元素(同时保留并恢复编辑模式)、调用视频呈现器的离开页前钩子、保存当前页的笔迹与元素、清空画布;切换到前一页后恢复该页内容、调用视频呈现器的页已更改钩子并刷新页面索引显示。
/// </remarks>
private void BtnWhiteBoardSwitchPrevious_Click(object sender, MouseButtonEventArgs e)
private void BoardBtnWhiteBoardSwitchPrevious_MouseUp(object sender, MouseButtonEventArgs e)
=> BtnWhiteBoardSwitchPrevious_Click(sender, e);
private void BtnWhiteBoardSwitchPrevious_Click(object sender, RoutedEventArgs e)
{
if (CurrentWhiteboardIndex <= 1) return;
@@ -458,7 +462,10 @@ namespace Ink_Canvas
/// </summary>
/// <param name="sender">触发事件的源对象(通常为按钮)。</param>
/// <param name="e">事件参数。</param>
private void BtnWhiteBoardSwitchNext_Click(object sender, MouseButtonEventArgs e)
private void BoardBtnWhiteBoardSwitchNext_MouseUp(object sender, MouseButtonEventArgs e)
=> BtnWhiteBoardSwitchNext_Click(sender, e);
private void BtnWhiteBoardSwitchNext_Click(object sender, RoutedEventArgs e)
{
if (CurrentWhiteboardIndex < WhiteboardTotalCount &&
Settings.Automation.IsAutoSaveStrokesAtClear &&
@@ -505,7 +512,10 @@ namespace Ink_Canvas
/// - 将当前页面的历史保存到时间轴并清空画布,然后在白板集合中插入一个空白页面(其历史为 null),随后恢复该页面并触发页面变更回调。
/// - 更新页码显示并在达到上限时禁用添加按钮;若侧边页列表可见,则刷新该列表。
/// </remarks>
private void BtnWhiteBoardAdd_Click(object sender, MouseButtonEventArgs e)
private void BoardBtnWhiteBoardAdd_MouseUp(object sender, MouseButtonEventArgs e)
=> BtnWhiteBoardAdd_Click(sender, e);
private void BtnWhiteBoardAdd_Click(object sender, RoutedEventArgs e)
{
if (WhiteboardTotalCount >= 99) return;
if (Settings.Automation.IsAutoSaveStrokesAtClear &&
+1 -1
View File
@@ -353,7 +353,7 @@ namespace Ink_Canvas
await Task.Delay(150);
}
BtnWhiteBoardAdd_Click(null, EventArgs.Empty);
BtnWhiteBoardAdd_Click(null, new RoutedEventArgs());
await InsertBitmapSourceToCanvas(bitmapSourceForClipboard);
}