[fix] PPT修复(窗口不会再消失了,但是如果先开启白板,然后ppt放映的话会导致白板的页面内容消失,应该是这样的)

This commit is contained in:
Dubi906w 2024-06-15 14:36:39 +08:00
parent a6d3c6a505
commit 0be11a9334
7 changed files with 43 additions and 32 deletions

View File

@ -29,17 +29,17 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>False</Prefer32Bit>
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|AnyCPU'">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>False</Prefer32Bit>
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>embedded</DebugType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Prefer32Bit>False</Prefer32Bit>
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\icc.ico</ApplicationIcon>
@ -146,6 +146,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="OSVersionExt" Version="3.0.0" />
</ItemGroup>
<ItemGroup>

View File

@ -58,7 +58,7 @@
</Window.Resources>
<!--输入命令绑定-->
<Window.InputBindings>
<KeyBinding Key="Esc" Command="{StaticResource KeyExit}" />
<KeyBinding Gesture="Escape" 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}" />

View File

@ -1676,7 +1676,7 @@ namespace Ink_Canvas {
AnimationsHelper.HideWithSlideAndFade(BlackboardRightSide);
SaveStrokes(true);
//ClearStrokes(true);
ClearStrokes(true);
RestoreStrokes();
if (BtnSwitchTheme.Content.ToString() == "浅色") {

View File

@ -402,7 +402,6 @@ namespace Ink_Canvas {
LogHelper.WriteLogToFile("PowerPoint Application Slide Show Begin", LogHelper.LogType.Event);
await Application.Current.Dispatcher.InvokeAsync(() => {
if (currentMode != 0) ImageBlackboard_MouseUp(null, null);
//调整颜色
var screenRatio = SystemParameters.PrimaryScreenWidth / SystemParameters.PrimaryScreenHeight;
@ -494,24 +493,27 @@ namespace Ink_Canvas {
if (Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow &&
!Settings.Automation.IsAutoFoldInPPTSlideShow &&
GridTransparencyFakeBackground.Background == Brushes.Transparent && !isFloatingBarFolded) {
if (currentMode != 0) {
currentMode = 0;
GridBackgroundCover.Visibility = Visibility.Collapsed;
AnimationsHelper.HideWithSlideAndFade(BlackboardLeftSide);
AnimationsHelper.HideWithSlideAndFade(BlackboardCenterSide);
AnimationsHelper.HideWithSlideAndFade(BlackboardRightSide);
//SaveStrokes();
ClearStrokes(true);
BtnSwitch.Content = BtnSwitchTheme.Content.ToString() == "浅色" ? "黑板" : "白板";
StackPanelPPTButtons.Visibility = Visibility.Visible;
}
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
}
ClearStrokes(true);
if (currentMode != 0)
{
//currentMode = 0;
//GridBackgroundCover.Visibility = Visibility.Collapsed;
//AnimationsHelper.HideWithSlideAndFade(BlackboardLeftSide);
//AnimationsHelper.HideWithSlideAndFade(BlackboardCenterSide);
//AnimationsHelper.HideWithSlideAndFade(BlackboardRightSide);
//SaveStrokes();
//ClearStrokes(true);
//BtnSwitch.Content = BtnSwitchTheme.Content.ToString() == "浅色" ? "黑板" : "白板";
//StackPanelPPTButtons.Visibility = Visibility.Visible;
ImageBlackboard_MouseUp(null,null);
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
}
//ClearStrokes(true);
BorderFloatingBarMainControls.Visibility = Visibility.Visible;
@ -527,7 +529,9 @@ namespace Ink_Canvas {
if (!isFloatingBarFolded) {
new Thread(new ThreadStart(() => {
Thread.Sleep(100);
Application.Current.Dispatcher.Invoke(() => { ViewboxFloatingBarMarginAnimation(60); });
Application.Current.Dispatcher.Invoke(() => {
ViewboxFloatingBarMarginAnimation(60);
});
})).Start();
}
});
@ -599,18 +603,20 @@ namespace Ink_Canvas {
ViewBoxStackPanelMain.Margin = new Thickness(10, 10, 10, 55);
if (currentMode != 0) {
currentMode = 0;
GridBackgroundCover.Visibility = Visibility.Collapsed;
AnimationsHelper.HideWithSlideAndFade(BlackboardLeftSide);
AnimationsHelper.HideWithSlideAndFade(BlackboardCenterSide);
AnimationsHelper.HideWithSlideAndFade(BlackboardRightSide);
//GridBackgroundCover.Visibility = Visibility.Collapsed;
//AnimationsHelper.HideWithSlideAndFade(BlackboardLeftSide);
//AnimationsHelper.HideWithSlideAndFade(BlackboardCenterSide);
//AnimationsHelper.HideWithSlideAndFade(BlackboardRightSide);
//SaveStrokes();
ClearStrokes(true);
//ClearStrokes(true);
//RestoreStrokes(true);
BtnSwitch.Content = BtnSwitchTheme.Content.ToString() == "浅色" ? "黑板" : "白板";
StackPanelPPTButtons.Visibility = Visibility.Visible;
//BtnSwitch.Content = BtnSwitchTheme.Content.ToString() == "浅色" ? "黑板" : "白板";
//StackPanelPPTButtons.Visibility = Visibility.Visible;
CloseWhiteboardImmediately();
currentMode = 0;
}
ClearStrokes(true);

View File

@ -1359,6 +1359,7 @@ namespace Ink_Canvas {
Settings.Advanced.IsLogEnabled = true;
Settings.Advanced.IsSecondConfirmWhenShutdownApp = false;
Settings.Advanced.IsEnableEdgeGestureUtil = false;
Settings.Advanced.EdgeGestureUtilOnlyAffectBlackboardMode = false;
Settings.Advanced.IsEnableFullScreenHelper = false;
Settings.Advanced.IsEnableForceFullScreen = false;
Settings.Advanced.IsEnableDPIChangeDetection = false;

View File

@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.5.0")]
[assembly: AssemblyFileVersion("5.0.5.0")]
[assembly: AssemblyVersion("5.0.5.1")]
[assembly: AssemblyFileVersion("5.0.5.1")]

View File

@ -364,6 +364,9 @@ namespace Ink_Canvas
[JsonProperty("isEnableEdgeGestureUtil")]
public bool IsEnableEdgeGestureUtil { get; set; } = false;
[JsonProperty("edgeGestureUtilOnlyAffectBlackboardMode")]
public bool EdgeGestureUtilOnlyAffectBlackboardMode { get; set; } = false;
[JsonProperty("isEnableForceFullScreen")]
public bool IsEnableForceFullScreen { get; set; } = false;