private void RunCalculation(string c_TestSourceFile) { ec.RunCalculation(c_TestSourceFile); Assert.IsTrue(ec.SourceDataFile == c_TestSourceFile); ec.WaitForAll(); Assert.IsTrue(ec.SourceDataFile == c_TestSourceFile); }
private void Worker_DoWork(object sender, DoWorkEventArgs e) { try { ec.WaitForAll(); } catch (Exception ex) { MessageBox.Show($"A feldolgozás nem sikerült! {Environment.NewLine}Hiba: {ex.Message}", "Hiba"); } }
string RunCalculation(string pSourceFile) { EntropyCalculator ec = new EntropyCalculator() { ResultDir = resultPath }; ec.RunCalculation(pSourceFile); ec.WaitForAll(); return(ec.ResultFile); }
/// <summary>Entrópia számítás.</summary> /// <param name="pSourceFile">Feldolgozandó adatfájl.</param> public static void RunCalculation(string pSourceFile) { try { ec = new EntropyCalculator(); System.Console.Write(C_StartEntropyText); ec.RunCalculation(pSourceFile); SetAndStartDotTimer(); ec.WaitForAll(); timer.Stop(); WriteEndInfo(); } catch (Exception ex) { Environment.ExitCode = (int)ExitCode.CalculationError; System.Console.WriteLine(); System.Console.WriteLine($"{C_EndEntropyText} {C_CalculationError}"); throw ex; } }