[update] PPT按钮基本上可用,其他小修复

This commit is contained in:
Dubi906w 2024-06-15 12:00:40 +08:00
parent 689caf0a1a
commit a6d3c6a505
12 changed files with 233 additions and 41 deletions

View File

@ -29,17 +29,17 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>True</Prefer32Bit>
<Prefer32Bit>False</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|AnyCPU'">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>True</Prefer32Bit>
<Prefer32Bit>False</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>True</Prefer32Bit>
<Prefer32Bit>False</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\icc.ico</ApplicationIcon>
@ -525,7 +525,11 @@
<None Remove="Resources\new-icons\rotate.png" />
<None Remove="Resources\new-icons\unfold-chevron.png" />
<None Remove="Resources\new-icons\zoom.png" />
<None Remove="Resources\PresentationExample\bottombar-dark.png" />
<None Remove="Resources\PresentationExample\bottombar-white.png" />
<None Remove="Resources\PresentationExample\page.jpg" />
<None Remove="Resources\PresentationExample\sidebar-dark.png" />
<None Remove="Resources\PresentationExample\sidebar-white.png" />
<None Remove="Resources\PresentationExample\toolbar.png" />
</ItemGroup>
<ItemGroup>
@ -533,7 +537,11 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icons-png\HiteAnnotation.png" />
<Resource Include="Resources\PresentationExample\bottombar-dark.png" />
<Resource Include="Resources\PresentationExample\bottombar-white.png" />
<Resource Include="Resources\PresentationExample\page.jpg" />
<Resource Include="Resources\PresentationExample\sidebar-dark.png" />
<Resource Include="Resources\PresentationExample\sidebar-white.png" />
<Resource Include="Resources\PresentationExample\toolbar.png" />
</ItemGroup>
<ItemGroup>

View File

