Add Cutscene command to Scene page

This commit is contained in:
2023-06-08 21:19:26 +08:00
parent 6da7e1d4d0
commit 1ccb3656c2
12 changed files with 411 additions and 56 deletions

View File

@@ -147,8 +147,17 @@ namespace GrasscutterTools.Pages
return;
}
Common.OC = new OpenCommandAPI(TxtHost.Text);
if (await Common.OC.Ping())
var isOcEnabled = false;
try
{
Common.OC = new OpenCommandAPI(TxtHost.Text);
isOcEnabled = await Common.OC.Ping();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
if (isOcEnabled)
{
LblOpenCommandSupport.Text = "√";
LblOpenCommandSupport.ForeColor = Color.Green;