示例#1
0
        private void StopSimulation()
        {
            _isSimulating = false;
            _simulationTimer.Stop();
            SimulationMatrix.Clean();

            PlayButton.Image = Icons.play_32;
            ToolTip.SetToolTip(PlayButton, "Start Simulation");
        }
示例#2
0
        private void StartSimulation()
        {
            _isSimulating     = true;
            _currentClipIndex = 0;
            SimulationMatrix.Clean();

            _simulationTimer.Interval = _simulationInterval / _simulationSpeed;
            _simulationTimer.Start();

            PlayButton.Image = Icons.stop_32;
            ToolTip.SetToolTip(PlayButton, "Stop Simulation");
        }
示例#3
0
        private void OnSimulationStep(object sender, EventArgs e)
        {
            if (_currentClipIndex >= _clips.Count)
            {
                _currentClipIndex = 0;
            }

            var currentClip = _clips.GetAt(_currentClipIndex);

            if (currentClip != null)
            {
                SimulationMatrix.SetContent(currentClip);
                _currentClipIndex++;
            }
        }