v1.1.0: 修复入口使用BoardEditMenu/HeadToolBar, 16:9横版UI重做, 进度条在操作时显示, 雾启工作室

This commit is contained in:
miao-moe
2026-06-28 03:17:55 +08:00
parent 2d35293f7c
commit baf07956e9
16 changed files with 413 additions and 630 deletions

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Threading;
@@ -15,22 +14,8 @@ namespace BetterEN5
manager.Append(c => item, attribute);
var purpose = attribute.Purposes[0];
string menuName;
if (purpose == UIItemPurposes.BoardEditMenu)
{
menuName = "BoardEditContextMenu";
}
else if (purpose == UIItemPurposes.HeadToolBar)
{
menuName = "HeadToolBar";
}
else
{
menuName = purpose.Replace(".", "_");
}
var itemLangKey = item.GetType().Name.Replace("MenuItem", "").Replace("HeadToolBar", "").Replace("ApplicationMenu", "").Replace("ExtendedTitleBar", "");
var langKey = $"Lang.{menuName}.{itemLangKey}";
var prefix = purpose == UIItemPurposes.BoardEditMenu ? "BoardEditContextMenu" : purpose;
var key = $"Lang.{prefix}.{item.GetType().Name}";
Application.Current.Dispatcher.InvokeAsync(() =>
{
@@ -38,9 +23,9 @@ namespace BetterEN5
{
Lang.Sources.Add(new DictionaryLanguageSource
{
[langInfo.CultureInfo] = new Dictionary<string, string>()
[langInfo.CultureInfo] = new Dictionary<string, string>
{
{ langKey, langInfo.LangText },
{ key, langInfo.LangText }
},
});
}