mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
add console banner
This commit is contained in:
@@ -20,7 +20,24 @@ namespace Snap.Hutao;
|
||||
[SuppressMessage("", "SH001")]
|
||||
public sealed partial class App : Application
|
||||
{
|
||||
private const string ConsoleBanner = """
|
||||
----------------------------------------------------------------
|
||||
_____ _ _ _
|
||||
/ ____| | | | | | |
|
||||
| (___ _ __ __ _ _ __ | |__| | _ _ | |_ __ _ ___
|
||||
\___ \ | '_ \ / _` || '_ \ | __ || | | || __|/ _` | / _ \
|
||||
____) || | | || (_| || |_) |_ | | | || |_| || |_| (_| || (_) |
|
||||
|_____/ |_| |_| \__,_|| .__/(_)|_| |_| \__,_| \__|\__,_| \___/
|
||||
| |
|
||||
|_|
|
||||
|
||||
Snap.Hutao is a open source software developed by DGP Studio.
|
||||
Copyright (C) 2022 - 2024 DGP Studio, All Rights Reserved.
|
||||
----------------------------------------------------------------
|
||||
""";
|
||||
|
||||
private const string AppInstanceKey = "main";
|
||||
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
private readonly IActivation activation;
|
||||
private readonly ILogger<App> logger;
|
||||
@@ -51,6 +68,8 @@ public sealed partial class App : Application
|
||||
|
||||
if (firstInstance.IsCurrent)
|
||||
{
|
||||
logger.LogInformation(ConsoleBanner);
|
||||
|
||||
// manually invoke
|
||||
activation.NonRedirectToActivate(firstInstance, activatedEventArgs);
|
||||
activation.InitializeWith(firstInstance);
|
||||
|
||||
@@ -40,7 +40,9 @@ internal static class RegistryInterop
|
||||
|
||||
string base64 = Convert.ToBase64String(target);
|
||||
string path = $"HKCU:{GenshinPath}";
|
||||
string command = $"-Command \"$value = [Convert]::FromBase64String('{base64}'); Set-ItemProperty -Path '{path}' -Name '{SdkChineseKey}' -Value $value -Force;\"";
|
||||
string command = $"""
|
||||
-Command "$value = [Convert]::FromBase64String('{base64}'); Set-ItemProperty -Path '{path}' -Name '{SdkChineseKey}' -Value $value -Force;"
|
||||
""";
|
||||
|
||||
ProcessStartInfo startInfo = new()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,11 @@ namespace Snap.Hutao.Web.Response;
|
||||
[HighQuality]
|
||||
internal enum KnownReturnCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户不存在
|
||||
/// </summary>
|
||||
UserNotExist = -20001,
|
||||
|
||||
/// <summary>
|
||||
/// 无效请求
|
||||
/// 因战绩功能服务优化升级,V2.10及以下版本将无法正常使用战绩功能,请更新米游社至最新版本再进行使用。
|
||||
|
||||
Reference in New Issue
Block a user