Skip to content

Commit

Permalink
Adjusted the way progress works to show how many images have been sor…
Browse files Browse the repository at this point in the history
…ted, instead of which one is being sorted.
  • Loading branch information
Luca Auer authored and Luca Auer committed May 24, 2018
1 parent ba909fe commit 5726e5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Image sort.Logic/ImageSelectorQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public void AppendNewLocation(string newPath)
/// <returns>(currentImage, maxImages)</returns>
public (int, int) GetCurrentProgress()
{
return (currentIndex, imagePathPool.Count);
return (currentIndex-1, imagePathPool.Count);
}
#endregion
}
Expand Down
7 changes: 6 additions & 1 deletion Image sort.UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
}
Expand All @@ -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;
Expand Down

0 comments on commit 5726e5d

Please sign in to comment.