@ -58,7 +58,7 @@
</Window.Resources>
<!--输入命令绑定-->
<Window.InputBindings>
<KeyBinding Gesture="Shift+Esc" Command="{StaticResource KeyExit}" />
<KeyBinding Key="Esc" Command="{StaticResource KeyExit}" />
<KeyBinding Modifiers="Control" Key="Z" Command="{StaticResource HotKey_Command_Undo}" />
<KeyBinding Modifiers="Control" Key="Y" Command="{StaticResource HotKey_Command_Redo}" />
<KeyBinding Modifiers="Control" Key="E" Command="{StaticResource HotKey_Command_Clear}" />
@ -697,14 +697,33 @@
StrokeThickness="1" Margin="0,4,0,4" />
<TextBlock Margin="0,0,0,8" Text="PPT翻页按钮" FontWeight="Bold" Foreground="#fafafa"
FontSize="20" />
<Grid>
<Image Source="Resources/PresentationExample/page.jpg"></Image>
<Image Source="Resources/PresentationExample/toolbar.png" Height="16"
VerticalAlignment="Bottom" HorizontalAlignment="Center" />
<Canvas>
</Canvas>
</Grid>
<Border ClipToBounds="True" Width="324" Height="182">
<Grid>
<Image Source="Resources/PresentationExample/page.jpg"></Image>
<Image Source="Resources/PresentationExample/toolbar.png" Height="16"
VerticalAlignment="Bottom" HorizontalAlignment="Center" />
<Image Name="PPTBtnPreviewLS" Source="Resources/PresentationExample/sidebar-white.png" Width="10"
VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5" >
<Image.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="PPTBtnPreviewLSTransform"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<Image Name="PPTBtnPreviewRS" Source="Resources/PresentationExample/sidebar-white.png" Width="10"
VerticalAlignment="Center" HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" >
<Image.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="PPTBtnPreviewRSTransform"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<Image Name="PPTBtnPreviewLB" Source="Resources/PresentationExample/bottombar-white.png" Height="10"
VerticalAlignment="Bottom" HorizontalAlignment="Left" />
<Image Name="PPTBtnPreviewRB" Source="Resources/PresentationExample/bottombar-white.png" Height="12"
VerticalAlignment="Bottom" HorizontalAlignment="Right" />
</Grid>
</Border>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="在 PPT 模式下显示翻页按钮"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
@ -740,9 +759,9 @@
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="左侧偏移" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
FontSize="14" Margin="0,0,12,0" />
<Slider x:Name="PPTButtonLeftPositionValueSlider" Minimum="-500"
Maximum="500" Width="148" FontFamily="Microsoft YaHei UI"
Maximum="500" Width="138" FontFamily="Microsoft YaHei UI"
FontSize="20" IsSnapToTickEnabled="True" Value="0"
TickFrequency="1"
TickPlacement="None" AutoToolTipPlacement="None"
@ -792,16 +811,31 @@
</Image.Source>
</Image>
</Button>
<Button Margin="6,0,0,0" Padding="5" Name="PPTBtnLSResetBtn"
Click="PPTBtnLSResetBtn_Clicked">
<Image Width="16" Height="16">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#f4f4f5"
Geometry="F0 M24,24z M0,0z M12,2.01123C10.5428,2.01123 9.14528,2.5901 8.11488,3.6205 7.08449,4.65089 6.50562,6.04841 6.50562,7.50561L6.50562,16.4944C6.50562,17.9516 7.08449,19.3491 8.11488,20.3795 9.14528,21.4099 10.5428,21.9888 12,21.9888 13.4572,21.9888 14.8547,21.4099 15.8851,20.3795 16.9135,19.3511 17.4922,17.9569 17.4944,16.5027 17.4944,16.4999 17.4944,16.4972 17.4944,16.4944L17.4944,7.50563C17.4944,7.50285 17.4944,7.50007 17.4944,7.4973 17.4922,6.0431 16.9135,4.64893 15.8851,3.6205 14.8547,2.5901 13.4572,2.01123 12,2.01123z M9.5291,5.03471C10.1844,4.37939 11.0732,4.01123 12,4.01123 12.9268,4.01123 13.8156,4.37939 14.4709,5.03471 15.1262,5.69003 15.4944,6.57884 15.4944,7.50561L15.4944,16.4944C15.4944,17.4211 15.1262,18.31 14.4709,18.9653 13.8156,19.6206 12.9268,19.9888 12,19.9888 11.0732,19.9888 10.1844,19.6206 9.5291,18.9653 8.87377,18.31 8.50562,17.4211 8.50562,16.4944L8.50562,7.50561C8.50562,6.57884,8.87377,5.69003,9.5291,5.03471z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Button>
<TextBlock
Text="{Binding ElementName=PPTButtonLeftPositionValueSlider, Path=Value}"
VerticalAlignment="Center" FontSize="14" FontFamily="Consolas"
VerticalAlignment="Center" FontSize="13"
Margin="8,0,8,0" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="右侧偏移" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
FontSize="14" Margin="0,0,12,0" />
<Slider x:Name="PPTButtonRightPositionValueSlider" Minimum="-500"
Maximum="500" Width="148" FontFamily="Microsoft YaHei UI"
Maximum="500" Width="138" FontFamily="Microsoft YaHei UI"
FontSize="20" IsSnapToTickEnabled="True" Value="0"
TickFrequency="1"
TickPlacement="None" AutoToolTipPlacement="None"
@ -851,9 +885,24 @@
</Image.Source>
</Image>
</Button>
<Button Margin="6,0,0,0" Padding="5" Name="PPTBtnRSResetBtn"
Click="PPTBtnRSResetBtn_Clicked">
<Image Width="16" Height="16">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#f4f4f5"
Geometry="F0 M24,24z M0,0z M12,2.01123C10.5428,2.01123 9.14528,2.5901 8.11488,3.6205 7.08449,4.65089 6.50562,6.04841 6.50562,7.50561L6.50562,16.4944C6.50562,17.9516 7.08449,19.3491 8.11488,20.3795 9.14528,21.4099 10.5428,21.9888 12,21.9888 13.4572,21.9888 14.8547,21.4099 15.8851,20.3795 16.9135,19.3511 17.4922,17.9569 17.4944,16.5027 17.4944,16.4999 17.4944,16.4972 17.4944,16.4944L17.4944,7.50563C17.4944,7.50285 17.4944,7.50007 17.4944,7.4973 17.4922,6.0431 16.9135,4.64893 15.8851,3.6205 14.8547,2.5901 13.4572,2.01123 12,2.01123z M9.5291,5.03471C10.1844,4.37939 11.0732,4.01123 12,4.01123 12.9268,4.01123 13.8156,4.37939 14.4709,5.03471 15.1262,5.69003 15.4944,6.57884 15.4944,7.50561L15.4944,16.4944C15.4944,17.4211 15.1262,18.31 14.4709,18.9653 13.8156,19.6206 12.9268,19.9888 12,19.9888 11.0732,19.9888 10.1844,19.6206 9.5291,18.9653 8.87377,18.31 8.50562,17.4211 8.50562,16.4944L8.50562,7.50561C8.50562,6.57884,8.87377,5.69003,9.5291,5.03471z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Button>
<TextBlock
Text="{Binding ElementName=PPTButtonRightPositionValueSlider, Path=Value}"
VerticalAlignment="Center" FontSize="14" FontFamily="Consolas"
VerticalAlignment="Center" FontSize="13"
Margin="8,0,16,0" />
</ui:SimpleStackPanel>
<TextBlock
@ -4932,10 +4981,10 @@
</Grid>
<!--// PPT 侧边翻页按钮 //-->
<Viewbox x:Name="LeftSidePanelForPPTNavigation" Visibility="Visible" Margin="6,0,0,0" Width="50"
<Viewbox x:Name="LeftSidePanelForPPTNavigation" Visibility="Visible" Width="56"
HorizontalAlignment="Left" VerticalAlignment="Center">
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnLSBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
Background="#f4f4f5" Opacity="1" CornerRadius="6" Margin="6,0,0,0">
<ui:SimpleStackPanel Orientation="Vertical">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTLSPreviousButtonBorder"
@ -4998,10 +5047,10 @@
</ui:SimpleStackPanel>
</Border>
</Viewbox>
<Viewbox x:Name="RightSidePanelForPPTNavigation" Visibility="Visible" Margin="0,0,6,0" Width="50"
<Viewbox x:Name="RightSidePanelForPPTNavigation" Visibility="Visible" Width="56"
HorizontalAlignment="Right" VerticalAlignment="Center">
<Border BorderThickness="1" BorderBrush="#a1a1aa" Name="PPTBtnRSBorder"
Background="#f4f4f5" Opacity="1" CornerRadius="6">
Background="#f4f4f5" Opacity="1" CornerRadius="6" Margin="0,0,6,0">
<ui:SimpleStackPanel Orientation="Vertical">
<Border Width="50" Height="50" MouseUp="GridPPTControlPrevious_MouseUp"
Name="PPTRSPreviousButtonBorder"

