add:issue #156
This commit is contained in:
@@ -1895,6 +1895,16 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
Text="# 允许开启画板时使用手指手势进行幻灯片翻页(启用后,在幻灯片放映模式下,当画板无墨迹时,使用手指(笔尖或手掌无法识别)左右滑动即可控制幻灯片翻页。)"
|
Text="# 允许开启画板时使用手指手势进行幻灯片翻页(启用后,在幻灯片放映模式下,当画板无墨迹时,使用手指(笔尖或手掌无法识别)左右滑动即可控制幻灯片翻页。)"
|
||||||
TextWrapping="Wrap" Foreground="#a1a1aa" />
|
TextWrapping="Wrap" Foreground="#a1a1aa" />
|
||||||
|
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
|
<TextBlock Foreground="#fafafa" Text="PPT 放映模式显示手势按钮" VerticalAlignment="Center"
|
||||||
|
FontSize="14" Margin="0,0,16,0" />
|
||||||
|
<ui:ToggleSwitch OnContent="" OffContent=""
|
||||||
|
Name="ToggleSwitchShowGestureButtonInSlideShow" IsOn="False"
|
||||||
|
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
|
||||||
|
Toggled="ToggleSwitchShowGestureButtonInSlideShow_Toggled" />
|
||||||
|
</ui:SimpleStackPanel>
|
||||||
|
<TextBlock Text="# 开启后在 PPT 放映模式下也显示手势按钮" TextWrapping="Wrap"
|
||||||
|
Foreground="#a1a1aa" />
|
||||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
|
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
|
||||||
StrokeThickness="1" Margin="0,4,0,4" />
|
StrokeThickness="1" Margin="0,4,0,4" />
|
||||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
|
|||||||
@@ -2139,6 +2139,56 @@ namespace Ink_Canvas
|
|||||||
LogHelper.WriteLogToFile($"批注子面板中切换墨迹渐隐功能时出错: {ex.Message}", LogHelper.LogType.Error);
|
LogHelper.WriteLogToFile($"批注子面板中切换墨迹渐隐功能时出错: {ex.Message}", LogHelper.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPT放映模式显示手势按钮开关切换事件处理
|
||||||
|
/// </summary>
|
||||||
|
private void ToggleSwitchShowGestureButtonInSlideShow_Toggled(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!isLoaded) return;
|
||||||
|
var toggle = sender as ToggleSwitch;
|
||||||
|
Settings.PowerPointSettings.ShowGestureButtonInSlideShow = toggle != null && toggle.IsOn;
|
||||||
|
SaveSettingsToFile();
|
||||||
|
|
||||||
|
// 如果当前在PPT放映模式,需要立即更新手势按钮的显示状态
|
||||||
|
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||||
|
{
|
||||||
|
UpdateGestureButtonVisibilityInPPTMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
LogHelper.WriteLogToFile($"PPT放映模式显示手势按钮已{(Settings.PowerPointSettings.ShowGestureButtonInSlideShow ? "启用" : "禁用")}", LogHelper.LogType.Event);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogToFile($"切换PPT放映模式显示手势按钮时出错: {ex.Message}", LogHelper.LogType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新PPT模式下手势按钮的显示状态
|
||||||
|
/// </summary>
|
||||||
|
private void UpdateGestureButtonVisibilityInPPTMode()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Settings.PowerPointSettings.ShowGestureButtonInSlideShow)
|
||||||
|
{
|
||||||
|
// 如果启用了PPT放映模式显示手势按钮,则显示手势按钮(在PPT模式下不依赖手势功能是否启用)
|
||||||
|
CheckEnableTwoFingerGestureBtnVisibility(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 如果禁用了PPT放映模式显示手势按钮,则隐藏手势按钮
|
||||||
|
EnableTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogToFile($"更新PPT模式下手势按钮显示状态时出错: {ex.Message}", LogHelper.LogType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PPT翻页直接传递
|
#region PPT翻页直接传递
|
||||||
|
|||||||
@@ -130,10 +130,18 @@ namespace Ink_Canvas
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void CheckEnableTwoFingerGestureBtnVisibility(bool isVisible)
|
private void CheckEnableTwoFingerGestureBtnVisibility(bool isVisible)
|
||||||
{
|
{
|
||||||
// 在PPT模式下始终隐藏手势按钮
|
// 在PPT模式下根据设置决定是否显示手势按钮
|
||||||
if (currentMode == 0 || BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
if (currentMode == 0 || BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
|
||||||
{
|
{
|
||||||
EnableTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
|
// 如果启用了PPT放映模式显示手势按钮,则显示手势按钮(在PPT模式下不依赖手势功能是否启用)
|
||||||
|
if (Settings.PowerPointSettings.ShowGestureButtonInSlideShow && isVisible)
|
||||||
|
{
|
||||||
|
EnableTwoFingerGestureBorder.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnableTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -643,10 +643,24 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
BorderFloatingBarMainControls.Visibility = Visibility.Visible;
|
BorderFloatingBarMainControls.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
// 在PPT模式下隐藏手势面板和手势按钮
|
// 在PPT模式下根据设置决定是否隐藏手势面板和手势按钮
|
||||||
AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder);
|
AnimationsHelper.HideWithSlideAndFade(TwoFingerGestureBorder);
|
||||||
AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder);
|
AnimationsHelper.HideWithSlideAndFade(BoardTwoFingerGestureBorder);
|
||||||
EnableTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
|
|
||||||
|
// 根据设置决定是否在PPT放映模式下显示手势按钮
|
||||||
|
if (Settings.PowerPointSettings.ShowGestureButtonInSlideShow)
|
||||||
|
{
|
||||||
|
// 如果启用了PPT放映模式显示手势按钮,则显示手势按钮
|
||||||
|
if (Settings.Gesture.IsEnableTwoFingerGesture)
|
||||||
|
{
|
||||||
|
CheckEnableTwoFingerGestureBtnVisibility(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 如果禁用了PPT放映模式显示手势按钮,则隐藏手势按钮
|
||||||
|
EnableTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow &&
|
if (Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow &&
|
||||||
!Settings.Automation.IsAutoFoldInPPTSlideShow)
|
!Settings.Automation.IsAutoFoldInPPTSlideShow)
|
||||||
|
|||||||
@@ -309,6 +309,8 @@ namespace Ink_Canvas
|
|||||||
public bool IsAlwaysGoToFirstPageOnReenter { get; set; }
|
public bool IsAlwaysGoToFirstPageOnReenter { get; set; }
|
||||||
[JsonProperty("enablePowerPointEnhancement")]
|
[JsonProperty("enablePowerPointEnhancement")]
|
||||||
public bool EnablePowerPointEnhancement { get; set; } = false;
|
public bool EnablePowerPointEnhancement { get; set; } = false;
|
||||||
|
[JsonProperty("showGestureButtonInSlideShow")]
|
||||||
|
public bool ShowGestureButtonInSlideShow { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Automation
|
public class Automation
|
||||||
|
|||||||
Reference in New Issue
Block a user