optimize<*>: FolderDailog 重名为 FolderDialog

This commit is contained in:
ZCShou 2021-02-03 16:31:33 +08:00
parent 23d3038c92
commit b6a89334be
7 changed files with 17 additions and 17 deletions

View file

@ -54,7 +54,7 @@ namespace SourceGit.UI {
/// <param name="sender"></param>
/// <param name="e"></param>
private void SelectParentFolder(object sender, RoutedEventArgs e) {
FolderDailog.Open(App.Text("Clone.RemoteFolder.Placeholder"), path => {
FolderDialog.Open(App.Text("Clone.RemoteFolder.Placeholder"), path => {
txtParentFolder.Text = path;
});
}

View file

@ -336,7 +336,7 @@ namespace SourceGit.UI {
MenuItem saveAs = new MenuItem();
saveAs.Header = App.Text("SaveAs");
saveAs.Click += (obj, ev) => {
FolderDailog.Open(App.Text("SaveFileTo"), saveTo => {
FolderDialog.Open(App.Text("SaveFileTo"), saveTo => {
var savePath = Path.Combine(saveTo, Path.GetFileName(path));
commit.SaveFileTo(repo, path, savePath);
});
@ -657,7 +657,7 @@ namespace SourceGit.UI {
saveAs.Header = App.Text("SaveAs");
saveAs.IsEnabled = node.CommitObject == null || node.CommitObject.Kind == Git.Commit.Object.Type.Blob;
saveAs.Click += (obj, ev) => {
FolderDailog.Open(App.Text("SaveFileTo"), saveTo => {
FolderDialog.Open(App.Text("SaveFileTo"), saveTo => {
var path = Path.Combine(saveTo, node.Name);
commit.SaveFileTo(repo, node.FilePath, path);
});

View file

@ -1,4 +1,4 @@
<Window x:Class="SourceGit.UI.FolderDailog"
<Window x:Class="SourceGit.UI.FolderDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

View file

@ -9,9 +9,9 @@ using System.Windows.Input;
namespace SourceGit.UI {
/// <summary>
/// Interaction logic for FolderDailog.xaml
/// Interaction logic for FolderDialog.xaml
/// </summary>
public partial class FolderDailog : Window {
public partial class FolderDialog : Window {
private Action<string> cb = null;
private Node root = new Node("", "");
private Node selected = null;
@ -93,7 +93,7 @@ namespace SourceGit.UI {
/// </summary>
/// <param name="title"></param>
/// <param name="cb"></param>
public FolderDailog(string title, Action<string> onOK) {
public FolderDialog(string title, Action<string> onOK) {
InitializeComponent();
// Move to center.
@ -120,7 +120,7 @@ namespace SourceGit.UI {
/// <param name="title"></param>
/// <param name="onOK"></param>
public static void Open(string title, Action<string> onOK) {
new FolderDailog(title, onOK).Show();
new FolderDialog(title, onOK).Show();
}
/// <summary>
@ -130,7 +130,7 @@ namespace SourceGit.UI {
/// <param name="onOK"></param>
public static void Show(string title, Action<string> onOK)
{
new FolderDailog(title, onOK).Show();
new FolderDialog(title, onOK).Show();
}
/// <summary>
@ -140,7 +140,7 @@ namespace SourceGit.UI {
/// <param name="onOK"></param>
public static void ShowDialog(string title, Action<string> onOK)
{
new FolderDailog(title, onOK).ShowDialog();
new FolderDialog(title, onOK).ShowDialog();
}

View file

@ -515,7 +515,7 @@ namespace SourceGit.UI {
var patch = new MenuItem();
patch.Header = App.Text("CommitCM.SaveAsPatch");
patch.Click += (o, e) => {
FolderDailog.Open("Save patch to ...", saveTo => {
FolderDialog.Open("Save patch to ...", saveTo => {
Repo.RunCommand($"format-patch {commit.SHA} -1 -o \"{saveTo}\"", null);
});
};

View file

@ -42,7 +42,7 @@ namespace SourceGit.UI {
/// <param name="sender"></param>
/// <param name="e"></param>
private void OpenOrAddRepo(object sender, RoutedEventArgs e) {
FolderDailog.ShowDialog(App.Text("NewPage.OpenOrInitDialog"), path => {
FolderDialog.ShowDialog(App.Text("NewPage.OpenOrInitDialog"), path => {
CheckAndOpenRepo(path);
});
}

View file

@ -151,7 +151,7 @@ namespace SourceGit.UI {
/// <param name="sender"></param>
/// <param name="e"></param>
private void SelectDefaultClonePath(object sender, RoutedEventArgs e) {
FolderDailog.Open(App.Text("Preference.Dialog.GitDir"), path => {
FolderDialog.Open(App.Text("Preference.Dialog.GitDir"), path => {
txtGitCloneDir.Text = path;
App.Setting.Tools.GitDefaultCloneDir = path;
});