Exemple #1
0
 public EditPanel(form1 masterform, MusicFileControl completedDownload, Point Location)
 {
     _completedDownload = completedDownload;
     _masterform = masterform;
     this.Location = Location;
     InitializeComponent();
 }
Exemple #2
0
 public void Pause(MusicFileControl toPlay)
 {
     mediaHandler.Pause();
 }
Exemple #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;
 }
Exemple #4
0
 public void Play(MusicFileControl toPlay)
 {
     mediaHandler.Play(toPlay);
 }
Exemple #5
0
 public void Play(MusicFileControl toPlay)
 {
     PlayHelper(toPlay);
 }
Exemple #6
0
 public void addEvents(MusicFileControl mfc)
 {
     mfc.PlayClicked +=new MusicFileControl.PlayPauseClickedEvent(mfc_PlayClicked);
     mfc.PauseClicked += new MusicFileControl.PlayPauseClickedEvent(mfc_PauseClicked);
 }
Exemple #7
0
 private void _Play(MusicFileControl toPlay)
 {
     if (CurrentPlaying != toPlay)
     {
         if (CurrentPlaying != null)
         {
             CurrentPlaying.Stop();
         }
         CurrentPlaying = toPlay;
     }
     _masterForm.mediaPanel1.Play(CurrentPlaying.FullPath);
     CurrentPlaying.Play();
 }
Exemple #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);
     }
 }
Exemple #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;
         }
     }
 }
Exemple #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;
         }
     }
 }