Commits

Craig Phillips  committed 208b863

Fixed up the small issue with the progress bars not correctly resetting to 0 between hash runs. Also simplified a LINQ statement that gets the hash algorithm from the hashAlgorithms collection.

  • Participants
  • Parent commits 20748ca

Comments (0)

Files changed (1)

File HashIt/MainForm.cs

                 {
                     if (hashUC.HashSelected == true)
                     {
-                        var algo = hashAlgorithms.Where(a => a.GetType().Name == hashUC.HashName).Single();
+                        var algo = hashAlgorithms.Single(a => a.GetType().Name == hashUC.HashName);
                         var hashlib = new HashLib(algo);
                         hashlib.PropertyChanged += new PropertyChangedEventHandler(hashlib_PropertyChanged);
                         hashLibs.Add(hashlib);
                         {
                             hashlib.ComputeHash(txtTextToHash.Text, HashLib.HashInput.Text);
                         }
+                        hashUC.Progress = 0;
                         hashUC.ShowProgressBar = true;
                     }
                 }