[update] PPT按钮基本可用(没空修Bug了)

This commit is contained in:
Dubi906w 2024-06-14 22:15:33 +08:00
parent e97a8d6caa
commit 689caf0a1a
9 changed files with 653 additions and 245 deletions

View File

@ -891,14 +891,14 @@
显示页码
</CheckBox>
<CheckBox IsChecked="True" MinWidth="0" Name="CheckboxBPPTHalfOpacity"
Checked="CheckboxBPPTSHalfOpacity_IsCheckChange"
Unchecked="CheckboxBPPTSHalfOpacity_IsCheckChange"
Checked="CheckboxBPPTHalfOpacity_IsCheckChange"
Unchecked="CheckboxBPPTHalfOpacity_IsCheckChange"
Margin="16,0,0,0">
半透明
</CheckBox>
<CheckBox IsChecked="True" MinWidth="0" Name="CheckboxBPPTBlackBackground"
Checked="CheckboxBPPTSBlackBackground_IsCheckChange"
Unchecked="CheckboxBPPTSBlackBackground_IsCheckChange"
Checked="CheckboxBPPTBlackBackground_IsCheckChange"
Unchecked="CheckboxBPPTBlackBackground_IsCheckChange"
Margin="16,0,0,0">
黑色背景
</CheckBox>
@ -917,33 +917,6 @@
Text="# 开启该选项后点击页码按钮可以唤起PowerPoint自带的网格缩略图视图。WPS不支持该功能开启也没用。"
TextWrapping="Wrap" Foreground="#a1a1aa" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Visibility="Collapsed" Orientation="Horizontal"
HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="显示 PPT 浏览切页按钮(页码按钮)"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchShowButtonPPTNavigation" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchShowButtonPPTNavigation_OnToggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Visibility="Collapsed" Orientation="Horizontal"
HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="显示 PPT 下方翻页控制按钮"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchShowBottomPPTNavigationPanel" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchShowBottomPPTNavigationPanel_OnToggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Visibility="Collapsed" Orientation="Horizontal"
HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="显示 PPT 侧边翻页控制按钮"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchShowSidePPTNavigationPanel" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchShowSidePPTNavigationPanel_OnToggled" />
</ui:SimpleStackPanel>
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
StrokeThickness="1" Margin="0,4,0,4" />
<ui:SimpleStackPanel Name="SettingsShowCanvasAtNewSlideShowStackPanel"
@ -2273,7 +2246,7 @@
TouchUp="GridInkCanvasSelectionCover_TouchUp"
Background="#01FFFFFF" Opacity="0.01" Visibility="Visible" Margin="1,0,-1,0" />
<Border Name="BorderStrokeSelectionControl"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,900,0,0"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="800,900,0,0"
CornerRadius="5" Height="80"
Background="{DynamicResource FloatBarBackground}"
Visibility="{Binding ElementName=GridInkCanvasSelectionCover, Path=Visibility}"
@ -2399,7 +2372,7 @@
<Border Visibility="{Binding ElementName=PptNavigationBtn, Path=Visibility}" Width="36"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid MouseUp="PPTNavigationBtn_Click">
<Grid MouseUp="PPTNavigationBtn_MouseUp">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{Binding ElementName=PptNavigationTextBlock, Path=Foreground}"
FontSize="{Binding ElementName=PptNavigationTextBlock, Path=FontSize}"
@ -4809,146 +4782,284 @@
</Viewbox>
<!--// PPT 工具栏 //-->
<Grid Name="GridForRecoverOldUI">
<Grid Visibility="{Binding ElementName=StackPanelPPTControls, Path=Visibility}">
<Viewbox Name="BottomViewboxPPTSidesControl" Visibility="Visible" Opacity="0.5" Margin="5" Height="40"
<Grid>
<Grid Visibility="Visible">
<Viewbox x:Name="LeftBottomPanelForPPTNavigation" Visibility="Collapsed" Margin="6,0,0,6" Height="50"
HorizontalAlignment="Left" VerticalAlignment="Bottom">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="3.5">
<Border Width="36" MouseUp="GridPPTControlPrevious_MouseUp" MouseDown="Border_MouseDown"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid Margin="6">
<Image Name="ImagePPTControlPreviousPressed" Visibility="Collapsed"
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideSelected}" />
<Image
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}" />
</Grid>
</Border>
<Border x:Name="PptNavigationBtn" Width="36" Height="36" CornerRadius="5"
Background="{DynamicResource FloatBarBackground}" BorderThickness="1"
BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid MouseUp="PPTNavigationBtn_Click" MouseDown="Border_MouseDown">
<TextBlock Name="PptNavigationTextBlock" FontSize="9"
Foreground="{DynamicResource FloatBarForeground}"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="0/0" />
</Grid>
</Border>
<Border Width="36" MouseUp="GridPPTControlNext_MouseUp" MouseDown="Border_MouseDown"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid Margin="6">
<Image Name="ImagePPTControlNextPressed" Visibility="Collapsed"
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideSelected}" />
<Image
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}" />
</Grid>
</Border>
</ui:SimpleStackPanel>
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnLBBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
<ui:SimpleStackPanel Orientation="Horizontal">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTLBPreviousButtonBorder"
MouseDown="GridPPTControlPrevious_MouseDown"
MouseLeave="GridPPTControlPrevious_MouseLeave"
CornerRadius="5 5 0 0" Background="Transparent">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTLBPreviousButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a"
x:Name="PPTLBPreviousButtonGeometry"
Geometry="F0 M24,24z M0,0z M3.3994,12.9642C2.86687,12.4317,2.86687,11.5683,3.3994,11.0358L9.94485,4.49031C10.4774,3.95777 11.3408,3.95777 11.8733,4.49031 12.4059,5.02284 12.4059,5.88625 11.8733,6.41878L7.65575,10.6364 19.6364,10.6364C20.3895,10.6364 21,11.2469 21,12 21,12.7531 20.3895,13.3636 19.6364,13.3636L7.65575,13.3636 11.8733,17.5812C12.4059,18.1137 12.4059,18.9772 11.8733,19.5097 11.3408,20.0422 10.4774,20.0422 9.94485,19.5097L3.3994,12.9642z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
<Border Visibility="Visible" Name="PPTLBPageButton" TextBlock.Foreground="#171717"
MouseUp="PPTNavigationBtn_MouseUp" MouseDown="PPTNavigationBtn_MouseDown"
MouseLeave="PPTNavigationBtn_MouseLeave" Width="auto" MinWidth="50" Height="50"
Background="Transparent">
<Grid>
<Border Margin="0,3" CornerRadius="5" Name="PPTLBPageButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<ui:SimpleStackPanel VerticalAlignment="Center" Orientation="Vertical"
Spacing="0.5" Margin="12,0">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="17" FontWeight="Bold"
Text="{Binding ElementName=PPTBtnPageNow, Path=Text}" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="10"
Text="{Binding ElementName=PPTBtnPageTotal, Path=Text}" />
</ui:SimpleStackPanel>
</Grid>
</Border>
<Border Width="50" Height="50" MouseUp="GridPPTControlNext_MouseUp"
MouseDown="GridPPTControlNext_MouseDown" MouseLeave="GridPPTControlNext_MouseLeave"
CornerRadius="0 0 5 5" Background="Transparent" Name="PPTLBNextButtonBorder">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTLBNextButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image VerticalAlignment="Center" HorizontalAlignment="Center" Height="28"
Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a"
x:Name="PPTLBNextButtonGeometry"
Geometry="F0 M24,24z M0,0z M20.6006,12.9642C21.1331,12.4317,21.1331,11.5683,20.6006,11.0358L14.0551,4.49031C13.5226,3.95777 12.6592,3.95777 12.1267,4.49031 11.5941,5.02284 11.5941,5.88625 12.1267,6.41878L16.3443,10.6364 4.36364,10.6364C3.61052,10.6364 3,11.2469 3,12 3,12.7531 3.61052,13.3636 4.36364,13.3636L16.3443,13.3636 12.1267,17.5812C11.5941,18.1137 11.5941,18.9772 12.1267,19.5097 12.6592,20.0422 13.5226,20.0422 14.0551,19.5097L20.6006,12.9642z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Border>
</Viewbox>
<Viewbox Visibility="{Binding ElementName=BottomViewboxPPTSidesControl, Path=Visibility}" Opacity="0.5"
Margin="5" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="3.5">
<Border Width="36" MouseUp="GridPPTControlPrevious_MouseUp" MouseDown="Border_MouseDown"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid Margin="6">
<Image
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}" />
</Grid>
</Border>
<Border Width="36" Visibility="{Binding ElementName=PptNavigationBtn, Path=Visibility}"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid MouseUp="PPTNavigationBtn_Click">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
MouseDown="Border_MouseDown"
Foreground="{Binding ElementName=PptNavigationTextBlock, Path=Foreground}"
FontSize="{Binding ElementName=PptNavigationTextBlock, Path=FontSize}"
Text="{Binding ElementName=PptNavigationTextBlock, Path=Text}" />
</Grid>
</Border>
<Border Width="36" MouseUp="GridPPTControlNext_MouseUp" MouseDown="Border_MouseDown"
Height="36" CornerRadius="5" Background="{DynamicResource FloatBarBackground}"
BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Grid Margin="6">
<Image
Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}" />
</Grid>
</Border>
</ui:SimpleStackPanel>
<Viewbox x:Name="RightBottomPanelForPPTNavigation" Visibility="Collapsed" Margin="0,0,6,6" Height="50"
HorizontalAlignment="Right" VerticalAlignment="Bottom">
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnRBBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
<ui:SimpleStackPanel Orientation="Horizontal">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTRBPreviousButtonBorder"
MouseDown="GridPPTControlPrevious_MouseDown"
MouseLeave="GridPPTControlPrevious_MouseLeave"
CornerRadius="5 5 0 0" Background="Transparent">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTRBPreviousButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a"
x:Name="PPTRBPreviousButtonGeometry"
Geometry="F0 M24,24z M0,0z M3.3994,12.9642C2.86687,12.4317,2.86687,11.5683,3.3994,11.0358L9.94485,4.49031C10.4774,3.95777 11.3408,3.95777 11.8733,4.49031 12.4059,5.02284 12.4059,5.88625 11.8733,6.41878L7.65575,10.6364 19.6364,10.6364C20.3895,10.6364 21,11.2469 21,12 21,12.7531 20.3895,13.3636 19.6364,13.3636L7.65575,13.3636 11.8733,17.5812C12.4059,18.1137 12.4059,18.9772 11.8733,19.5097 11.3408,20.0422 10.4774,20.0422 9.94485,19.5097L3.3994,12.9642z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
<Border Visibility="Visible" Name="PPTRBPageButton" TextBlock.Foreground="#171717"
MouseUp="PPTNavigationBtn_MouseUp" MouseDown="PPTNavigationBtn_MouseDown"
MouseLeave="PPTNavigationBtn_MouseLeave" Width="auto" MinWidth="50" Height="50"
Background="Transparent">
<Grid>
<Border Margin="0,3" CornerRadius="5" Name="PPTRBPageButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<ui:SimpleStackPanel VerticalAlignment="Center" Orientation="Vertical"
Spacing="0.5" Margin="12,0">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="17" FontWeight="Bold"
Text="{Binding ElementName=PPTBtnPageNow, Path=Text}" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="10"
Text="{Binding ElementName=PPTBtnPageTotal, Path=Text}" />
</ui:SimpleStackPanel>
</Grid>
</Border>
<Border Width="50" Height="50" MouseUp="GridPPTControlNext_MouseUp"
MouseDown="GridPPTControlNext_MouseDown" MouseLeave="GridPPTControlNext_MouseLeave"
CornerRadius="0 0 5 5" Background="Transparent" Name="PPTRBNextButtonBorder">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTRBNextButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image VerticalAlignment="Center" HorizontalAlignment="Center" Height="28"
Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a"
x:Name="PPTRBNextButtonGeometry"
Geometry="F0 M24,24z M0,0z M20.6006,12.9642C21.1331,12.4317,21.1331,11.5683,20.6006,11.0358L14.0551,4.49031C13.5226,3.95777 12.6592,3.95777 12.1267,4.49031 11.5941,5.02284 11.5941,5.88625 12.1267,6.41878L16.3443,10.6364 4.36364,10.6364C3.61052,10.6364 3,11.2469 3,12 3,12.7531 3.61052,13.3636 4.36364,13.3636L16.3443,13.3636 12.1267,17.5812C11.5941,18.1137 11.5941,18.9772 12.1267,19.5097 12.6592,20.0422 13.5226,20.0422 14.0551,19.5097L20.6006,12.9642z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Border>
</Viewbox>
</Grid>
</Grid>
<!--// PPT 侧边翻页按钮 //-->
<Viewbox x:Name="LeftSidePanelForPPTNavigation" Visibility="Visible" Margin="6,0,0,0" Width="40"
<Viewbox x:Name="LeftSidePanelForPPTNavigation" Visibility="Visible" Margin="6,0,0,0" Width="50"
HorizontalAlignment="Left" VerticalAlignment="Center">
<Border BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}"
Background="{DynamicResource FloatBarBackground}" Opacity="0.4" CornerRadius="6">
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnLSBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
<ui:SimpleStackPanel Orientation="Vertical">
<Border Width="40" Height="40" MouseUp="GridPPTControlPrevious_MouseUp"
MouseDown="Border_MouseDown" CornerRadius="5 5 0 0" Background="Transparent">
<Image Height="26" Width="26" Source="/Resources/Icons-png/up.png"
RenderOptions.BitmapScalingMode="HighQuality" />
</Border>
<Border Visibility="{Binding ElementName=PptNavigationBtn, Path=Visibility}"
MouseUp="PPTNavigationBtn_Click" MouseDown="Border_MouseDown" Width="40" Height="38"
Background="Transparent">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTLSPreviousButtonBorder"
MouseDown="GridPPTControlPrevious_MouseDown" MouseLeave="GridPPTControlPrevious_MouseLeave"
CornerRadius="5 5 0 0" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1" />
<RowDefinition Height="36" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>
<Line Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" X1="0" Y1="0"
X2="25" Y2="0" Stroke="Black" StrokeThickness="1" />
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="9" Foreground="{DynamicResource FloatBarForeground}"
Text="{Binding ElementName=PptNavigationTextBlock, Path=Text}" />
<Line Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" X1="0" Y1="0"
X2="25" Y2="0" Stroke="Black" StrokeThickness="1" />
<Border Margin="3" CornerRadius="5" Name="PPTLSPreviousButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a" x:Name="PPTLSPreviousButtonGeometry"
Geometry="F0 M24,24z M0,0z M11.0357,3.3994C11.5682,2.86687,12.4316,2.86687,12.9641,3.3994L19.5096,9.94485C20.0421,10.4774 20.0421,11.3408 19.5096,11.8733 18.9771,12.4059 18.1137,12.4059 17.5811,11.8733L13.3635,7.65575 13.3635,19.6364C13.3635,20.3895 12.753,21 11.9999,21 11.2468,21 10.6363,20.3895 10.6363,19.6364L10.6363,7.65575 6.41869,11.8733C5.88616,12.4059 5.02275,12.4059 4.49022,11.8733 3.95769,11.3408 3.95769,10.4774 4.49022,9.94485L11.0357,3.3994z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
<Border Width="40" Height="40" MouseUp="GridPPTControlNext_MouseUp" MouseDown="Border_MouseDown"
CornerRadius="0 0 5 5" Background="Transparent">
<Image Height="26" Width="26" Source="/Resources/Icons-png/down.png"
RenderOptions.BitmapScalingMode="HighQuality" />
<Border Visibility="Visible" Name="PPTLSPageButton" TextBlock.Foreground="#171717"
MouseUp="PPTNavigationBtn_MouseUp" MouseDown="PPTNavigationBtn_MouseDown"
MouseLeave="PPTNavigationBtn_MouseLeave" Width="50" Height="50"
Background="Transparent">
<Grid>
<Border Margin="3,0" CornerRadius="5" Name="PPTLSPageButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<ui:SimpleStackPanel VerticalAlignment="Center" Orientation="Vertical" Spacing="0.5">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="17" FontWeight="Bold"
Text="999" Name="PPTBtnPageNow" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="10" Text="/ 999" Name="PPTBtnPageTotal" />
</ui:SimpleStackPanel>
</Grid>
</Border>
<Border Width="50" Height="50" MouseUp="GridPPTControlNext_MouseUp"
MouseDown="GridPPTControlNext_MouseDown" MouseLeave="GridPPTControlNext_MouseLeave"
CornerRadius="0 0 5 5" Background="Transparent" Name="PPTLSNextButtonBorder">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTLSNextButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image VerticalAlignment="Center" HorizontalAlignment="Center" Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a" x:Name="PPTLSNextButtonGeometry"
Geometry="F0 M24,24z M0,0z M11.0357,20.6006C11.5682,21.1331,12.4316,21.1331,12.9641,20.6006L19.5096,14.0551C20.0421,13.5226 20.0421,12.6592 19.5096,12.1267 18.9771,11.5941 18.1137,11.5941 17.5811,12.1267L13.3635,16.3443 13.3635,4.36364C13.3635,3.61052 12.753,3 11.9999,3 11.2468,3 10.6363,3.61052 10.6363,4.36364L10.6363,16.3443 6.41869,12.1267C5.88616,11.5941 5.02275,11.5941 4.49022,12.1267 3.95769,12.6592 3.95769,13.5226 4.49022,14.0551L11.0357,20.6006z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Border>
</Viewbox>
<Viewbox x:Name="RightSidePanelForPPTNavigation" Visibility="Visible" Margin="0,0,6,0" Width="40"
<Viewbox x:Name="RightSidePanelForPPTNavigation" Visibility="Visible" Margin="0,0,6,0" Width="50"
HorizontalAlignment="Right" VerticalAlignment="Center">
<Border BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}"
Background="{DynamicResource FloatBarBackground}" Opacity="0.4" CornerRadius="6">
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnRSBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
<ui:SimpleStackPanel Orientation="Vertical">
<Border Width="40" Height="40" MouseUp="GridPPTControlPrevious_MouseUp"
MouseDown="Border_MouseDown" CornerRadius="5 5 0 0" Background="Transparent">
<Image Height="26" Width="26" Source="/Resources/Icons-png/up.png"
RenderOptions.BitmapScalingMode="HighQuality" />
</Border>
<Border Visibility="{Binding ElementName=PptNavigationBtn, Path=Visibility}"
MouseUp="PPTNavigationBtn_Click" MouseDown="Border_MouseDown" Width="40" Height="38"
Background="Transparent">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTRSPreviousButtonBorder"
MouseDown="GridPPTControlPrevious_MouseDown" MouseLeave="GridPPTControlPrevious_MouseLeave"
CornerRadius="5 5 0 0" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1" />
<RowDefinition Height="36" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>
<Line Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" X1="0" Y1="0"
X2="25" Y2="0" Stroke="Black" StrokeThickness="1" />
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="9" Foreground="{DynamicResource FloatBarForeground}"
Text="{Binding ElementName=PptNavigationTextBlock, Path=Text}" />
<Line Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" X1="0" Y1="0"
X2="25" Y2="0" Stroke="Black" StrokeThickness="1" />
<Border Margin="3" CornerRadius="5" Name="PPTRSPreviousButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a" x:Name="PPTRSPreviousButtonGeometry"
Geometry="F0 M24,24z M0,0z M11.0357,3.3994C11.5682,2.86687,12.4316,2.86687,12.9641,3.3994L19.5096,9.94485C20.0421,10.4774 20.0421,11.3408 19.5096,11.8733 18.9771,12.4059 18.1137,12.4059 17.5811,11.8733L13.3635,7.65575 13.3635,19.6364C13.3635,20.3895 12.753,21 11.9999,21 11.2468,21 10.6363,20.3895 10.6363,19.6364L10.6363,7.65575 6.41869,11.8733C5.88616,12.4059 5.02275,12.4059 4.49022,11.8733 3.95769,11.3408 3.95769,10.4774 4.49022,9.94485L11.0357,3.3994z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
<Border Width="40" Height="40" MouseUp="GridPPTControlNext_MouseUp" MouseDown="Border_MouseDown"
CornerRadius="0 0 5 5" Background="Transparent">
<Image Height="26" Width="26" Source="/Resources/Icons-png/down.png"
RenderOptions.BitmapScalingMode="HighQuality" />
<Border Visibility="Visible" Name="PPTRSPageButton"
MouseUp="PPTNavigationBtn_MouseUp" MouseDown="PPTNavigationBtn_MouseDown"
MouseLeave="PPTNavigationBtn_MouseLeave" Width="50" Height="50"
Background="Transparent" TextBlock.Foreground="#171717">
<Grid>
<Border Margin="3,0" CornerRadius="5" Name="PPTRSPageButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<ui:SimpleStackPanel VerticalAlignment="Center" Orientation="Vertical" Spacing="0.5">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="17" FontWeight="Bold"
Text="{Binding ElementName=PPTBtnPageNow, Path=Text}" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="10"
Text="{Binding ElementName=PPTBtnPageTotal, Path=Text}" />
</ui:SimpleStackPanel>
</Grid>
</Border>
<Border Width="50" Height="50" MouseUp="GridPPTControlNext_MouseUp"
MouseDown="GridPPTControlNext_MouseDown" MouseLeave="GridPPTControlNext_MouseLeave"
CornerRadius="0 0 5 5" Background="Transparent" Name="PPTRSNextButtonBorder">
<Grid>
<Border Margin="3" CornerRadius="5" Name="PPTRSNextButtonFeedbackBorder"
Background="#18181b" Opacity="0" />
<Image VerticalAlignment="Center" HorizontalAlignment="Center" Height="28" Width="28">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#27272a" x:Name="PPTRSNextButtonGeometry"
Geometry="F0 M24,24z M0,0z M11.0357,20.6006C11.5682,21.1331,12.4316,21.1331,12.9641,20.6006L19.5096,14.0551C20.0421,13.5226 20.0421,12.6592 19.5096,12.1267 18.9771,11.5941 18.1137,11.5941 17.5811,12.1267L13.3635,16.3443 13.3635,4.36364C13.3635,3.61052 12.753,3 11.9999,3 11.2468,3 10.6363,3.61052 10.6363,4.36364L10.6363,16.3443 6.41869,12.1267C5.88616,11.5941 5.02275,11.5941 4.49022,12.1267 3.95769,12.6592 3.95769,13.5226 4.49022,14.0551L11.0357,20.6006z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Border>

