new menu items and bindings to open mpv.conf and input.conf with a text editor

This commit is contained in:
stax76
2023-12-14 13:48:23 +01:00
parent 9d4779fd96
commit cd54e67b87
12 changed files with 306 additions and 173 deletions

View File

@@ -1,14 +1,22 @@
namespace MpvNet.Help;

namespace MpvNet.Help;
public static class ProcessHelp
{
public static void Execute(string file, string arguments = "", bool shellExecute = false)
{
using Process proc = new Process();
proc.StartInfo.FileName = file;
proc.StartInfo.Arguments = arguments;
proc.StartInfo.UseShellExecute = shellExecute;
proc.Start();
try
{
using Process proc = new Process();
proc.StartInfo.FileName = file;
proc.StartInfo.Arguments = arguments;
proc.StartInfo.UseShellExecute = shellExecute;
proc.Start();
}
catch (Exception ex)
{
Terminal.WriteError(ex.ToString());
}
}
public static void ShellExecute(string file, string arguments = "") => Execute(file, arguments, true);