Example #1
0
 /// <summary>
 /// This event handler allows to stop playing.
 /// </summary>
 /// <param name="sender">The source of an event</param>
 /// <param name="e">Instance containing the event data</param>
 public void btnStop_Click(object sender, EventArgs e)
 {
     BeginInvoke(new Action(() =>
     {
         WMP.close();
     }));
 }
Example #2
0
        private void fMediaPlayer_FormClosing(object sender, FormClosingEventArgs e)
        {
            PauseMusic();
            MediaPlayer.SaveSettings();
            MediaPlayer.SaveCustomSettings();

            if (MediaPlayer.list.Any())
            {
                MediaPlayer.currentPosition = WMP.Ctlcontrols.currentPosition;
                MediaPlayer.SaveListSettings();
                MediaPlayer.SaveList();
            }

            WMP.close();
            // HOOK SPACE
            KeyboardHook.UnInstallHook();
            MouseHook.UnInstallHook();
        }