Esempio n. 1
0
        private static void StopButton_Click(object sender, EventArgs e)
        {
            Timer.Change(0, Timeout.Infinite);

            SongReader.Position = Song;

            Form.Timer.Stop();

            MidiPlayer.Stop();

            SongPlayer.Stop();
        }
Esempio n. 2
0
        private static void Form_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
        {
            if (SongPlayer.Playing)
            {
                Timer.Change(0, Timeout.Infinite);

                Form.Timer.Stop();

                MidiPlayer.Stop();

                SongPlayer.Stop();
            }
        }
Esempio n. 3
0
        private static void PlayButton_Click(object sender, EventArgs e)
        {
            if (!SongPlayer.Playing)
            {
                Song = SongReader.Position;

                MidiPlayer.Start();

                SongPlayer.Play();

                Form.Timer.Start();

                Timer.Change(0, 10);
            }
        }
Esempio n. 4
0
 private static void Timer_Elapsed(object state)
 {
     SongPlayer.Update();
     MidiPlayer.Update();
 }