View File

@ -107,8 +107,6 @@ namespace Ink_Canvas {
private void loadPenCanvas() {
try {
var alpha = Settings.Canvas.InkAlpha;
Trace.WriteLine(alpha);
//drawingAttributes = new DrawingAttributes();
drawingAttributes = inkCanvas.DefaultDrawingAttributes;
drawingAttributes.Color = Ink_DefaultColor;

View File

@ -87,7 +87,8 @@ namespace Ink_Canvas {
await Task.Delay(10);
await Dispatcher.InvokeAsync(() => {
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
ViewboxFloatingBarMarginAnimation(-60);
@ -218,15 +219,12 @@ namespace Ink_Canvas {
await Dispatcher.InvokeAsync(() => {
if (StackPanelPPTControls.Visibility == Visibility.Visible)
{
if (Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel &&
isDisplayingOrHidingBlackboard == false)
AnimationsHelper.ShowWithSlideFromBottomAndFade(BottomViewboxPPTSidesControl);
if (Settings.PowerPointSettings.IsShowSidePPTNavigationPanel &&
isDisplayingOrHidingBlackboard == false)
{
AnimationsHelper.ShowWithScaleFromLeft(LeftSidePanelForPPTNavigation);
AnimationsHelper.ShowWithScaleFromRight(RightSidePanelForPPTNavigation);
}
var dops = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
var dopsc = dops.ToCharArray();
if (dopsc[0] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(LeftBottomPanelForPPTNavigation);
if (dopsc[1] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(RightBottomPanelForPPTNavigation);
if (dopsc[2] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(LeftSidePanelForPPTNavigation);
if (dopsc[3] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(RightSidePanelForPPTNavigation);
}
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)

View File

@ -481,7 +481,8 @@ namespace Ink_Canvas {
if (currentMode == 0)
{
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
//进入黑板
@ -566,13 +567,12 @@ namespace Ink_Canvas {
if (StackPanelPPTControls.Visibility == Visibility.Visible)
{
if (Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel)
AnimationsHelper.ShowWithSlideFromBottomAndFade(BottomViewboxPPTSidesControl);
if (Settings.PowerPointSettings.IsShowSidePPTNavigationPanel)
{
AnimationsHelper.ShowWithScaleFromLeft(LeftSidePanelForPPTNavigation);
AnimationsHelper.ShowWithScaleFromRight(RightSidePanelForPPTNavigation);
}
var dops = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
var dopsc = dops.ToCharArray();
if (dopsc[0] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(LeftBottomPanelForPPTNavigation);
if (dopsc[1] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(RightBottomPanelForPPTNavigation);
if (dopsc[2] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(LeftSidePanelForPPTNavigation);
if (dopsc[3] == '2' && isDisplayingOrHidingBlackboard == false) AnimationsHelper.ShowWithFadeIn(RightSidePanelForPPTNavigation);
}
if (Settings.Automation.IsAutoSaveStrokesAtClear &&

View File

@ -7,6 +7,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
@ -60,7 +61,8 @@ namespace Ink_Canvas {
catch {
//BtnCheckPPT.Visibility = Visibility.Visible;
StackPanelPPTControls.Visibility = Visibility.Collapsed;
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
MessageBox.Show("未找到幻灯片");
@ -245,6 +247,145 @@ namespace Ink_Canvas {
private string pptName = null;
private void UpdatePPTBtnStyleSettingsStatus() {
var sopt = Settings.PowerPointSettings.PPTSButtonsOption.ToString();
char[] soptc = sopt.ToCharArray();
if (soptc[0] == '2')
{
PPTLSPageButton.Visibility = Visibility.Visible;
PPTRSPageButton.Visibility = Visibility.Visible;
}
else
{
PPTLSPageButton.Visibility = Visibility.Collapsed;
PPTRSPageButton.Visibility = Visibility.Collapsed;
}
if (soptc[2] == '2')
{
// 这里先堆一点屎山没空用Resources了
PPTBtnLSBorder.Background = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTBtnRSBorder.Background = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTBtnLSBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(82, 82, 91));
PPTBtnRSBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(82, 82, 91));
PPTLSPreviousButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTRSPreviousButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTLSNextButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTRSNextButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTLSPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRSPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTLSPageButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRSPageButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTLSNextButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRSNextButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
TextBlock.SetForeground(PPTLSPageButton, new SolidColorBrush(Colors.White));
TextBlock.SetForeground(PPTRSPageButton, new SolidColorBrush(Colors.White));
}
else
{
PPTBtnLSBorder.Background = new SolidColorBrush(Color.FromRgb(244, 244, 245));
PPTBtnRSBorder.Background = new SolidColorBrush(Color.FromRgb(244, 244, 245));
PPTBtnLSBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(161, 161, 170));
PPTBtnRSBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(161, 161, 170));
PPTLSPreviousButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTRSPreviousButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTLSNextButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTRSNextButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTLSPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRSPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTLSPageButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRSPageButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTLSNextButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRSNextButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
TextBlock.SetForeground(PPTLSPageButton, new SolidColorBrush(Color.FromRgb(24, 24, 27)));
TextBlock.SetForeground(PPTRSPageButton, new SolidColorBrush(Color.FromRgb(24, 24, 27)));
}
if (soptc[1] == '2')
{
PPTBtnLSBorder.Opacity = 0.5;
PPTBtnRSBorder.Opacity = 0.5;
}
else
{
PPTBtnLSBorder.Opacity = 1;
PPTBtnRSBorder.Opacity = 1;
}
var bopt = Settings.PowerPointSettings.PPTBButtonsOption.ToString();
char[] boptc = bopt.ToCharArray();
if (boptc[0] == '2')
{
PPTLBPageButton.Visibility = Visibility.Visible;
PPTRBPageButton.Visibility = Visibility.Visible;
}
else
{
PPTLBPageButton.Visibility = Visibility.Collapsed;
PPTRBPageButton.Visibility = Visibility.Collapsed;
}
if (boptc[2] == '2')
{
// 这里先堆一点屎山没空用Resources了
PPTBtnLBBorder.Background = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTBtnRBBorder.Background = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTBtnLBBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(82, 82, 91));
PPTBtnRBBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(82, 82, 91));
PPTLBPreviousButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTRBPreviousButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTLBNextButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTRBNextButtonGeometry.Brush = new SolidColorBrush(Colors.White);
PPTLBPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRBPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTLBPageButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRBPageButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTLBNextButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
PPTRBNextButtonFeedbackBorder.Background = new SolidColorBrush(Colors.White);
TextBlock.SetForeground(PPTLBPageButton, new SolidColorBrush(Colors.White));
TextBlock.SetForeground(PPTRBPageButton, new SolidColorBrush(Colors.White));
}
else
{
PPTBtnLBBorder.Background = new SolidColorBrush(Color.FromRgb(244, 244, 245));
PPTBtnRBBorder.Background = new SolidColorBrush(Color.FromRgb(244, 244, 245));
PPTBtnLBBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(161, 161, 170));
PPTBtnRBBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(161, 161, 170));
PPTLBPreviousButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTRBPreviousButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTLBNextButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTRBNextButtonGeometry.Brush = new SolidColorBrush(Color.FromRgb(39, 39, 42));
PPTLBPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRBPreviousButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTLBPageButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRBPageButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTLBNextButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
PPTRBNextButtonFeedbackBorder.Background = new SolidColorBrush(Color.FromRgb(24, 24, 27));
TextBlock.SetForeground(PPTLBPageButton, new SolidColorBrush(Color.FromRgb(24, 24, 27)));
TextBlock.SetForeground(PPTRBPageButton, new SolidColorBrush(Color.FromRgb(24, 24, 27)));
}
if (boptc[1] == '2')
{
PPTBtnLBBorder.Opacity = 0.5;
PPTBtnRBBorder.Opacity = 0.5;
}
else
{
PPTBtnLBBorder.Opacity = 1;
PPTBtnRBBorder.Opacity = 1;
}
}
private void UpdatePPTBtnDisplaySettingsStatus() {
var dopt = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
char[] doptc = dopt.ToCharArray();
if (doptc[0] == '2') AnimationsHelper.ShowWithFadeIn(LeftBottomPanelForPPTNavigation);
else LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
if (doptc[1] == '2') AnimationsHelper.ShowWithFadeIn(RightBottomPanelForPPTNavigation);
else RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
if (doptc[2] == '2') AnimationsHelper.ShowWithFadeIn(LeftSidePanelForPPTNavigation);
else LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
if (doptc[3] == '2') AnimationsHelper.ShowWithFadeIn(RightSidePanelForPPTNavigation);
else RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
}
private async void PptApplication_SlideShowBegin(SlideShowWindow Wn) {
if (Settings.Automation.IsAutoFoldInPPTSlideShow && !isFloatingBarFolded)
await FoldFloatingBar(new object());
@ -318,16 +459,25 @@ namespace Ink_Canvas {
StackPanelPPTControls.Visibility = Visibility.Visible;
if (Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel && !isFloatingBarFolded)
AnimationsHelper.ShowWithSlideFromBottomAndFade(BottomViewboxPPTSidesControl);
else
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
if (Settings.PowerPointSettings.IsShowSidePPTNavigationPanel && !isFloatingBarFolded) {
AnimationsHelper.ShowWithScaleFromLeft(LeftSidePanelForPPTNavigation);
AnimationsHelper.ShowWithScaleFromRight(RightSidePanelForPPTNavigation);
} else {
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
// -- old --
//if (Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel && !isFloatingBarFolded)
// AnimationsHelper.ShowWithSlideFromBottomAndFade(BottomViewboxPPTSidesControl);
//else
// BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
//if (Settings.PowerPointSettings.IsShowSidePPTNavigationPanel && !isFloatingBarFolded) {
// AnimationsHelper.ShowWithScaleFromRight(RightSidePanelForPPTNavigation);
//} else {
// LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
// RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
//}
// -- old --
// -- new --
if (!isFloatingBarFolded) {
UpdatePPTBtnDisplaySettingsStatus();
UpdatePPTBtnStyleSettingsStatus();
}
BtnPPTSlideShow.Visibility = Visibility.Collapsed;
@ -364,7 +514,8 @@ namespace Ink_Canvas {
BtnColorRed_Click(null, null);
isEnteredSlideShowEndEvent = false;
PptNavigationTextBlock.Text = $"{Wn.View.CurrentShowPosition}/{Wn.Presentation.Slides.Count}";
PPTBtnPageNow.Text = $"{Wn.View.CurrentShowPosition}";
PPTBtnPageTotal.Text = $"/ {Wn.Presentation.Slides.Count}";
LogHelper.NewLog("PowerPoint Slide Show Loading process complete");
if (!isFloatingBarFolded) {
@ -434,7 +585,8 @@ namespace Ink_Canvas {
BtnPPTSlideShow.Visibility = Visibility.Visible;
BtnPPTSlideShowEnd.Visibility = Visibility.Collapsed;
StackPanelPPTControls.Visibility = Visibility.Collapsed;
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
@ -497,7 +649,10 @@ namespace Ink_Canvas {
// ignored
}
PptNavigationTextBlock.Text = $"{Wn.View.CurrentShowPosition}/{Wn.Presentation.Slides.Count}";
PPTBtnPageNow.Text = $"{Wn.View.CurrentShowPosition}";
PPTBtnPageTotal.Text = $"/ {Wn.Presentation.Slides.Count}";
//PptNavigationTextBlock.Text = $"{Wn.View.CurrentShowPosition}/{Wn.Presentation.Slides.Count}";
});
previousSlideID = Wn.View.CurrentShowPosition;
}
@ -540,7 +695,8 @@ namespace Ink_Canvas {
}
catch {
StackPanelPPTControls.Visibility = Visibility.Collapsed;
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
}
@ -580,15 +736,75 @@ namespace Ink_Canvas {
}
catch {
StackPanelPPTControls.Visibility = Visibility.Collapsed;
BottomViewboxPPTSidesControl.Visibility = Visibility.Collapsed;
LeftBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightBottomPanelForPPTNavigation.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
}
}
private async void PPTNavigationBtn_MouseDown(object sender, MouseButtonEventArgs e)
{
lastBorderMouseDownObject = sender;
if (sender == PPTLSPageButton)
{
PPTLSPageButtonFeedbackBorder.Opacity = 0.15;
}
else if (sender == PPTRSPageButton)
{
PPTRSPageButtonFeedbackBorder.Opacity = 0.15;
}
else if (sender == PPTLBPageButton)
{
PPTLBPageButtonFeedbackBorder.Opacity = 0.15;
}
else if (sender == PPTRBPageButton)
{
PPTRBPageButtonFeedbackBorder.Opacity = 0.15;
}
}
private async void PPTNavigationBtn_Click(object sender, MouseButtonEventArgs e) {
private async void PPTNavigationBtn_MouseLeave(object sender, MouseEventArgs e)
{
lastBorderMouseDownObject = null;
if (sender == PPTLSPageButton)
{
PPTLSPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRSPageButton)
{
PPTRSPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTLBPageButton)
{
PPTLBPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBPageButton)
{
PPTRBPageButtonFeedbackBorder.Opacity = 0;
}
}
private async void PPTNavigationBtn_MouseUp(object sender, MouseButtonEventArgs e) {
if (lastBorderMouseDownObject != sender) return;
if (sender == PPTLSPageButton)
{
PPTLSPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRSPageButton)
{
PPTRSPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTLBPageButton)
{
PPTLBPageButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBPageButton)
{
PPTRBPageButtonFeedbackBorder.Opacity = 0;
}
GridTransparencyFakeBackground.Opacity = 1;
GridTransparencyFakeBackground.Background = new SolidColorBrush(StringToColor("#01FFFFFF"));
CursorIcon_Click(null, null);
@ -640,13 +856,101 @@ namespace Ink_Canvas {
ViewboxFloatingBarMarginAnimation(100, true);
}
private void GridPPTControlPrevious_MouseDown(object sender, MouseButtonEventArgs e)
{
lastBorderMouseDownObject = sender;
if (sender == PPTLSPreviousButtonBorder) {
PPTLSPreviousButtonFeedbackBorder.Opacity = 0.15;
} else if (sender == PPTRSPreviousButtonBorder) {
PPTRSPreviousButtonFeedbackBorder.Opacity = 0.15;
} else if (sender == PPTLBPreviousButtonBorder)
{
PPTLBPreviousButtonFeedbackBorder.Opacity = 0.15;
}
else if (sender == PPTRBPreviousButtonBorder)
{
PPTRBPreviousButtonFeedbackBorder.Opacity = 0.15;
}
}
private void GridPPTControlPrevious_MouseLeave(object sender, MouseEventArgs e)
{
lastBorderMouseDownObject = null;
if (sender == PPTLSPreviousButtonBorder) {
PPTLSPreviousButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTRSPreviousButtonBorder) {
PPTRSPreviousButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTLBPreviousButtonBorder)
{
PPTLBPreviousButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBPreviousButtonBorder)
{
PPTRBPreviousButtonFeedbackBorder.Opacity = 0;
}
}
private void GridPPTControlPrevious_MouseUp(object sender, MouseButtonEventArgs e) {
if (lastBorderMouseDownObject != sender) return;
if (sender == PPTLSPreviousButtonBorder) {
PPTLSPreviousButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTRSPreviousButtonBorder) {
PPTRSPreviousButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTLBPreviousButtonBorder)
{
PPTLBPreviousButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBPreviousButtonBorder)
{
PPTRBPreviousButtonFeedbackBorder.Opacity = 0;
}
BtnPPTSlidesUp_Click(BtnPPTSlidesUp, null);
}
private void GridPPTControlNext_MouseDown(object sender, MouseButtonEventArgs e) {
lastBorderMouseDownObject = sender;
if (sender == PPTLSNextButtonBorder) {
PPTLSNextButtonFeedbackBorder.Opacity = 0.15;
} else if (sender == PPTRSNextButtonBorder) {
PPTRSNextButtonFeedbackBorder.Opacity = 0.15;
} else if (sender == PPTLBNextButtonBorder)
{
PPTLBNextButtonFeedbackBorder.Opacity = 0.15;
}
else if (sender == PPTRBNextButtonBorder)
{
PPTRBNextButtonFeedbackBorder.Opacity = 0.15;
}
}
private void GridPPTControlNext_MouseLeave(object sender, MouseEventArgs e)
{
lastBorderMouseDownObject = null;
if (sender == PPTLSNextButtonBorder) {
PPTLSNextButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTRSNextButtonBorder) {
PPTRSNextButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTLBNextButtonBorder)
{
PPTLBNextButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBNextButtonBorder)
{
PPTRBNextButtonFeedbackBorder.Opacity = 0;
}
}
private void GridPPTControlNext_MouseUp(object sender, MouseButtonEventArgs e) {
if (lastBorderMouseDownObject != sender) return;
if (sender == PPTLSNextButtonBorder) {
PPTLSNextButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTRSNextButtonBorder) {
PPTRSNextButtonFeedbackBorder.Opacity = 0;
} else if (sender == PPTLBNextButtonBorder)
{
PPTLBNextButtonFeedbackBorder.Opacity = 0;
}
else if (sender == PPTRBNextButtonBorder)
{
PPTRBNextButtonFeedbackBorder.Opacity = 0;
}
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}

View File

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;

View File

@ -295,42 +295,44 @@ namespace Ink_Canvas {
LoadSettings();
}
[Obsolete]
private void ToggleSwitchShowButtonPPTNavigation_OnToggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
Settings.PowerPointSettings.IsShowPPTNavigation = ToggleSwitchShowButtonPPTNavigation.IsOn;
PptNavigationBtn.Visibility = Settings.PowerPointSettings.IsShowPPTNavigation
? Visibility.Visible
: Visibility.Collapsed;
SaveSettingsToFile();
}
//[Obsolete]
//private void ToggleSwitchShowButtonPPTNavigation_OnToggled(object sender, RoutedEventArgs e) {
// if (!isLoaded) return;
// Settings.PowerPointSettings.IsShowPPTNavigation = ToggleSwitchShowButtonPPTNavigation.IsOn;
// var vis = Settings.PowerPointSettings.IsShowPPTNavigation ? Visibility.Visible : Visibility.Collapsed;
// PPTLBPageButton.Visibility = vis;
// PPTRBPageButton.Visibility = vis;
// PPTLSPageButton.Visibility = vis;
// PPTRSPageButton.Visibility = vis;
// SaveSettingsToFile();
//}
[Obsolete]
private void ToggleSwitchShowBottomPPTNavigationPanel_OnToggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel = ToggleSwitchShowBottomPPTNavigationPanel.IsOn;
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
BottomViewboxPPTSidesControl.Visibility = Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel
? Visibility.Visible
: Visibility.Collapsed;
SaveSettingsToFile();
}
//[Obsolete]
//private void ToggleSwitchShowBottomPPTNavigationPanel_OnToggled(object sender, RoutedEventArgs e) {
// if (!isLoaded) return;
// Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel = ToggleSwitchShowBottomPPTNavigationPanel.IsOn;
// if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
// //BottomViewboxPPTSidesControl.Visibility = Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel
// // ? Visibility.Visible
// // : Visibility.Collapsed;
// SaveSettingsToFile();
//}
[Obsolete]
private void ToggleSwitchShowSidePPTNavigationPanel_OnToggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
Settings.PowerPointSettings.IsShowSidePPTNavigationPanel = ToggleSwitchShowSidePPTNavigationPanel.IsOn;
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
LeftSidePanelForPPTNavigation.Visibility = Settings.PowerPointSettings.IsShowSidePPTNavigationPanel
? Visibility.Visible
: Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Settings.PowerPointSettings.IsShowSidePPTNavigationPanel
? Visibility.Visible
: Visibility.Collapsed;
}
//[Obsolete]
//private void ToggleSwitchShowSidePPTNavigationPanel_OnToggled(object sender, RoutedEventArgs e) {
// if (!isLoaded) return;
// Settings.PowerPointSettings.IsShowSidePPTNavigationPanel = ToggleSwitchShowSidePPTNavigationPanel.IsOn;
// if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
// LeftSidePanelForPPTNavigation.Visibility = Settings.PowerPointSettings.IsShowSidePPTNavigationPanel
// ? Visibility.Visible
// : Visibility.Collapsed;
// RightSidePanelForPPTNavigation.Visibility = Settings.PowerPointSettings.IsShowSidePPTNavigationPanel
// ? Visibility.Visible
// : Visibility.Collapsed;
// }
SaveSettingsToFile();
}
// SaveSettingsToFile();
//}
private void ToggleSwitchShowPPTButton_OnToggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
@ -351,6 +353,7 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
}
private void CheckboxEnableRBPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -361,6 +364,7 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
}
private void CheckboxEnableLSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -371,6 +375,7 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
}
private void CheckboxEnableRSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -381,6 +386,7 @@ namespace Ink_Canvas {
c[3] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
}
private void CheckboxSPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
@ -391,6 +397,7 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void CheckboxSPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
@ -401,6 +408,7 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void CheckboxSPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
@ -411,6 +419,7 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void CheckboxBPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
@ -421,9 +430,10 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void CheckboxBPPTSHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
private void CheckboxBPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
var str = Settings.PowerPointSettings.PPTBButtonsOption.ToString();
@ -431,9 +441,10 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void CheckboxBPPTSBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
private void CheckboxBPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
var str = Settings.PowerPointSettings.PPTBButtonsOption.ToString();
@ -441,6 +452,7 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
}
private void PPTButtonLeftPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e) {
@ -1287,9 +1299,9 @@ namespace Ink_Canvas {
Settings.Automation.AutoDelSavedFiles = AutoDelSavedFilesDays;
Settings.Automation.AutoDelSavedFilesDaysThreshold = AutoDelSavedFilesDaysThreshold;
Settings.PowerPointSettings.IsShowPPTNavigation = true;
Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel = false;
Settings.PowerPointSettings.IsShowSidePPTNavigationPanel = true;
//Settings.PowerPointSettings.IsShowPPTNavigation = true;
//Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel = false;
//Settings.PowerPointSettings.IsShowSidePPTNavigationPanel = true;
Settings.PowerPointSettings.PowerPointSupport = true;
Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow = false;
Settings.PowerPointSettings.IsNoClearStrokeOnSelectWhenInPowerPoint = true;

View File

@ -259,13 +259,8 @@ namespace Ink_Canvas {
// PowerPointSettings
if (Settings.PowerPointSettings != null) {
PptNavigationBtn.Visibility = Settings.PowerPointSettings.IsShowPPTNavigation
? Visibility.Visible
: Visibility.Collapsed;
ToggleSwitchShowButtonPPTNavigation.IsOn = Settings.PowerPointSettings.IsShowPPTNavigation;
ToggleSwitchShowBottomPPTNavigationPanel.IsOn =
Settings.PowerPointSettings.IsShowBottomPPTNavigationPanel;
ToggleSwitchShowSidePPTNavigationPanel.IsOn = Settings.PowerPointSettings.IsShowSidePPTNavigationPanel;
if (Settings.PowerPointSettings.PowerPointSupport) {
ToggleSwitchSupportPowerPoint.IsOn = true;
timerCheckPPT.Start();

View File

@ -153,17 +153,6 @@ namespace Ink_Canvas
public class PowerPointSettings
{
[JsonProperty("isShowPPTNavigation")]
// -- old --
public bool IsShowPPTNavigation { get; set; } = true;
[JsonProperty("isShowBottomPPTNavigationPanel")]
public bool IsShowBottomPPTNavigationPanel { get; set; } = true;
[JsonProperty("isShowSidePPTNavigationPanel")]
public bool IsShowSidePPTNavigationPanel { get; set; } = true;
// -- old --
// -- new --
[JsonProperty("showPPTButton")]