Beispiel #1
0
 public static void SetIterations(NumericUpDown nudArgon2Iterations)
 {
     try
     {
         NullChecks.NumericUpDowns(nudArgon2Iterations);
         nudArgon2Iterations.Value = Globals.Iterations;
     }
     catch (ArgumentOutOfRangeException ex)
     {
         DisplayMessage.ErrorMessageBox(ex.GetType().Name, "Invalid 'Iterations' setting. The default setting will be used instead.");
         Globals.Iterations = Constants.DefaultIterations;
         Settings.SaveSettings();
         SetIterations(nudArgon2Iterations);
     }
 }
Beispiel #2
0
 public static void SetMemorySize(NumericUpDown nudArgon2MemorySize)
 {
     try
     {
         NullChecks.NumericUpDowns(nudArgon2MemorySize);
         nudArgon2MemorySize.Value = Globals.MemorySize / Constants.Mebibyte;
     }
     catch (ArgumentOutOfRangeException ex)
     {
         DisplayMessage.ErrorMessageBox(ex.GetType().Name, "Invalid 'Memory Size' setting. The default setting will be used instead.");
         Globals.MemorySize = Constants.DefaultMemorySize;
         Settings.SaveSettings();
         SetMemorySize(nudArgon2MemorySize);
     }
 }