Exemplo n.º 1
0
        public void CalculateFullSetTest()
        {
            var sut    = new CalculationService();
            var isDone = false;

            while (!isDone)
            {
                isDone = sut.CalculateStep();
            }

            Assert.IsNotNull(sut.Results);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Calculates and draws diagram in steps
        /// </summary>
        protected void OnTimerElapsed(object sender, ElapsedEventArgs e)
        {
            for (int i = 0; i < _repaintInterval; i++)
            {
                bool isDone = _calculationService.CalculateStep();

                if (isDone)
                {
                    _timer.Stop();
                    break;
                }
            }

            DrawResults();
            StateChanged?.Invoke(this, EventArgs.Empty);
        }