Exemplo n.º 1
0
 public EditPanel(form1 masterform, MusicFileControl completedDownload, Point Location)
 {
     _completedDownload = completedDownload;
     _masterform = masterform;
     this.Location = Location;
     InitializeComponent();
 }
Exemplo n.º 2
0
 public void Pause(MusicFileControl toPlay)
 {
     mediaHandler.Pause();
 }
Exemplo n.º 3
0
 private void AddMusicFileControl(string downloadDirectory, string filename)
 {
     MusicFileControl mf = new MusicFileControl();
     Completed.Add(mf);
     mf.setInfo(downloadDirectory, filename, CompletedDownloadLocation, MusicFileControl.EditedStatuses.NotEdited);
     this.Controls.Add(mf);
     mediaHandler.addEvents(mf);
     mf.Show();
     CompletedDownloadLocation.Y += mf.Height;
 }
Exemplo n.º 4
0
 public void Play(MusicFileControl toPlay)
 {
     mediaHandler.Play(toPlay);
 }
Exemplo n.º 5
0
 public void Play(MusicFileControl toPlay)
 {
     PlayHelper(toPlay);
 }
Exemplo n.º 6
0
 public void addEvents(MusicFileControl mfc)
 {
     mfc.PlayClicked +=new MusicFileControl.PlayPauseClickedEvent(mfc_PlayClicked);
     mfc.PauseClicked += new MusicFileControl.PlayPauseClickedEvent(mfc_PauseClicked);
 }
Exemplo n.º 7
0
 private void _Play(MusicFileControl toPlay)
 {
     if (CurrentPlaying != toPlay)
     {
         if (CurrentPlaying != null)
         {
             CurrentPlaying.Stop();
         }
         CurrentPlaying = toPlay;
     }
     _masterForm.mediaPanel1.Play(CurrentPlaying.FullPath);
     CurrentPlaying.Play();
 }
Exemplo n.º 8
0
 private void PlayPreviousHelper(MusicFileControl toPlay)
 {
     if (File.Exists(toPlay.FullPath))
     {
         _Play(toPlay);
     }
     else
     {
         if (loopChecking_PreviousFirstSkipPathSet)
         {
             if (toPlay.FullPath == loopChecking_PreviousFirstSkipPath)
             {
                 loopChecking_PreviousFirstSkipPathSet = false;
                 return;
             }
         }
         else
         {
             loopChecking_PreviousFirstSkipPath = toPlay.FullPath;
             loopChecking_PreviousFirstSkipPathSet = true;
         }
         playPrevious(toPlay);
     }
 }
Exemplo n.º 9
0
 private void playPrevious(MusicFileControl currentPlaying)
 {
     for (int c = 0; c < _masterForm.Completed.Count; c++)
     {
         if (_masterForm.Completed.ElementAt(c) == currentPlaying)
         {
             if (c == 0)
             {
                 PlayPreviousHelper(_masterForm.Completed.Last());
             }
             else
             {
                 PlayPreviousHelper(_masterForm.Completed.ElementAt(c - 1));
             }
             return;
         }
     }
 }
Exemplo n.º 10
0
 private void playNext(MusicFileControl currentPlaying)
 {
     for (int c = 0; c < _masterForm.Completed.Count; c++) //play Next
     {
         if (_masterForm.Completed.ElementAt(c) == currentPlaying)
         {
             if (c == _masterForm.Completed.Count - 1)
             {
                 PlayHelper(_masterForm.Completed.First());
             }
             else
             {
                 PlayHelper(_masterForm.Completed.ElementAt(c + 1));
             }
             return;
         }
     }
 }