private void Btn_PlayPause_Click(object sender, EventArgs e)
 {
     if (isPLaying)
     {
         media.Ctlcontrols.pause();
         isPLaying = false;
         Btn_PlayPause.BackgroundImage = Properties.Resources.play_button;
     }
     else
     {
         media.Ctlcontrols.play();
         isPLaying = true;
         Btn_PlayPause.BackgroundImage = Properties.Resources.pause;
     }
     ProgressBar_Duration.Focus();
 }
 private void Btn_Loop_Click(object sender, EventArgs e)
 {
     if (loopMode == 1)
     {
         Btn_Loop.BackgroundImage = Properties.Resources.loop_one;
         loopMode = 2;
         //media.settings.setMode("loop", true);
         //Timer_Loop.Enabled = false;
     }
     else if (loopMode == 2)
     {
         Btn_Loop.BackgroundImage = Properties.Resources.reload;
         loopMode = 1;
         ///Timer_Loop.Enabled = true;
     }
     ProgressBar_Duration.Focus();
 }
        private void Btn_Volume_Click(object sender, EventArgs e)
        {
            var val = ProgressBar_Volume.Value;

            if (val == 0)
            {
                Btn_Volume.BackgroundImage = Properties.Resources.volume;
                ProgressBar_Volume.Value   = 25;
                media.settings.volume      = 25;
            }
            else
            {
                Btn_Volume.BackgroundImage = Properties.Resources.mute;
                ProgressBar_Volume.Value   = 0;
                media.settings.volume      = 0;
            }
            ProgressBar_Duration.Focus();
        }
        private void Btn_Next_Click(object sender, EventArgs e)
        {
            if (media == null || MyResources.Main.PlayingTab.NowPlaylist == null)
            {
                return;
            }
            List <Dictionary <string, string> > playlist = MyResources.Main.PlayingTab.NowPlaylist;
            int indPLaying = MyResources.Main.PlayingTab.GetIndexMediaPLaying();

            MyResources.Main.PlayingTab.RemovePlaying();
            if (indPLaying == playlist.Count - 1)
            {
                MyResources.Main.PlayingTab.SetNewPlayingByIndex(0);
            }
            else
            {
                MyResources.Main.PlayingTab.SetNewPlayingByIndex(indPLaying + 1);
            }
            ProgressBar_Duration.Focus();
        }
 private void Btn_Playlist_Click(object sender, EventArgs e)
 {
     MyResources.Main.PlayingTab.TogglePlaylistPanel();
     ProgressBar_Duration.Focus();
 }