mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
feat: Improved the way help information is displayed.
This commit is contained in:
parent
18d9c2d32c
commit
0e5e48cd00
@ -1,13 +1,23 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using McMaster.Extensions.CommandLineUtils;
|
||||
|
||||
namespace ZonyLrcTools.Cli.Commands
|
||||
{
|
||||
[HelpOption("--help|-h", Description = "欢迎使用 ZonyLrcToolsX Command Line Interface,有任何问题请访问 https://soft.myzony.com 或添加 QQ 群 337656932 寻求帮助。")]
|
||||
[HelpOption("--help|-h",
|
||||
Description = "欢迎使用 ZonyLrcToolsX Command Line Interface,有任何问题请访问 https://soft.myzony.com 或添加 QQ 群 337656932 寻求帮助。",
|
||||
ShowInHelpText = true)]
|
||||
public abstract class ToolCommandBase
|
||||
{
|
||||
protected virtual Task<int> OnExecuteAsync(CommandLineApplication app)
|
||||
{
|
||||
if (Environment.UserInteractive)
|
||||
{
|
||||
Console.WriteLine("请使用终端运行此程序,如果你不知道如何操作,请访问 https://soft.myzony.com 或添加 QQ 群 337656932 寻求帮助。");
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
app.ShowHelp();
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user