mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feature(Submodule): add button to do submodule update
This commit is contained in:
parent
1896ae1daf
commit
0e9b1574a8
5 changed files with 62 additions and 7 deletions
35
SourceGit/UI/Waiting.xaml.cs
Normal file
35
SourceGit/UI/Waiting.xaml.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SourceGit.UI {
|
||||
|
||||
/// <summary>
|
||||
/// General waiting dialog.
|
||||
/// </summary>
|
||||
public partial class Waiting : UserControl {
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public Waiting() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show this dialog.
|
||||
/// </summary>
|
||||
/// <param name="job"></param>
|
||||
public static void Show(Action job) {
|
||||
var dialog = new Waiting();
|
||||
PopupManager.Show(dialog);
|
||||
PopupManager.Lock();
|
||||
Task.Run(() => {
|
||||
job.Invoke();
|
||||
dialog.Dispatcher.Invoke(() => {
|
||||
PopupManager.Close(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue