优化代码

This commit is contained in:
2026-03-03 16:04:20 +08:00
parent 62e79ff5b3
commit a948c0d7fb
73 changed files with 944 additions and 997 deletions
+15 -15
View File
@@ -147,7 +147,7 @@ namespace Ink_Canvas
{
// 检查是否是PPT模式
bool isPPTMode = BtnPPTSlideShowEnd.Visibility == Visibility.Visible && _pptManager?.IsConnected == true;
if (isPPTMode)
{
// PPT模式:保存为多个XML文件
@@ -593,22 +593,22 @@ namespace Ink_Canvas
}
// 创建ZIP文件
if (File.Exists(zipFileName))
File.Delete(zipFileName);
if (File.Exists(zipFileName))
File.Delete(zipFileName);
ZipFile.CreateFromDirectory(tempDir, zipFileName);
ZipFile.CreateFromDirectory(tempDir, zipFileName);
// 异步上传ZIP文件到Dlass
_ = Task.Run(async () =>
{
try
// 异步上传ZIP文件到Dlass
_ = Task.Run(async () =>
{
await Helpers.UploadHelper.UploadFileAsync(zipFileName);
}
catch (Exception)
{
}
});
try
{
await Helpers.UploadHelper.UploadFileAsync(zipFileName);
}
catch (Exception)
{
}
});
if (newNotice)
{
@@ -1087,7 +1087,7 @@ namespace Ink_Canvas
{
StrokeCollection strokes = null;
string extension = Path.GetExtension(file).ToLower();
if (extension == ".xml")
{
// 从XML文件加载