Ejemplo n.º 1
0
        internal static void Show()
        {
            Form = new SongForm();

            Form.Timer.Tick       += Timer_Tick;
            Form.PlayButton.Click += PlayButton_Click;
            Form.StopButton.Click += StopButton_Click;
            Form.FormClosed       += Form_FormClosed;

            Form.Show();
        }
Ejemplo n.º 2
0
        private static void Form_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
        {
            Form.PlayButton.Click -= PlayButton_Click;
            Form.StopButton.Click -= StopButton_Click;
            Form.FormClosed       -= Form_FormClosed;

            Form.Timer.Stop();
            Timer.Change(Timeout.Infinite, 10);

            SongPlayer.Stop();
            Midi.MidiPlayer.Stop();

            Form = null;
        }