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..."); } }
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; } }
void lda_StateChanged(object sender, ILAlgorithmEventArgs e) { Info("Got state from " + ((ILAlgorithm)sender).Name + Environment.NewLine + " " + e.Progress + " State: " + e.State); }