v1.2.0: 重构为插件+独立Manager架构,横版UI,精确保留文本框边距的文档转换

This commit is contained in:
雾启工作室
2026-06-28 11:12:26 +08:00
parent 790f5901cf
commit 063850ec56
38 changed files with 2669 additions and 1556 deletions

View File

@@ -10,18 +10,16 @@ namespace BetterEN5
{
class Program : dotnetCampus.EasiPlugins.EasiPlugin
{
private InkAutoSaveService? _autoSaveService;
protected override Task OnRunningAsync()
{
if (!EN.CommandOptions.IsCloud)
{
if (EN.App.IsReady)
{
Run();
}
else
{
EN.App.Ready += App_Ready;
}
}
return Task.CompletedTask;
}
@@ -36,6 +34,7 @@ namespace BetterEN5
{
await Task.Delay(TimeSpan.FromSeconds(3));
ExportUIItems();
StartAutoSave();
}
private void ExportUIItems()
@@ -49,11 +48,18 @@ namespace BetterEN5
new UIItemLangInfo(new CultureInfo("en"), "Export Ink"),
});
manager.AppendWithLang(new BoardMenuImportInk(),
new UIItemAttribute(UIItemPurposes.BoardEditMenu), new[]
{
new UIItemLangInfo(new CultureInfo("zh-CHS"), "导入墨迹"),
new UIItemLangInfo(new CultureInfo("en"), "Import Ink"),
});
manager.AppendWithLang(new BoardMenuSettings(),
new UIItemAttribute(UIItemPurposes.BoardEditMenu), new[]
{
new UIItemLangInfo(new CultureInfo("zh-CHS"), "Better-Seewo"),
new UIItemLangInfo(new CultureInfo("en"), "Better-Seewo"),
new UIItemLangInfo(new CultureInfo("zh-CHS"), "Better-Seewo 管理"),
new UIItemLangInfo(new CultureInfo("en"), "Better-Seewo Manager"),
});
manager.AppendWithLang(new HeadToolBarSettings(),
@@ -63,5 +69,11 @@ namespace BetterEN5
new UIItemLangInfo(new CultureInfo("en"), "Better-Seewo"),
});
}
private void StartAutoSave()
{
_autoSaveService = new InkAutoSaveService();
_ = _autoSaveService.StartAsync();
}
}
}