private void DiffToolCmdSuggest_Click(object sender, EventArgs e)
{
if (!Settings.RunningOnWindows())
return;
GitCommands.GitCommands gitCommands = new GitCommands.GitCommands();
if (GlobalDiffTool.Text.Equals("kdiff3", StringComparison.CurrentCultureIgnoreCase))
{
string kdiff3path = gitCommands.GetGlobalSetting("difftool.kdiff3.path");
string regkdiff3path = GetRegistryValue(Registry.LocalMachine, "SOFTWARE\\KDiff3", "") + "\\kdiff3.exe";
DifftoolPath.Text = FindFileInFolders("kdiff3.exe", kdiff3path,
@"c:\Program Files\KDiff3\",
@"c:\Program Files (x86)\KDiff3\",
regkdiff3path);
}
if (GlobalDiffTool.Text.Equals("winmerge", StringComparison.CurrentCultureIgnoreCase))
{
string winmergepath = gitCommands.GetGlobalSetting("difftool.winmerge.path");
DifftoolPath.Text = FindFileInFolders("winmergeu.exe", winmergepath,
@"c:\Program Files\winmerge\",
@"c:\Program Files (x86)\winmerge\");
}
if (File.Exists(DifftoolPath.Text))
DifftoolCmd.Text = "\"" + DifftoolPath.Text + "\" \"$LOCAL\" \"$REMOTE\"";
}