mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
optimize<*>: FolderDailog 重名为 FolderDialog
This commit is contained in:
parent
23d3038c92
commit
b6a89334be
7 changed files with 17 additions and 17 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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"
|
|
@ -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,17 +120,17 @@ 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>
|
||||
/// modeless.
|
||||
/// </summary>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="onOK"></param>
|
||||
public static void Show(string title, Action<string> onOK)
|
||||
public static void Show(string title, Action<string> onOK)
|
||||
{
|
||||
new FolderDailog(title, onOK).Show();
|
||||
new FolderDialog(title, onOK).Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -138,9 +138,9 @@ namespace SourceGit.UI {
|
|||
/// </summary>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="onOK"></param>
|
||||
public static void ShowDialog(string title, Action<string> onOK)
|
||||
public static void ShowDialog(string title, Action<string> onOK)
|
||||
{
|
||||
new FolderDailog(title, onOK).ShowDialog();
|
||||
new FolderDialog(title, onOK).ShowDialog();
|
||||
}
|
||||
|
||||
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue