diff --git a/KitX Contracts/KitX.Contract.CSharp/IIdentityInterface.cs b/KitX Contracts/KitX.Contract.CSharp/IIdentityInterface.cs
index 82ad0c6b..ddd79e18 100644
--- a/KitX Contracts/KitX.Contract.CSharp/IIdentityInterface.cs
+++ b/KitX Contracts/KitX.Contract.CSharp/IIdentityInterface.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.ComponentModel.Composition;
namespace KitX.Contract.CSharp
@@ -22,7 +23,7 @@ public interface IIdentityInterface
/// 获取显示名称
///
/// 显示名称
- string GetDisplayName();
+ Dictionary GetDisplayName();
///
/// 获取作者名称
diff --git a/KitX Dashboard/Helper.cs b/KitX Dashboard/Helper.cs
index 90f9de98..2dd1b74c 100644
--- a/KitX Dashboard/Helper.cs
+++ b/KitX Dashboard/Helper.cs
@@ -127,7 +127,7 @@ public static void InitConfig()
else LoadConfig();
if (!File.Exists(Path.GetFullPath(GlobalInfo.PluginsListConfigFilePath)))
SavePluginsListConfig();
- else SavePluginsListConfig();
+ else LoadPluginsListConfig();
}
///
diff --git a/KitX Dashboard/Languages/en-us.axaml b/KitX Dashboard/Languages/en-us.axaml
index be20afaf..74a48060 100644
--- a/KitX Dashboard/Languages/en-us.axaml
+++ b/KitX Dashboard/Languages/en-us.axaml
@@ -87,6 +87,21 @@
Remove
Remove and Delete
+ Internal Name:
+ Version:
+ Display Name:
+ Author:
+ Publisher:
+ Author Link:
+ Publisher Link:
+ Publish Date:
+ Last Update Date:
+ Is Market Version:
+ Simple Description:
+ Complex Description:
+ Docs:
+ Root Startup File Name:
+
No other devices in network.
This Device
diff --git a/KitX Dashboard/Languages/ja-jp.axaml b/KitX Dashboard/Languages/ja-jp.axaml
index 8bcf4f50..765d20a4 100644
--- a/KitX Dashboard/Languages/ja-jp.axaml
+++ b/KitX Dashboard/Languages/ja-jp.axaml
@@ -87,6 +87,21 @@
削除する
削除して破壊する
+ 内部名:
+ バージョン:
+ 番組名:
+ 著者:
+ 出版社:
+ 著者リンク:
+ 発行者リンク:
+ 発売日:
+ 最終更新日:
+ それは市場のバージョンですか:
+ 概要:
+ 説明:
+ ドキュメンテーション:
+ ルートファイル名の開始:
+
ネットワーク上に他のデバイスがない
この装置
diff --git a/KitX Dashboard/Languages/zh-cn.axaml b/KitX Dashboard/Languages/zh-cn.axaml
index 5a782194..508d636b 100644
--- a/KitX Dashboard/Languages/zh-cn.axaml
+++ b/KitX Dashboard/Languages/zh-cn.axaml
@@ -86,6 +86,21 @@
详细信息
移除
移除并删除
+
+ 内部名称:
+ 版本:
+ 显示名称:
+ 作者:
+ 发行商:
+ 作者链接:
+ 发行商链接:
+ 发布日期:
+ 最后更新日期:
+ 是否是市场版本:
+ 概述:
+ 描述:
+ 文档:
+ 起始根文件名:
网络中没有其它设备
diff --git a/KitX Dashboard/Languages/zh-cnt.axaml b/KitX Dashboard/Languages/zh-cnt.axaml
index b56910fa..915d0274 100644
--- a/KitX Dashboard/Languages/zh-cnt.axaml
+++ b/KitX Dashboard/Languages/zh-cnt.axaml
@@ -87,6 +87,21 @@
移除
移除并刪除
+ 内部名稱:
+ 版本:
+ 顯示名稱:
+ 作者:
+ 發行商:
+ 作者鏈接:
+ 發行商鏈接:
+ 發行日期:
+ 最後更新日期:
+ 是否是市場版本:
+ 概述:
+ 描述:
+ 文檔:
+ 起始根文件名:
+
網路中空無一物
本機
diff --git a/KitX Dashboard/ViewModels/Pages/Controls/PluginBarViewModel.cs b/KitX Dashboard/ViewModels/Pages/Controls/PluginBarViewModel.cs
index 17e39061..7fc2daa9 100644
--- a/KitX Dashboard/ViewModels/Pages/Controls/PluginBarViewModel.cs
+++ b/KitX Dashboard/ViewModels/Pages/Controls/PluginBarViewModel.cs
@@ -4,19 +4,19 @@
using KitX_Dashboard.Views.Pages.Controls;
using System;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Text;
namespace KitX_Dashboard.ViewModels.Pages.Controls
{
- internal class PluginBarViewModel : ViewModelBase
+ internal class PluginBarViewModel : ViewModelBase, INotifyPropertyChanged
{
public PluginBarViewModel()
{
-
InitCommands();
-
+ InitEvents();
}
@@ -28,13 +28,38 @@ internal void InitCommands()
LaunchCommand = new(Launch);
}
+ internal void InitEvents()
+ {
+ EventHandlers.LanguageChanged += () =>
+ {
+ PropertyChanged?.Invoke(this, new(nameof(DisplayName)));
+ };
+ }
+
internal PluginBar? PluginBar { get; set; }
internal Plugin? PluginDetail { get; set; }
+ internal string? DisplayName
+ {
+ get
+ {
+ if (PluginDetail != null)
+ return PluginDetail.PluginDetails.DisplayName
+ .ContainsKey(Program.GlobalConfig.App.AppLanguage)
+ ? PluginDetail.PluginDetails.DisplayName[Program.GlobalConfig.App.AppLanguage]
+ : PluginDetail.PluginDetails.DisplayName.Values.GetEnumerator().Current;
+ return null;
+ }
+ }
+
+ internal string? AuthorName => PluginDetail?.PluginDetails.AuthorName;
+
+ internal string? Version => PluginDetail?.PluginDetails.Version;
+
internal ObservableCollection? PluginBars { get; set; }
- public Bitmap IconDisplay
+ internal Bitmap IconDisplay
{
get
{
@@ -110,5 +135,7 @@ internal void Launch(object _)
{
}
+
+ public new event PropertyChangedEventHandler? PropertyChanged;
}
}
diff --git a/KitX Dashboard/ViewModels/Pages/Controls/PluginCardViewModel.cs b/KitX Dashboard/ViewModels/Pages/Controls/PluginCardViewModel.cs
index 558efbc7..f34dc1c5 100644
--- a/KitX Dashboard/ViewModels/Pages/Controls/PluginCardViewModel.cs
+++ b/KitX Dashboard/ViewModels/Pages/Controls/PluginCardViewModel.cs
@@ -1,5 +1,6 @@
using Avalonia.Media.Imaging;
using BasicHelper.IO;
+using KitX.Web.Rules;
using System;
using System.IO;
using System.Text;
@@ -8,22 +9,25 @@ namespace KitX_Dashboard.ViewModels.Pages.Controls
{
internal class PluginCardViewModel
{
- public KitX.Web.Rules.PluginStruct pluginStruct = new();
+ internal PluginStruct pluginStruct = new();
public PluginCardViewModel()
{
pluginStruct.IconInBase64 = FileHelper.ReadAll(Path.GetFullPath($"./Assets/KitX.Base64.txt"));
}
- public string DisplayName => pluginStruct.DisplayName;
+ internal string DisplayName => pluginStruct.DisplayName
+ .ContainsKey(Program.GlobalConfig.App.AppLanguage)
+ ? pluginStruct.DisplayName[Program.GlobalConfig.App.AppLanguage]
+ : pluginStruct.DisplayName.Values.GetEnumerator().Current;
- public string Version => pluginStruct.Version;
+ internal string Version => pluginStruct.Version;
- public string SimpleDescription => pluginStruct.SimpleDescription;
+ internal string SimpleDescription => pluginStruct.SimpleDescription;
- public string IconInBase64 => pluginStruct.IconInBase64;
+ internal string IconInBase64 => pluginStruct.IconInBase64;
- public Bitmap IconDisplay
+ internal Bitmap IconDisplay
{
get
{
diff --git a/KitX Dashboard/Views/Pages/Controls/PluginBar.axaml b/KitX Dashboard/Views/Pages/Controls/PluginBar.axaml
index ebbf7cdf..d89202c4 100644
--- a/KitX Dashboard/Views/Pages/Controls/PluginBar.axaml
+++ b/KitX Dashboard/Views/Pages/Controls/PluginBar.axaml
@@ -10,18 +10,6 @@
Margin="10,5,10,5">
-
-
-
-
-
-
-
-
-
-
diff --git a/KitX Official Plugins/TestPlugin.WPF.Core/MainWindow.xaml.cs b/KitX Official Plugins/TestPlugin.WPF.Core/MainWindow.xaml.cs
index a8ff6422..5482da04 100644
--- a/KitX Official Plugins/TestPlugin.WPF.Core/MainWindow.xaml.cs
+++ b/KitX Official Plugins/TestPlugin.WPF.Core/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
using KitX.Contract.CSharp;
using System;
+using System.Collections.Generic;
using System.Windows;
#pragma warning disable CS8603 // 可能返回 null 引用。
@@ -37,7 +38,13 @@ public MainWindow()
/// 获取显示名称
///
/// 显示名称
- public string GetDisplayName() => "显示名称";
+ public Dictionary GetDisplayName() => new()
+ {
+ { "zh-cn", "显示名称" },
+ { "zh-cnt", "顯示名稱" },
+ { "en-us", "Display Name" },
+ { "ja-jp", "番組名" }
+ };
///
/// 获取作者名称
diff --git a/KitX Official Plugins/TestPlugin.WPF.Winform/MainWindow.xaml.cs b/KitX Official Plugins/TestPlugin.WPF.Winform/MainWindow.xaml.cs
index 32d4808f..0af7f91c 100644
--- a/KitX Official Plugins/TestPlugin.WPF.Winform/MainWindow.xaml.cs
+++ b/KitX Official Plugins/TestPlugin.WPF.Winform/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
using KitX.Contract.CSharp;
using System;
+using System.Collections.Generic;
using System.Windows;
namespace TestPlugin.WPF.Winform
@@ -35,7 +36,13 @@ public MainWindow()
/// 获取显示名称
///
/// 显示名称
- public string GetDisplayName() => "显示名称";
+ public Dictionary GetDisplayName() => new Dictionary()
+ {
+ { "zh-cn", "显示名称" },
+ { "zh-cnt", "顯示名稱" },
+ { "en-us", "Display Name" },
+ { "ja-jp", "番組名" }
+ };
///
/// 获取作者名称
diff --git a/KitX Official Plugins/TestPlugin.WPF.Winform/Properties/AssemblyInfo.cs b/KitX Official Plugins/TestPlugin.WPF.Winform/Properties/AssemblyInfo.cs
index 2de47688..9bd0fa33 100644
--- a/KitX Official Plugins/TestPlugin.WPF.Winform/Properties/AssemblyInfo.cs
+++ b/KitX Official Plugins/TestPlugin.WPF.Winform/Properties/AssemblyInfo.cs
@@ -1,6 +1,4 @@
using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
diff --git a/KitX Official Plugins/TestPlugin.WPF.Winform/TestPlugin.WPF.Winform.csproj b/KitX Official Plugins/TestPlugin.WPF.Winform/TestPlugin.WPF.Winform.csproj
index 701e9acb..20df7ef3 100644
--- a/KitX Official Plugins/TestPlugin.WPF.Winform/TestPlugin.WPF.Winform.csproj
+++ b/KitX Official Plugins/TestPlugin.WPF.Winform/TestPlugin.WPF.Winform.csproj
@@ -38,9 +38,6 @@
-
- ..\..\packages\KitX.Contract.CSharp.22.4.6242.1132\lib\net40\KitX.Contract.CSharp.dll
-
@@ -92,5 +89,11 @@
Settings.Designer.cs
+
+
+ {c1a05e25-8dba-4ca4-88d5-e28d69b76d13}
+ KitX.Contract.CSharp
+
+
\ No newline at end of file
diff --git a/KitX Rules/KitX.Web.Rules/PluginStruct.cs b/KitX Rules/KitX.Web.Rules/PluginStruct.cs
index c6c90f7c..15f5319a 100644
--- a/KitX Rules/KitX.Web.Rules/PluginStruct.cs
+++ b/KitX Rules/KitX.Web.Rules/PluginStruct.cs
@@ -12,7 +12,7 @@ public struct PluginStruct
public string Version { get; set; }
- public string DisplayName { get; set; }
+ public Dictionary DisplayName { get; set; }
public string AuthorName { get; set; }
diff --git "a/KitX Test/KitX File Format Helper/KitX.KXP.Helper.Test/KXP\345\260\201\350\243\205\346\265\213\350\257\225.cs" "b/KitX Test/KitX File Format Helper/KitX.KXP.Helper.Test/KXP\345\260\201\350\243\205\346\265\213\350\257\225.cs"
index fcc9a7e0..8441e66a 100644
--- "a/KitX Test/KitX File Format Helper/KitX.KXP.Helper.Test/KXP\345\260\201\350\243\205\346\265\213\350\257\225.cs"
+++ "b/KitX Test/KitX File Format Helper/KitX.KXP.Helper.Test/KXP\345\260\201\350\243\205\346\265\213\350\257\225.cs"
@@ -33,7 +33,12 @@ namespace KitX.KXP.Helper.Test
AuthorLink = "AuthorLink",
AuthorName = "AuthorName",
ComplexDescription = "ComplexDescription",
- DisplayName = "DisplayName",
+ DisplayName = new()
+ {
+ { "zh-cn", "ʾ" },
+ { "zh-cnt", "@ʾQ" },
+ { "en-us", "DisplayName" },
+ },
Functions = new()
{
FunctionsDisplayName = new()