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 private void button1_Click(object sender
, EventArgs e
)
24 DialogResult r
= m_folderChooser
.ShowDialog();
25 if (r
== DialogResult
.OK
)
27 if (!System
.IO
.File
.Exists(m_folderChooser
.SelectedPath
+ System
.IO
.Path
.DirectorySeparatorChar
+ "git-init-db") &&
28 !System
.IO
.File
.Exists(m_folderChooser
.SelectedPath
+ System
.IO
.Path
.DirectorySeparatorChar
+ "git-init-db.exe"))
30 MessageBox
.Show("The location does not appear to have git executables in it.", "Error", MessageBoxButtons
.OK
, MessageBoxIcon
.Error
);
34 m_prefs
.GitDir
= m_folderChooser
.SelectedPath
;
35 m_gitPath
.Text
= m_prefs
.GitDir
;