提交 9459dfec 编写于 作者: A Aigio Liu

💄 Logo

上级 f3ea23f2
......@@ -18,8 +18,8 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v2\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v2\Development\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
......
......@@ -13,8 +13,8 @@
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net3')) OR $(TargetFramework.StartsWith('net4')) OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v2\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v2\Development\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release' AND ($(TargetFramework.StartsWith('net3')) OR $(TargetFramework.StartsWith('net4')) OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows')">
......
......@@ -12,8 +12,8 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v2\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v2\Development\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Release'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
<ApplicationIcon Condition="'$(Configuration)'=='Debug'">..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows')) AND ($(RuntimeIdentifier.StartsWith('win-')) OR $(RuntimeIdentifier) == '')">
......
......@@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>pub</AssemblyName>
<OutputType>Exe</OutputType>
<ApplicationIcon>..\..\res\icons\app\v2\Icon.ico</ApplicationIcon>
<ApplicationIcon>..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>TOOL_OSL;$(DefineConstants)</DefineConstants>
</PropertyGroup>
......
......@@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>pub</AssemblyName>
<OutputType>Exe</OutputType>
<ApplicationIcon>..\..\res\icons\app\v2\Icon.ico</ApplicationIcon>
<ApplicationIcon>..\..\res\icons\app\v3\Icon.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>TOOL_PUBLISH;$(DefineConstants)</DefineConstants>
</PropertyGroup>
......
......@@ -58,7 +58,7 @@ static class ObfuscarHelper
var psi = DotNetCLIHelper.GetProcessStartInfo(AppContext.BaseDirectory);
psi.Arguments = "tool install --global Obfuscar.GlobalTool";
ProcessHelper.StartAndWaitForExit(psi);
ProcessHelper.StartAndWaitForExit(psi, ignoreExitCode: true);
psi = new ProcessStartInfo
{
......
......@@ -23,10 +23,6 @@ partial class PluginBase
public virtual Type? SettingsPageViewType { get; }
const string OfficialAuthor = $"{AssemblyInfo.Trademark} 官方";
const string IllegalAuthor = "存在非法字符";
const string UnknownAuthor = "未知";
/// <summary>
/// 作者名字符串中是否存在非法字符
/// </summary>
......@@ -54,12 +50,12 @@ partial class PluginBase
get
{
if (IsOfficial)
return OfficialAuthor;
return Strings.Plugin_OfficialAuthor_.Format(AssemblyInfo.Trademark);
var author = AuthorOriginalString;
if (string.IsNullOrWhiteSpace(author))
return UnknownAuthor;
return Strings.Plugin_UnknownAuthor;
if (IsIllegalAuthor(author))
return IllegalAuthor;
return Strings.Plugin_IllegalAuthor;
return author;
}
}
......@@ -103,30 +99,30 @@ partial class PluginBase
// internal bool IsDefault() => this == default || Value == default || Value.IsEmpty;
//}
/// <summary>
/// 是否为嵌入式插件,嵌入在程序安装目录中的
/// </summary>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
bool IsEmbeddedPlugin()
{
try
{
var rootPath = Path.GetFullPath(Path.Combine(AssemblyLocation,
#if DEBUG
"..", "..", "..", "..", ".."
#else
"..", ".."
#endif
));
var value = Environment.ProcessPath!.StartsWith(rootPath);
return value;
}
catch
{
}
return false;
}
// /// <summary>
// /// 是否为嵌入式插件,嵌入在程序安装目录中的
// /// </summary>
// /// <returns></returns>
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
// bool IsEmbeddedPlugin()
// {
// try
// {
// var rootPath = Path.GetFullPath(Path.Combine(AssemblyLocation,
//#if DEBUG
// "..", "..", "..", "..", ".."
//#else
// "..", "..", ".."
//#endif
// ));
// var value = Environment.ProcessPath!.StartsWith(rootPath);
// return value;
// }
// catch
// {
// }
// return false;
// }
public bool IsOfficial
{
......@@ -159,22 +155,22 @@ partial class PluginBase
var value = thisType.FullName == "BD.WTTS.Plugins.Plugin" &&
thisType.Assembly.GetName().Name?.TrimStart("BD.WTTS.Client.Plugins.") switch
{
AssemblyInfo.Accelerator => IsEmbeddedPlugin() &&
AssemblyInfo.Accelerator => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.Accelerator &&
Id.ToString() == AssemblyInfo.AcceleratorId,
AssemblyInfo.ArchiSteamFarmPlus => IsEmbeddedPlugin() &&
AssemblyInfo.ArchiSteamFarmPlus => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.ArchiSteamFarmPlus &&
Id.ToString() == AssemblyInfo.ArchiSteamFarmPlusId,
AssemblyInfo.Authenticator => IsEmbeddedPlugin() &&
AssemblyInfo.Authenticator => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.Authenticator &&
Id.ToString() == AssemblyInfo.AuthenticatorId,
AssemblyInfo.GameAccount => IsEmbeddedPlugin() &&
AssemblyInfo.GameAccount => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.GameAccount &&
Id.ToString() == AssemblyInfo.GameAccountId,
AssemblyInfo.GameList => IsEmbeddedPlugin() &&
AssemblyInfo.GameList => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.GameList &&
Id.ToString() == AssemblyInfo.GameListId,
AssemblyInfo.GameTools => IsEmbeddedPlugin() &&
AssemblyInfo.GameTools => // IsEmbeddedPlugin() &&
UniqueEnglishName == AssemblyInfo.GameTools &&
Id.ToString() == AssemblyInfo.GameToolsId,
_ => false,
......@@ -238,9 +234,9 @@ partial class PluginBase<TPlugin>
{
version = i switch
{
0 => assembly.GetCustomAttribute<AssemblyVersionAttribute>()?.Version ?? string.Empty,
1 => assembly.GetCustomAttribute<AssemblyFileVersionAttribute>()?.Version ?? string.Empty,
2 => assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? string.Empty,
2 => assembly.GetCustomAttribute<AssemblyVersionAttribute>()?.Version ?? string.Empty,
3 => assembly.GetCustomAttribute<AssemblyFileVersionAttribute>()?.Version ?? string.Empty,
1 => assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? string.Empty,
_ => null,
};
if (version == null) return string.Empty;
......
[assembly: InternalsVisibleTo("BD.WTTS.UnitTest")]
[assembly: InternalsVisibleTo("Steam++")]
[assembly: InternalsVisibleTo("Steam++.Designer")]
......@@ -4524,6 +4524,15 @@ namespace BD.WTTS.Client.Resources {
}
}
/// <summary>
/// 查找类似 存在非法字符 的本地化字符串。
/// </summary>
public static string Plugin_IllegalAuthor {
get {
return ResourceManager.GetString("Plugin_IllegalAuthor", resourceCulture);
}
}
/// <summary>
/// 查找类似 已安装插件 的本地化字符串。
/// </summary>
......@@ -4551,6 +4560,15 @@ namespace BD.WTTS.Client.Resources {
}
}
/// <summary>
/// 查找类似 {0} 官方 的本地化字符串。
/// </summary>
public static string Plugin_OfficialAuthor_ {
get {
return ResourceManager.GetString("Plugin_OfficialAuthor_", resourceCulture);
}
}
/// <summary>
/// 查找类似 仅加载官方插件 的本地化字符串。
/// </summary>
......@@ -4596,6 +4614,15 @@ namespace BD.WTTS.Client.Resources {
}
}
/// <summary>
/// 查找类似 未知 的本地化字符串。
/// </summary>
public static string Plugin_UnknownAuthor {
get {
return ResourceManager.GetString("Plugin_UnknownAuthor", resourceCulture);
}
}
/// <summary>
/// 查找类似 版本号: 的本地化字符串。
/// </summary>
......
......@@ -1718,7 +1718,7 @@
<data name="Auth_RemovePasswordProtect" xml:space="preserve">
<value>移除密码保护</value>
</data>
<data name="Auth_SteamLoginImport" xml:space="preserve">
<data name="Auth_SteamLoginImport" xml:space="preserve">
<value>Steam 登录导入</value>
</data>
<data name="Auth_UniversalImport" xml:space="preserve">
......@@ -1847,7 +1847,7 @@
<data name="Error_TokenPasswordSetFailed" xml:space="preserve">
<value>令牌密码保护设置失败。</value>
</data>
<data name="Error_UnknownLogin_" xml:space="preserve">
<data name="Error_UnknownLogin_" xml:space="preserve">
<value>登录错误:{0}</value>
</data>
<data name="Error_UpdateCloudData" xml:space="preserve">
......@@ -2084,7 +2084,7 @@
<data name="Title_PasswordConfirm" xml:space="preserve">
<value>请再次输入密码以确认</value>
</data>
<data name="Title_PleaseEnterLoginPassword" xml:space="preserve">
<data name="Title_PleaseEnterLoginPassword" xml:space="preserve">
<value>请输入该 Steam 账号登录密码</value>
</data>
<data name="Title_PleaseEnterNewAuthName" xml:space="preserve">
......@@ -2165,7 +2165,7 @@
<data name="Warning_TerminationAllAuth___" xml:space="preserve">
<value>已终止 {0} 全部令牌,已操作成功令牌数量 {1} ,操作失败令牌数量 {2}</value>
</data>
<data name="Warning_UnbindFailed" xml:space="preserve">
<data name="Warning_UnbindFailed" xml:space="preserve">
<value>解绑令牌失败:登录未成功</value>
</data>
<data name="Auth_OnlyMafileFormat" xml:space="preserve">
......@@ -2330,7 +2330,7 @@
<data name="LocalAuth_SteamAppImportTip" xml:space="preserve">
<value>新版本 SteamApp 令牌的一些导入方案参考</value>
</data>
<data name="LocalAuth_SteamAppAddSuccess" xml:space="preserve">
<data name="LocalAuth_SteamAppAddSuccess" xml:space="preserve">
<value>令牌已成功添加</value>
</data>
<data name="LocalAuth_SteamuuidTip" xml:space="preserve">
......@@ -2632,4 +2632,13 @@
<data name="OpenSourceLibrary" xml:space="preserve">
<value>开放源代码库</value>
</data>
<data name="Plugin_IllegalAuthor" xml:space="preserve">
<value>存在非法字符</value>
</data>
<data name="Plugin_OfficialAuthor_" xml:space="preserve">
<value>{0} 官方</value>
</data>
<data name="Plugin_UnknownAuthor" xml:space="preserve">
<value>未知</value>
</data>
</root>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册