//添加 private void 添加ToolStripMenuItem_Click(object sender, EventArgs e) { MvInfo mv1 = new MvInfo(); mv1.singer_name = this.dgvpai.SelectedRows[0].Cells["songer_name"].Value.ToString(); mv1.song_name = this.dgvpai.SelectedRows[0].Cells["sing_name"].Value.ToString(); mv1.mv_path = ControlEnd.MainPath + this.dgvpai.SelectedRows[0].Cells["path"].Value.ToString(); ControlEnd.addMvInfo(mv1); Dain(); }
//静音 private void pictureBox11_Click(object sender, EventArgs e) { if (this.label8.Text == "静音") { ControlEnd.exSound(true); this.label8.Text = "还原"; } else { ControlEnd.exSound(false); this.label8.Text = "静音"; } }
//播放 private void pictureBox1_Click(object sender, EventArgs e) { if (label1.Text == "播放") { label1.Text = "暂停"; ControlEnd.setCmd(ExCmd.CMD_PLAY); } else if (label1.Text == "暂停") { label1.Text = "播放"; ControlEnd.setCmd(ExCmd.CMD_PAUSE); } }
//添加歌曲 public static void addMvInfo(MvInfo addonce) { foreach (MvInfo once in mvList) { if (once.mv_path.Equals(addonce.mv_path)) { test.setPrompt("列表中已存在重复的歌曲"); return; } } ControlEnd.mvList.Add(addonce); //ControlEnd.addFinishMvListItem(addonce); ControlEnd.reMvList(); }
//当前播放完毕后自动播放下一个 private void axWindowsMediaPlayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e) { if (frmplay.axWindowsMediaPlayer.playState == WMPPlayState.wmppsPaused) { return; } if (!(frmplay.axWindowsMediaPlayer.playState == WMPLib.WMPPlayState.wmppsMediaEnded)) { try { frmplay.axWindowsMediaPlayer.Ctlcontrols.play(); } catch { } } else { ControlEnd.setCmd(ExCmd.CMD_NEXT); } }
private void 除ToolStripMenuItem_Click(object sender, EventArgs e) { ControlEnd.exMvList(ExCmd.CMD_DELETE); }
//切歌 private void toolStripButton2_Click(object sender, EventArgs e) { ControlEnd.setCmd(ExCmd.CMD_NEXT); }
//音量滑块 private void trackBar1_Scroll(object sender, EventArgs e) { ControlEnd.exVolume(); }
//重唱 private void pictureBox9_Click(object sender, EventArgs e) { ControlEnd.setCmd(ExCmd.CMD_RESET); }