2026-06-28 01:43:01 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Cvte.Composition;
|
|
|
|
|
using Cvte.EasiNote;
|
|
|
|
|
using BetterEN5.Services;
|
|
|
|
|
using BetterEN5.UI;
|
|
|
|
|
|
|
|
|
|
namespace BetterEN5
|
|
|
|
|
{
|
|
|
|
|
class Program : dotnetCampus.EasiPlugins.EasiPlugin
|
|
|
|
|
{
|
|
|
|
|
protected override Task OnRunningAsync()
|
|
|
|
|
{
|
|
|
|
|
if (!EN.CommandOptions.IsCloud)
|
|
|
|
|
{
|
|
|
|
|
if (EN.App.IsReady)
|
|
|
|
|
{
|
|
|
|
|
Run();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
EN.App.Ready += App_Ready;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void App_Ready(object? sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
EN.App.Ready -= App_Ready;
|
|
|
|
|
Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async void Run()
|
|
|
|
|
{
|
|
|
|
|
await Task.Delay(TimeSpan.FromSeconds(3));
|
|
|
|
|
ExportUIItems();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ExportUIItems()
|
|
|
|
|
{
|
|
|
|
|
var manager = Container.Current.Get<IUIItemManager>();
|
2026-06-28 02:43:22 +08:00
|
|
|
|
2026-06-28 03:17:55 +08:00
|
|
|
manager.AppendWithLang(new BoardMenuExportInk(),
|
|
|
|
|
new UIItemAttribute(UIItemPurposes.BoardEditMenu), new[]
|
2026-06-28 01:43:01 +08:00
|
|
|
{
|
|
|
|
|
new UIItemLangInfo(new CultureInfo("zh-CHS"), "导出墨迹"),
|
|
|
|
|
new UIItemLangInfo(new CultureInfo("en"), "Export Ink"),
|
|
|
|
|
});
|
2026-06-28 02:43:22 +08:00
|
|
|
|
2026-06-28 03:17:55 +08:00
|
|
|
manager.AppendWithLang(new BoardMenuSettings(),
|
|
|
|
|
new UIItemAttribute(UIItemPurposes.BoardEditMenu), new[]
|
2026-06-28 02:43:22 +08:00
|
|
|
{
|
2026-06-28 03:17:55 +08:00
|
|
|
new UIItemLangInfo(new CultureInfo("zh-CHS"), "Better-Seewo"),
|
|
|
|
|
new UIItemLangInfo(new CultureInfo("en"), "Better-Seewo"),
|
2026-06-28 02:43:22 +08:00
|
|
|
});
|
|
|
|
|
|
2026-06-28 03:17:55 +08:00
|
|
|
manager.AppendWithLang(new HeadToolBarSettings(),
|
|
|
|
|
new UIItemAttribute(UIItemPurposes.HeadToolBar), new[]
|
2026-06-28 01:43:01 +08:00
|
|
|
{
|
2026-06-28 02:43:22 +08:00
|
|
|
new UIItemLangInfo(new CultureInfo("zh-CHS"), "Better-Seewo"),
|
|
|
|
|
new UIItemLangInfo(new CultureInfo("en"), "Better-Seewo"),
|
2026-06-28 01:43:01 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|