private void btnNext_Click(object sender, RoutedEventArgs e) { this.Dispatcher.BeginInvoke(new Action(() => { PlayController.PlayNext(); })); }
private void playListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (PlayController.PlayIndex != playListBox.SelectedIndex) { PlayController.PlayIndex = playListBox.SelectedIndex; PlayController.PlayMusic(); } }
public MainWindow() { InitializeComponent(); AppPropertys.mainWindow = this; AppPropertys.Initialize(); PlayController.Initialize(); LrcController.Initialize(); LoadSongList(""); }
public MainPage(string arge) { InitializeComponent(); AppPropertys.mainWindow = this; AppPropertys.Initialize(); PlayController.Initialize(); LrcController.Initialize(AppPropertys.appSetting.LrcFont, AppPropertys.appSetting.SkinIndex); LoadSongList(""); if (arge != "") { AddFileAndPlay(arge); } }
public void AddFileAndPlay(string path) { Song song = PlayController.Songs.FirstOrDefault(s => s.FileUrl.Replace(" ", "") == path); if (song == null) { XmlDocument xmlDoc = InitXml(); XmlNode root = xmlDoc.SelectSingleNode("SongList"); song = new Song(path, CommonProperty.getTitleFromPath(path)); ReadInfoFromFile(song); root.AppendChild(CreateElement(xmlDoc, song)); PlayController.Songs.Add(song); xmlDoc.Save(XmlListPath); } playListBox.ScrollIntoView(song); playListBox.SelectedValue = song; PlayController.PlayMusic(playListBox.SelectedIndex); }
/// <summary> /// 应用程序响应键盘按下事件,并判断做出相关动作。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { Key downKey = e.Key; switch (downKey) { case Key.Space: if (PlayController.bassEng.CanPlay) { PlayController.Play(); } else { PlayController.PlayMusic(); } break; case Key.Left: PlayController.PlayPrevent(); break; case Key.Right: PlayController.PlayNext(); break; case Key.Up: PlayController.bassEng.Volume += 0.1; break; case Key.Down: PlayController.bassEng.Volume -= 0.1; break; default: break; } }
private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PlayController.ShowSetEQ(); }
private void btn_Play(object sender, EventArgs e) { PlayController.PlayMusic(); }
public void btnMute_Click(object sender, RoutedEventArgs e) { PlayController.setMute(); }
public static void nofityPlayNext_Click(object sender, EventArgs e) { PlayController.PlayNext(); }