View File

@ -193,8 +193,10 @@ namespace Ink_Canvas {
BorderInkReplayToolBox.Visibility = Visibility.Collapsed;
// 提前加载IA库优化第一笔等待时间
var strokeEmpty = new StrokeCollection();
InkRecognizeHelper.RecognizeShape(strokeEmpty);
if (Settings.InkToShape.IsInkToShapeEnabled && !Environment.Is64BitProcess) {
var strokeEmpty = new StrokeCollection();
InkRecognizeHelper.RecognizeShape(strokeEmpty);
}
SystemEvents.DisplaySettingsChanged += SystemEventsOnDisplaySettingsChanged;
}

View File

@ -47,7 +47,7 @@ namespace Ink_Canvas {
private void KeyExit(object sender, ExecutedRoutedEventArgs e) {
BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null);
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null);
}
private void KeyChangeToDrawTool(object sender, ExecutedRoutedEventArgs e) {

View File

@ -374,6 +374,12 @@ namespace Ink_Canvas {
}
private void UpdatePPTBtnDisplaySettingsStatus() {
var lsp = Settings.PowerPointSettings.PPTLSButtonPosition;
LeftSidePanelForPPTNavigation.Margin = new Thickness(0, 0, 0, lsp*2);
var rsp = Settings.PowerPointSettings.PPTRSButtonPosition;
RightSidePanelForPPTNavigation.Margin = new Thickness(0, 0, 0, rsp*2);
var dopt = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
char[] doptc = dopt.ToCharArray();
if (doptc[0] == '2') AnimationsHelper.ShowWithFadeIn(LeftBottomPanelForPPTNavigation);
@ -530,7 +536,7 @@ namespace Ink_Canvas {
private bool isEnteredSlideShowEndEvent = false; //防止重复调用本函数导致墨迹保存失效
private async void PptApplication_SlideShowEnd(Presentation Pres) {
if (isFloatingBarFolded) UnFoldFloatingBar_MouseUp(null, null);
if (isFloatingBarFolded) await UnFoldFloatingBar(new object());
LogHelper.WriteLogToFile(string.Format("PowerPoint Slide Show End"), LogHelper.LogType.Event);
if (isEnteredSlideShowEndEvent) {
@ -570,7 +576,7 @@ namespace Ink_Canvas {
}
}
Application.Current.Dispatcher.Invoke(() => {
await Application.Current.Dispatcher.InvokeAsync(() => {
isPresentationHaveBlackSpace = false;
if (BtnSwitchTheme.Content.ToString() == "深色") {
@ -616,7 +622,11 @@ namespace Ink_Canvas {
});
await Task.Delay(150);
ViewboxFloatingBarMarginAnimation(100, true);
Application.Current.Dispatcher.InvokeAsync(() => {
ViewboxFloatingBarMarginAnimation(100, true);
});
}
private int previousSlideID = 0;
@ -746,6 +756,7 @@ namespace Ink_Canvas {
private async void PPTNavigationBtn_MouseDown(object sender, MouseButtonEventArgs e)
{
lastBorderMouseDownObject = sender;
if (!Settings.PowerPointSettings.EnablePPTButtonPageClickable) return;
if (sender == PPTLSPageButton)
{
PPTLSPageButtonFeedbackBorder.Opacity = 0.15;
@ -805,6 +816,8 @@ namespace Ink_Canvas {
PPTRBPageButtonFeedbackBorder.Opacity = 0;
}
if (!Settings.PowerPointSettings.EnablePPTButtonPageClickable) return;
GridTransparencyFakeBackground.Opacity = 1;
GridTransparencyFakeBackground.Background = new SolidColorBrush(StringToColor("#01FFFFFF"));
CursorIcon_Click(null, null);

View File

@ -338,6 +338,7 @@ namespace Ink_Canvas {
if (!isLoaded) return;
Settings.PowerPointSettings.ShowPPTButton = ToggleSwitchShowPPTButton.IsOn;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void ToggleSwitchEnablePPTButtonPageClickable_OnToggled(object sender, RoutedEventArgs e) {
@ -353,7 +354,8 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxEnableRBPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -364,7 +366,8 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxEnableLSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -375,7 +378,8 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxEnableRSPPTButton_IsCheckChanged(object sender, RoutedEventArgs e)
@ -386,7 +390,8 @@ namespace Ink_Canvas {
c[3] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTButtonsDisplayOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnDisplaySettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxSPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
@ -397,7 +402,8 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxSPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
@ -408,7 +414,8 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxSPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
@ -419,7 +426,8 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTSButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxBPPTDisplayPage_IsCheckChange(object sender, RoutedEventArgs e)
@ -430,7 +438,8 @@ namespace Ink_Canvas {
c[0] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxBPPTHalfOpacity_IsCheckChange(object sender, RoutedEventArgs e)
@ -441,7 +450,8 @@ namespace Ink_Canvas {
c[1] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void CheckboxBPPTBlackBackground_IsCheckChange(object sender, RoutedEventArgs e)
@ -452,14 +462,17 @@ namespace Ink_Canvas {
c[2] = (bool)((CheckBox)sender).IsChecked ? '2' : '1';
Settings.PowerPointSettings.PPTBButtonsOption = int.Parse(new string(c));
SaveSettingsToFile();
UpdatePPTBtnStyleSettingsStatus();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnStyleSettingsStatus();
UpdatePPTBtnPreview();
}
private void PPTButtonLeftPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
Settings.PowerPointSettings.PPTLSButtonPosition = (int)PPTButtonLeftPositionValueSlider.Value;
UpdatePPTBtnSlidersStatus();
SaveSettingsToFile();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
SliderDelayAction.DebounceAction(2000, null, SaveSettingsToFile);
UpdatePPTBtnPreview();
}
private void UpdatePPTBtnSlidersStatus() {
@ -512,6 +525,7 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTLSButtonPosition = (int)PPTButtonLeftPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnLSMinusBtn_Clicked(object sender, RoutedEventArgs e)
@ -521,6 +535,7 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTLSButtonPosition = (int)PPTButtonLeftPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnLSSyncBtn_Clicked(object sender, RoutedEventArgs e)
@ -530,6 +545,16 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTRSButtonPosition = (int)PPTButtonLeftPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnLSResetBtn_Clicked(object sender, RoutedEventArgs e) {
if (!isLoaded) return;
PPTButtonLeftPositionValueSlider.Value = 0;
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTLSButtonPosition = 0;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnRSPlusBtn_Clicked(object sender, RoutedEventArgs e)
@ -539,6 +564,7 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTRSButtonPosition = (int)PPTButtonRightPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnRSMinusBtn_Clicked(object sender, RoutedEventArgs e)
@ -548,6 +574,7 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTRSButtonPosition = (int)PPTButtonRightPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnRSSyncBtn_Clicked(object sender, RoutedEventArgs e)
@ -557,14 +584,104 @@ namespace Ink_Canvas {
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTLSButtonPosition = (int)PPTButtonRightPositionValueSlider.Value;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private void PPTBtnRSResetBtn_Clicked(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
PPTButtonRightPositionValueSlider.Value = 0;
UpdatePPTBtnSlidersStatus();
Settings.PowerPointSettings.PPTRSButtonPosition = 0;
SaveSettingsToFile();
UpdatePPTBtnPreview();
}
private DelayAction SliderDelayAction = new DelayAction();
private void PPTButtonRightPositionValueSlider_ValueChanged(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.PowerPointSettings.PPTRSButtonPosition = (int)PPTButtonRightPositionValueSlider.Value;
UpdatePPTBtnSlidersStatus();
SaveSettingsToFile();
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) UpdatePPTBtnDisplaySettingsStatus();
SliderDelayAction.DebounceAction(2000,null, SaveSettingsToFile);
UpdatePPTBtnPreview();
}
private void UpdatePPTBtnPreview() {
//new BitmapImage(new Uri("pack://application:,,,/Resources/new-icons/unfold-chevron.png"));
var bopt = Settings.PowerPointSettings.PPTBButtonsOption.ToString();
char[] boptc = bopt.ToCharArray();
if (boptc[1] == '2') {
PPTBtnPreviewLB.Opacity = 0.5;
PPTBtnPreviewRB.Opacity = 0.5;
} else {
PPTBtnPreviewLB.Opacity = 1;
PPTBtnPreviewRB.Opacity = 1;
}
if (boptc[2] == '2') {
PPTBtnPreviewLB.Source =
new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/bottombar-dark.png"));
PPTBtnPreviewRB.Source = new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/bottombar-dark.png"));
} else {
PPTBtnPreviewLB.Source =
new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/bottombar-white.png"));
PPTBtnPreviewRB.Source = new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/bottombar-white.png"));
}
var sopt = Settings.PowerPointSettings.PPTSButtonsOption.ToString();
char[] soptc = sopt.ToCharArray();
if (soptc[1] == '2')
{
PPTBtnPreviewLS.Opacity = 0.5;
PPTBtnPreviewRS.Opacity = 0.5;
}
else
{
PPTBtnPreviewLS.Opacity = 1;
PPTBtnPreviewRS.Opacity = 1;
}
if (soptc[2] == '2')
{
PPTBtnPreviewLS.Source =
new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/sidebar-dark.png"));
PPTBtnPreviewRS.Source = new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/sidebar-dark.png"));
}
else
{
PPTBtnPreviewLS.Source =
new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/sidebar-white.png"));
PPTBtnPreviewRS.Source = new BitmapImage(
new Uri("pack://application:,,,/Resources/PresentationExample/sidebar-white.png"));
}
var dopt = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString();
char[] doptc = dopt.ToCharArray();
if (Settings.PowerPointSettings.ShowPPTButton) {
PPTBtnPreviewLB.Visibility = doptc[0] == '2' ? Visibility.Visible : Visibility.Collapsed;
PPTBtnPreviewRB.Visibility = doptc[1] == '2' ? Visibility.Visible : Visibility.Collapsed;
PPTBtnPreviewLS.Visibility = doptc[2] == '2' ? Visibility.Visible : Visibility.Collapsed;
PPTBtnPreviewRS.Visibility = doptc[3] == '2' ? Visibility.Visible : Visibility.Collapsed;
} else {
PPTBtnPreviewLB.Visibility = Visibility.Collapsed;
PPTBtnPreviewRB.Visibility = Visibility.Collapsed;
PPTBtnPreviewLS.Visibility = Visibility.Collapsed;
PPTBtnPreviewRS.Visibility = Visibility.Collapsed;
}
PPTBtnPreviewRSTransform.Y = -(Settings.PowerPointSettings.PPTRSButtonPosition * 0.5);
PPTBtnPreviewLSTransform.Y = -(Settings.PowerPointSettings.PPTLSButtonPosition * 0.5);
}
private void ToggleSwitchShowCursor_Toggled(object sender, RoutedEventArgs e) {

View File

@ -346,6 +346,9 @@ namespace Ink_Canvas {
PPTButtonRightPositionValueSlider.Value = Settings.PowerPointSettings.PPTRSButtonPosition;
UpdatePPTBtnSlidersStatus();
UpdatePPTBtnPreview();
// -- new --
ToggleSwitchNotifyHiddenPage.IsOn = Settings.PowerPointSettings.IsNotifyHiddenPage;

View File

@ -106,7 +106,7 @@ namespace Ink_Canvas {
if (Settings.Automation.IsAutoKillVComYouJiao)
{
var processes = Process.GetProcessesByName("VcomTeach");
if (processes.Length > 0) arg += " /IM VcomTeach.exe";
if (processes.Length > 0) arg += " /IM VcomTeach.exe" + " /IM VcomDaemon.exe" + " /IM VcomRender.exe";
}
if (Settings.Automation.IsAutoKillICA) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B