2 using System
.Collections
.Generic
;
3 using System
.ComponentModel
;
7 using System
.Windows
.Forms
;
11 public partial class PreferencesEditor
: Form
13 internal Prefs m_prefs
;
15 internal PreferencesEditor(Prefs p
)
18 InitializeComponent();
19 m_gitPath
.Text
= m_prefs
.GitDir
;
22 protected string ChooseDir()
24 DialogResult r
= m_folderChooser
.ShowDialog();
25 if (r
== DialogResult
.OK
)
27 return m_folderChooser
.SelectedPath
;
32 private void OnChooseMinGWPath(object sender
, EventArgs e
)
34 string dir
= ChooseDir();
35 if (!String
.IsNullOrEmpty(dir
))
41 private void OnSave(object sender
, EventArgs e
)
43 string dir
= m_gitPath
.Text
;
44 if (!System
.IO
.File
.Exists(dir
+ System
.IO
.Path
.DirectorySeparatorChar
+ "git-init-db") &&
45 !System
.IO
.File
.Exists(dir
+ System
.IO
.Path
.DirectorySeparatorChar
+ "git-init-db.exe"))
47 MessageBox
.Show("The location does not appear to have git executables in it.", "Error", MessageBoxButtons
.OK
, MessageBoxIcon
.Error
);