mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
25 lines
670 B
C#
25 lines
670 B
C#
|
using System;
|
|||
|
using System.Diagnostics;
|
|||
|
|
|||
|
namespace SourceGit.Models
|
|||
|
{
|
|||
|
public class ExternalEditor
|
|||
|
{
|
|||
|
public string Name { get; set; } = string.Empty;
|
|||
|
public Uri Icon { get; set; } = null;
|
|||
|
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,
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
}
|