为运行指令提供双容错

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

View File

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