2024-04-06 00:01:07 -07:00
|
|
|
|
using System.Diagnostics;
|
2024-04-05 22:14:22 -07:00
|
|
|
|
|
|
|
|
|
namespace SourceGit.Models
|
|
|
|
|
{
|
|
|
|
|
public class ExternalEditor
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
2024-04-06 00:01:07 -07:00
|
|
|
|
public string Icon { get; set; } = string.Empty;
|
2024-04-05 22:14:22 -07:00
|
|
|
|
public string Executable { get; set; } = string.Empty;
|
|
|
|
|
public string OpenCmdArgs { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public void Open(string repo)
|
|
|
|
|
{
|
|
|
|
|
Process.Start(new ProcessStartInfo()
|
|
|
|
|
{
|
|
|
|
|
WorkingDirectory = repo,
|
|
|
|
|
FileName = Executable,
|
|
|
|
|
Arguments = string.Format(OpenCmdArgs, repo),
|
|
|
|
|
UseShellExecute = false,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|