为运行指令提供双容错

This commit is contained in:
ZouJin 2024-02-22 22:05:59 +08:00
parent 47857aab8f
commit 906d32a14e

View File

@ -335,11 +335,18 @@ namespace VPet_Simulator.Windows
startInfo.UseShellExecute = false;
Process.Start(startInfo);
}
catch
{
try
{
Process.Start(content);
}
catch (Exception e)
{
MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message);
}
}
}
else if (content.Contains("://"))
{
try