mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-05 19:15:00 +00:00
feature<FolderDialog>: add FolderDialog to remove dependency on System.Windows.Forms
This commit is contained in:
parent
6bf06c87f1
commit
e42290eef1
14 changed files with 336 additions and 121 deletions
|
@ -116,15 +116,11 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SelectDefaultClonePath(object sender, RoutedEventArgs e) {
|
||||
var dialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
dialog.Description = "Select Folder To Clone Repository Into As Default";
|
||||
dialog.RootFolder = Environment.SpecialFolder.MyComputer;
|
||||
dialog.ShowNewFolderButton = true;
|
||||
|
||||
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
txtGitCloneDir.Text = dialog.SelectedPath;
|
||||
App.Preference.GitDefaultCloneDir = dialog.SelectedPath;
|
||||
}
|
||||
var dialog = new FolderDailog("Select Folder To Clone Repository Into As Default", null);
|
||||
dialog.Open(path => {
|
||||
txtGitCloneDir.Text = path;
|
||||
App.Preference.GitDefaultCloneDir = path;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue