Merge pull request #1380 from BarryThePenguin/master
setup fetcher: Show download speed on windows #1361
This commit is contained in:
commit
1cc3698f05
|
@ -454,21 +454,32 @@ namespace SparkleShare {
|
|||
Value = Controller.ProgressBarPercentage
|
||||
};
|
||||
|
||||
TextBlock progress_label = new TextBlock () {
|
||||
Width = 414,
|
||||
Text = "Starting...",
|
||||
TextAlignment = TextAlignment.Right
|
||||
};
|
||||
|
||||
ContentCanvas.Children.Add (progress_bar);
|
||||
ContentCanvas.Children.Add (progress_label);
|
||||
|
||||
Canvas.SetLeft (progress_bar, 185);
|
||||
Canvas.SetTop (progress_bar, 150);
|
||||
|
||||
Canvas.SetLeft (progress_label, 185);
|
||||
Canvas.SetTop (progress_label, 165);
|
||||
|
||||
TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Normal;
|
||||
|
||||
Buttons.Add (cancel_button);
|
||||
Buttons.Add(finish_button);
|
||||
|
||||
|
||||
Controller.UpdateProgressBarEvent += delegate (double percentage) {
|
||||
Controller.UpdateProgressBarEvent += delegate (double percentage, string speed) {
|
||||
Dispatcher.BeginInvoke ((Action) delegate {
|
||||
progress_bar.Value = percentage;
|
||||
TaskbarItemInfo.ProgressValue = percentage / 100;
|
||||
progress_label.Text = speed;
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue