mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
style<Window>: show progress bar in taskbar while popup is running
This commit is contained in:
parent
951a38d445
commit
905531f2db
4 changed files with 19 additions and 1 deletions
|
@ -10,6 +10,7 @@ using System.Windows.Controls.Primitives;
|
|||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shell;
|
||||
|
||||
namespace SourceGit.Views.Widgets {
|
||||
|
||||
|
@ -154,14 +155,18 @@ namespace SourceGit.Views.Widgets {
|
|||
isPopupLocked = true;
|
||||
popupProgressMask.Visibility = Visibility.Visible;
|
||||
processing.IsAnimating = true;
|
||||
App.Current.MainWindow.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate;
|
||||
|
||||
var task = curPopup.Start();
|
||||
if (task != null) {
|
||||
var close = await task;
|
||||
App.Current.MainWindow.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None;
|
||||
if (close) {
|
||||
ClosePopups(true);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
App.Current.MainWindow.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None;
|
||||
}
|
||||
|
||||
isPopupLocked = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue