private void RunCalculation(string c_TestSourceFile)
 {
     ec.RunCalculation(c_TestSourceFile);
     Assert.IsTrue(ec.SourceDataFile == c_TestSourceFile);
     ec.WaitForAll();
     Assert.IsTrue(ec.SourceDataFile == c_TestSourceFile);
 }
Ejemplo n.º 2
0
 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");
     }
 }
Ejemplo n.º 3
0
        string RunCalculation(string pSourceFile)
        {
            EntropyCalculator ec = new EntropyCalculator()
            {
                ResultDir = resultPath
            };

            ec.RunCalculation(pSourceFile);
            ec.WaitForAll();
            return(ec.ResultFile);
        }
Ejemplo n.º 4
0
 /// <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;
     }
 }