[update] 同步上游ica commit-42ac910对PPT最后放映页面的修改

This commit is contained in:
Dubi906w 2024-08-03 15:22:27 +08:00
parent 066c7dea55
commit fec0f55deb
2 changed files with 17 additions and 2 deletions

View File

@ -2739,7 +2739,7 @@
</Grid> </Grid>
</Viewbox> </Viewbox>
<!-- 右下角 --> <!-- 右下角 -->
<Viewbox x:Name="ViewboxBlackboardRightSide" Margin="3,0,0,0" Height="55" HorizontalAlignment="Right" <Viewbox x:Name="ViewboxBlackboardRightSide" Margin="0,0,3,0" Height="55" HorizontalAlignment="Right"
VerticalAlignment="Bottom"> VerticalAlignment="Bottom">
<Viewbox.LayoutTransform> <Viewbox.LayoutTransform>
<ScaleTransform x:Name="ViewboxBlackboardRightSideScaleTransform" ScaleX="1" ScaleY="1" /> <ScaleTransform x:Name="ViewboxBlackboardRightSideScaleTransform" ScaleX="1" ScaleY="1" />
@ -6663,7 +6663,7 @@
Toggled="ToggleSwitchRegistryShowBlackScreenLastSlideShow_Toggled" /> Toggled="ToggleSwitchRegistryShowBlackScreenLastSlideShow_Toggled" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<TextBlock <TextBlock
Text="# 以上功能会修改注册表需要管理员权限运行。操作前请先备份注册表。选项仅支持最新Office 365其他版本未经测试。" Text="# 以上功能会修改注册表需要管理员权限运行。操作前请先备份注册表。选项仅支持最新Office 365和WPS,其他版本未经测试。"
TextWrapping="Wrap" Foreground="#a1a1aa" /> 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" />

View File

@ -243,6 +243,7 @@ namespace Ink_Canvas {
private string pptName = null; private string pptName = null;
int currentShowPosition = -1;
private void UpdatePPTBtnStyleSettingsStatus() { private void UpdatePPTBtnStyleSettingsStatus() {
var sopt = Settings.PowerPointSettings.PPTSButtonsOption.ToString(); var sopt = Settings.PowerPointSettings.PPTSButtonsOption.ToString();
@ -549,6 +550,17 @@ namespace Ink_Canvas {
File.WriteAllText(folderPath + "/Position", previousSlideID.ToString()); File.WriteAllText(folderPath + "/Position", previousSlideID.ToString());
} }
catch { } catch { }
Application.Current.Dispatcher.Invoke(() =>
{
try
{
MemoryStream ms = new MemoryStream();
inkCanvas.Strokes.Save(ms);
ms.Position = 0;
memoryStreams[currentShowPosition] = ms;
}
catch { }
});
for (var i = 1; i <= Pres.Slides.Count; i++) for (var i = 1; i <= Pres.Slides.Count; i++)
if (memoryStreams[i] != null) if (memoryStreams[i] != null)
@ -627,6 +639,8 @@ namespace Ink_Canvas {
if (memoryStreams[Wn.View.CurrentShowPosition] != null && if (memoryStreams[Wn.View.CurrentShowPosition] != null &&
memoryStreams[Wn.View.CurrentShowPosition].Length > 0) memoryStreams[Wn.View.CurrentShowPosition].Length > 0)
inkCanvas.Strokes.Add(new StrokeCollection(memoryStreams[Wn.View.CurrentShowPosition])); inkCanvas.Strokes.Add(new StrokeCollection(memoryStreams[Wn.View.CurrentShowPosition]));
currentShowPosition = Wn.View.CurrentShowPosition;
} }
catch { catch {
// ignored // ignored
@ -638,6 +652,7 @@ namespace Ink_Canvas {
//PptNavigationTextBlock.Text = $"{Wn.View.CurrentShowPosition}/{Wn.Presentation.Slides.Count}"; //PptNavigationTextBlock.Text = $"{Wn.View.CurrentShowPosition}/{Wn.Presentation.Slides.Count}";
}); });
previousSlideID = Wn.View.CurrentShowPosition; previousSlideID = Wn.View.CurrentShowPosition;
} }
private bool _isPptClickingBtnTurned = false; private bool _isPptClickingBtnTurned = false;