diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index 6fb61ad..7e628e4 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -323,7 +323,11 @@ namespace VPet_Simulator.Windows } catch { - Process.Start("explorer.exe", url); + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = "explorer.exe"; + startInfo.UseShellExecute = false; + startInfo.Arguments = url; + Process.Start(startInfo); } } diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index a83ea6d..524b179 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -318,17 +318,37 @@ namespace VPet_Simulator.Windows petHelper.Show(); } - public static void RunDIY(string content) + public void RunDIY(string content) { - if (content.Contains("://") || content.Contains(@":\")) + if (content.Contains(@":\")) { try { - Process.Start(content); + if (!Set["v"][(gbol)"rundiy"]) + { + MessageBoxX.Show("由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高".Translate(), + "关于CPU/内存占用显示较高的一次性提示".Translate()); + Set["v"][(gbol)"rundiy"] = true; + } + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = content; + startInfo.UseShellExecute = false; + Process.Start(startInfo); } catch (Exception e) { - MessageBox.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + } + } + else if (content.Contains("://")) + { + try + { + ExtensionSetting.StartURL(content); + } + catch (Exception e) + { + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); } } else @@ -339,7 +359,7 @@ namespace VPet_Simulator.Windows } catch (Exception e) { - MessageBox.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); } } } diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps new file mode 100644 index 0000000..5e9164a --- /dev/null +++ b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps @@ -0,0 +1,2 @@ +由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#Due to the design of the operating system, programs launched by our software may be categorized as sub-processes of our software in the task manager, which may result in higher displayed CPU/memory usage.:| +关于CPU/内存占用显示较高的一次性提示#One-time Notice Regarding Higher Displayed CPU/Memory Usage:| diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps new file mode 100644 index 0000000..6b00360 --- /dev/null +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps @@ -0,0 +1,2 @@ +由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高:| +关于CPU/内存占用显示较高的一次性提示#关于CPU/内存占用显示较高的一次性提示:| diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps new file mode 100644 index 0000000..2bf09c4 --- /dev/null +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps @@ -0,0 +1,2 @@ +由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#由於操作系統的設計,透過我們軟體啟動的程序可能會在任務管理器中歸類為我們軟體的子進程,這可能導致CPU/內存占用顯示較高:| +关于CPU/内存占用显示较高的一次性提示#關於CPU/內存占用顯示較高的一次性提示:|