v1.2.0: 重构为插件+独立Manager架构,横版UI,精确保留文本框边距的文档转换
This commit is contained in:
28
Manager/Services/InkService.cs
Normal file
28
Manager/Services/InkService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetterSeewo.Manager.Services
|
||||
{
|
||||
public class InkService
|
||||
{
|
||||
public async Task ExportInkAsync(string filePath)
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
var dir = Path.GetDirectoryName(filePath);
|
||||
if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir))
|
||||
Directory.CreateDirectory(dir);
|
||||
File.WriteAllText(filePath, "{\"message\":\"ink_export_placeholder\"}");
|
||||
});
|
||||
}
|
||||
|
||||
public async Task ImportInkAsync(string filePath)
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (!File.Exists(filePath)) return;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user