From 5726e5d51faa60da664310d6d5a4fad1f8b8826d Mon Sep 17 00:00:00 2001 From: Luca Auer Date: Fri, 25 May 2018 00:40:24 +0200 Subject: [PATCH] Adjusted the way progress works to show how many images have been sorted, instead of which one is being sorted. --- Image sort.Logic/ImageSelectorQuery.cs | 2 +- Image sort.UI/MainWindow.xaml.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Image sort.Logic/ImageSelectorQuery.cs b/Image sort.Logic/ImageSelectorQuery.cs index f4b5aebd..1af38d37 100644 --- a/Image sort.Logic/ImageSelectorQuery.cs +++ b/Image sort.Logic/ImageSelectorQuery.cs @@ -429,7 +429,7 @@ public void AppendNewLocation(string newPath) /// (currentImage, maxImages) public (int, int) GetCurrentProgress() { - return (currentIndex, imagePathPool.Count); + return (currentIndex-1, imagePathPool.Count); } #endregion } diff --git a/Image sort.UI/MainWindow.xaml.cs b/Image sort.UI/MainWindow.xaml.cs index e3727e45..cf048a07 100644 --- a/Image sort.UI/MainWindow.xaml.cs +++ b/Image sort.UI/MainWindow.xaml.cs @@ -486,6 +486,7 @@ private void LoadImage(BitmapImage image) OpenInExplorerLink.NavigateUri = new Uri(pathToImage); OpenInExplorerLinkHost.Visibility = Visibility.Visible; + // Show Progress (int current, int max) = folderSelector.GetCurrentProgress(); ProgressIndicatorText.Text = $"Progress: {current}/{max}"; } @@ -495,7 +496,11 @@ private void LoadImage(BitmapImage image) FileNameInfo.Text = ""; FileTypeInfo.Text = ""; FileSizeInfo.Text = ""; - ProgressIndicatorText.Text = ""; + + // Show progress + (int current, int max) = folderSelector.GetCurrentProgress(); + ProgressIndicatorText.Text = $"Progress: {current}/{max}"; + OpenInExplorerLink.NavigateUri = null; // Collapse link again to prevent accidental clicking. OpenInExplorerLinkHost.Visibility = Visibility.Collapsed;