mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
optimize<FoldDialog, NewPage>: 修改欢迎页的打开本地仓库的弹出窗口为模态窗口
This commit is contained in:
parent
3c624009f6
commit
23d3038c92
2 changed files with 22 additions and 1 deletions
|
@ -121,8 +121,29 @@ namespace SourceGit.UI {
|
|||
/// <param name="onOK"></param>
|
||||
public static void Open(string title, Action<string> onOK) {
|
||||
new FolderDailog(title, onOK).Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modeless.
|
||||
/// </summary>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="onOK"></param>
|
||||
public static void Show(string title, Action<string> onOK)
|
||||
{
|
||||
new FolderDailog(title, onOK).Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modal.
|
||||
/// </summary>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="onOK"></param>
|
||||
public static void ShowDialog(string title, Action<string> onOK)
|
||||
{
|
||||
new FolderDailog(title, onOK).ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
#region EVENTS
|
||||
private void OnSure(object sender, RoutedEventArgs e) {
|
||||
if (selected != null) cb?.Invoke(selected.Path);
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OpenOrAddRepo(object sender, RoutedEventArgs e) {
|
||||
FolderDailog.Open(App.Text("NewPage.OpenOrInitDialog"), path => {
|
||||
FolderDailog.ShowDialog(App.Text("NewPage.OpenOrInitDialog"), path => {
|
||||
CheckAndOpenRepo(path);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue