Esempio n. 1
0
 void lda_ProgressChanged(object sender, ILAlgorithmEventArgs e)
 {
     Info("Got state from " + ((ILAlgorithm)sender).Name + Environment.NewLine +
          " " + e.Progress + " State: " + e.State);
     if (e.Progress > 0.5)
     {
         e.Cancel = true;
         Info("Cancelling excecution...");
     }
 }
Esempio n. 2
0
        void bsortConstant_StateChanged(object sender, ILAlgorithmEventArgs e)
        {
            if (m_stopwatch == null)
            {
                m_stopwatch = new System.Diagnostics.Stopwatch();
            }
            switch (e.State)
            {
            case ILAlgorithmState.Running:
                m_stopwatch.Reset();
                m_stopwatch.Start();
                break;

            case ILAlgorithmState.Finished:
                m_stopwatch.Stop();
                Info("Last operation finished in: " + m_stopwatch.ElapsedMilliseconds + " ms" + Environment.NewLine);
                break;

            default:
                m_stopwatch.Stop();
                break;
            }
        }
Esempio n. 3
0
 void lda_StateChanged(object sender, ILAlgorithmEventArgs e)
 {
     Info("Got state from " + ((ILAlgorithm)sender).Name + Environment.NewLine +
          " " + e.Progress + " State: " + e.State);
 }