Optimize PowerPoint experience

This commit is contained in:
XY Wang 2023-02-11 17:27:19 +08:00
parent ced61634fa
commit c3e51c7cde
2 changed files with 14 additions and 11 deletions

View File

@ -798,7 +798,7 @@
</Border>
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid MouseUp="PPTNavigationBtn_Click">
<TextBlock Foreground="#FF666666" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="PptNavigationTextBlock" Text="0/0" />
<TextBlock Name="PptNavigationTextBlock" FontSize="10" Foreground="#FF666666" HorizontalAlignment="Center" VerticalAlignment="Center" Text="0/0" />
</Grid>
</Border>
<Border Width="36" MouseUp="GridPPTControlNext_MouseUp" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">

View File

@ -2384,11 +2384,20 @@ namespace Ink_Canvas
}
private void PPTNavigationBtn_Click(object sender, MouseButtonEventArgs e)
private async void PPTNavigationBtn_Click(object sender, MouseButtonEventArgs e)
{
Main_Grid.Background = new SolidColorBrush(StringToColor("#01FFFFFF"));
BtnHideInkCanvas_Click(sender, e);
pptApplication.Presentations[1].SlideShowWindow.SlideNavigation.Visible = true;
// 控制居中
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible)
{
if (ViewboxFloatingBar.Margin == new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200))
{
await Task.Delay(100);
ViewboxFloatingBar.Margin = new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200);
}
}
}
private void BtnPPTSlideShow_Click(object sender, RoutedEventArgs e)
@ -5799,7 +5808,7 @@ namespace Ink_Canvas
HideSubPanels();
}
private void SymbolIconCursor_Click(object sender, RoutedEventArgs e)
private async void SymbolIconCursor_Click(object sender, RoutedEventArgs e)
{
if (currentMode != 0)
{
@ -5813,14 +5822,8 @@ namespace Ink_Canvas
{
if (ViewboxFloatingBar.Margin == new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200))
{
new Thread(new ThreadStart(() =>
{
Thread.Sleep(100);
Application.Current.Dispatcher.Invoke(() =>
{
await Task.Delay(100);
ViewboxFloatingBar.Margin = new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200);
});
})).Start();
}
}
}