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