Example #1
0
        private void AdvanceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            decimal count;

            count = NumericInputDialog.ShowInputDialog(this, "Enter &iterations to advance:", "Advance", 1, 1, int.MaxValue, _ => true);

            if (count > 0)
            {
                _simulation.Run((int)count);

                this.UpdateStatusBar();

                renderPanel.Invalidate();
            }
        }
Example #2
0
        private void GoToToolStripMenuItem_Click(object sender, EventArgs e)
        {
            decimal count;

            count = NumericInputDialog.ShowInputDialog(this, "Enter &iteration:", "Go To", 1, 1, int.MaxValue, v => v > _simulation.Iteration);

            if (count > 0)
            {
                long iterations;

                iterations = (long)count - _simulation.Iteration;

                _simulation.Run(iterations);

                this.UpdateStatusBar();

                renderPanel.Invalidate();
            }
        }