Skip to content

Commit

Permalink
Progress counting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
egorovav committed Nov 5, 2017
1 parent f36c35a commit 3a268eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion StiToGif_v3.0/ViewModel/GifToStiViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void Convert(string[] aFileNames)
Task.Factory.StartNew((ViewModel) =>
{
var _vm = (GifToStiViewModel)ViewModel;
while (!_vm.IsConvertationStoped)// && _vm.FCurrentIndex < _vm.FFileNames.Length)
while (!_vm.IsConvertationStoped && _vm.FCurrentIndex < _vm.FFileNames.Length)
{
string _fileName = null;
lock (_vm.FCurrentIndexKey)
Expand Down
2 changes: 1 addition & 1 deletion StiToGif_v3.0/ViewModel/StiToGifViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public int ForeshotingNumber
public static string ProgressPropertyName = "Progress";
public int Progress
{
get { return (this.FCurrentIndex + 1) * 100 / this.FFileNames.Length; }
get { return this.FCurrentIndex * 100 / this.FFileNames.Length; }
}

private bool IsConvertationStoped
Expand Down

0 comments on commit 3a268eb

Please sign in to comment.