Esempio n. 1
0
        public void Play()
        {
            Starting(this, null);
            if (_isPaused)
            {
                Resume();
                return;
            }

            _clock.SetTicks(0);
            _songCopy = _song.MakeCopy();

            Starting(this, null);

            lock (_lockObject)
            {
                if (_clock.IsRunning)
                {
                    _clock.Stop();
                }
                _clock.Start();
            }
            CanStop  = true;
            CanPlay  = false;
            CanPause = true;
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (modulesOn)
            {
                //turn off modules

                modulesOn = false;
                UpdateMessage("Modules turned off.");
            }
            else
            {
                // turn on modules
                clock.Start();
                smoothening1 = new SmoothedZSmoothening(LAG, THRESHOLD, INFLUENCE);
                smoothening2 = new SmoothedZSmoothening(LAG, THRESHOLD, INFLUENCE);

                modulesOn = true;
                UpdateMessage("Modules turned on.");
            }
        }