Add Run multiple commands at one time

This commit is contained in:
2023-09-20 12:56:38 +08:00
parent 78be273c7a
commit 41c644f2af
3 changed files with 30 additions and 3 deletions

View File

@@ -44,11 +44,28 @@ namespace GrasscutterTools.OpenCommand
public bool CanInvoke { get; private set; }
private Version version = new Version(1, 6, 1);
public Version Version
{
get => version;
private set
{
version = value;
CanInvokeMultipleCmd = version >= new Version(1, 7);
}
}
public bool CanInvokeMultipleCmd { get; private set; }
public async Task<bool> Ping()
{
//try
//{
var response = await DoRequest("ping");
if (response.Data is string str && Version.TryParse(str, out var version))
Version = version;
return response.RetCode == 200;
//}
//catch (Exception)