mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45: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
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
@ -46,14 +45,8 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SelectParentFolder(object sender, RoutedEventArgs e) {
|
||||
var dialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
dialog.Description = "Git Repository URL";
|
||||
dialog.RootFolder = Environment.SpecialFolder.MyComputer;
|
||||
dialog.ShowNewFolderButton = true;
|
||||
|
||||
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
txtParentFolder.Text = dialog.SelectedPath;
|
||||
}
|
||||
var dialog = new FolderDailog("Select folder to store repository", null);
|
||||
dialog.Open(path => txtParentFolder.Text = path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue