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