mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12: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
|
@ -586,12 +586,10 @@ namespace SourceGit.UI {
|
|||
var patch = new MenuItem();
|
||||
patch.Header = "Save As Patch";
|
||||
patch.Click += (o, e) => {
|
||||
var dialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
dialog.ShowNewFolderButton = true;
|
||||
|
||||
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
Repo.RunCommand($"format-patch {commit.SHA} -1 -o \"{dialog.SelectedPath}\"", null);
|
||||
}
|
||||
var dialog = new FolderDailog("Save To ...", null);
|
||||
dialog.Open(saveTo => {
|
||||
Repo.RunCommand($"format-patch {commit.SHA} -1 -o \"{saveTo}\"", null);
|
||||
});
|
||||
};
|
||||
menu.Items.Add(patch);
|
||||
menu.Items.Add(new Separator());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue