From 60db736c16253a587cfb70f2a30be104f990512b Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Wed, 24 Mar 2021 23:09:21 +0800 Subject: [PATCH] fix --- src/ST.Client.Desktop/CommandLineTools.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ST.Client.Desktop/CommandLineTools.cs b/src/ST.Client.Desktop/CommandLineTools.cs index 643e0ceee..3b6effc75 100644 --- a/src/ST.Client.Desktop/CommandLineTools.cs +++ b/src/ST.Client.Desktop/CommandLineTools.cs @@ -27,9 +27,9 @@ namespace System.Application // -clt debug -args 730 var debug = new Command("debug", "调试"); debug.AddOption(new Option("-args", () => "", "测试参数")); - debug.Handler = CommandHandler.Create((string appid) => + debug.Handler = CommandHandler.Create((string args) => // 参数名与类型要与 Option 中一致! { - //Console.WriteLine("-clt debug -args " + appid); + //Console.WriteLine("-clt debug -args " + args); // OutputType WinExe 导致控制台输入不会显示,只能附加一个新的控制台窗口显示内容,不合适 // 如果能取消 管理员权限要求,改为运行时管理员权限, // 则可尝试通过 Windows Terminal 或直接 Host 进行命令行模式 @@ -46,6 +46,7 @@ namespace System.Application unlock_achievement.AddOption(new Option("-appid", "指定一个Steam游戏Id")); unlock_achievement.Handler = CommandHandler.Create((int appid) => { + if (appid <= 0) return; initStartup(DILevel.Min); IWindowService.Instance.InitUnlockAchievement(appid); initUIApp(initWindowS: false);