feature<FolderDailog>: use Ookii.Dialog.Wpf instead of Views.Controls.FolderDailog

This commit is contained in:
leo 2021-06-29 10:19:38 +08:00
parent 8c8109dc60
commit 598f940cf3
11 changed files with 15 additions and 148 deletions

View file

@ -1,3 +1,4 @@
using Ookii.Dialogs.Wpf;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
@ -348,7 +349,7 @@ namespace SourceGit.Views.Widgets {
var saveToPatch = new MenuItem();
saveToPatch.Header = App.Text("CommitCM.SaveAsPatch");
saveToPatch.Click += (o, e) => {
var dialog = new Controls.FolderDialog("SaveFileTo");
var dialog = new VistaFolderBrowserDialog();
if (dialog.ShowDialog() == true) {
new Commands.FormatPatch(repo.Path, commit.SHA, dialog.SelectedPath).Exec();
}

View file

@ -1,3 +1,4 @@
using Ookii.Dialogs.Wpf;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -295,7 +296,7 @@ namespace SourceGit.Views.Widgets {
saveAs.Header = App.Text("SaveAs");
saveAs.IsEnabled = node.Type == Models.ObjectType.Blob;
saveAs.Click += (obj, ev) => {
var dialog = new Controls.FolderDialog("SaveFileTo");
var dialog = new VistaFolderBrowserDialog();
if (dialog.ShowDialog() == true) {
var full = Path.Combine(dialog.SelectedPath, Path.GetFileName(node.Path));
new Commands.SaveRevisionFile(repo, node.Path, sha, full).Exec();

View file

@ -1,3 +1,4 @@
using Ookii.Dialogs.Wpf;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@ -47,7 +48,7 @@ namespace SourceGit.Views.Widgets {
#region FUNC_EVENTS
private void OnOpenClicked(object sender, RoutedEventArgs e) {
var dialog = new Controls.FolderDialog("Welcome.OpenOrInitDialog");
var dialog = new VistaFolderBrowserDialog();
if (dialog.ShowDialog() == true) CheckAndOpen(dialog.SelectedPath);
}