mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 08:34:59 +00:00
optimize<FolderDialog>: remove dependency of Ookii.Dialogs.Wpf
This commit is contained in:
parent
a7ddc50665
commit
4a56b47265
11 changed files with 132 additions and 15 deletions
|
@ -1,4 +1,3 @@
|
|||
using Ookii.Dialogs.Wpf;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -349,7 +348,7 @@ namespace SourceGit.Views.Widgets {
|
|||
var saveToPatch = new MenuItem();
|
||||
saveToPatch.Header = App.Text("CommitCM.SaveAsPatch");
|
||||
saveToPatch.Click += (o, e) => {
|
||||
var dialog = new VistaFolderBrowserDialog();
|
||||
var dialog = new Controls.FolderDialog();
|
||||
if (dialog.ShowDialog() == true) {
|
||||
new Commands.FormatPatch(repo.Path, commit.SHA, dialog.SelectedPath).Exec();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using Ookii.Dialogs.Wpf;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -296,7 +295,7 @@ namespace SourceGit.Views.Widgets {
|
|||
saveAs.Header = App.Text("SaveAs");
|
||||
saveAs.IsEnabled = node.Type == Models.ObjectType.Blob;
|
||||
saveAs.Click += (obj, ev) => {
|
||||
var dialog = new VistaFolderBrowserDialog();
|
||||
var dialog = new Controls.FolderDialog();
|
||||
if (dialog.ShowDialog() == true) {
|
||||
var full = Path.Combine(dialog.SelectedPath, Path.GetFileName(node.Path));
|
||||
new Commands.SaveRevisionFile(repo, node.Path, sha, full).Exec();
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using Ookii.Dialogs.Wpf;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
@ -48,7 +47,7 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
#region FUNC_EVENTS
|
||||
private void OnOpenClicked(object sender, RoutedEventArgs e) {
|
||||
var dialog = new VistaFolderBrowserDialog();
|
||||
var dialog = new Controls.FolderDialog();
|
||||
if (dialog.ShowDialog() == true) CheckAndOpen(dialog.SelectedPath);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue