v1.1.0: 修复入口使用BoardEditMenu/HeadToolBar, 16:9横版UI重做, 进度条在操作时显示, 雾启工作室
This commit is contained in:
@@ -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 }
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user