Exemplo n.º 1
0
        //添加至点歌记录并刷新
        //public static void addFinishMvListItem(MvInfo mvInfo)
        //{
        //    finishMvList.Add(mvInfo);
        //    int i = 0;
        //    test.lvFinishMvList.Items.Clear();
        //    foreach (MvInfo once in finishMvList)
        //    {
        //        i++;
        //        test.lvFinishMvList.Items.Add(new ListViewItem(new string[] { once.song_name, once.singer_name, once.mv_path, i.ToString() }));
        //    }
        //}

        //操作Mv菜单
        public static void exMvList(int cmd)
        {
            switch (cmd)
            {
            case ExCmd.CMD_DELETE:
                mvList.Remove(getExMvInfo());
                break;

            case ExCmd.CMD_UP:
                if (int.Parse(test.lvMvList.SelectedItems[0].SubItems[3].Text) < 3)
                {
                    test.setPrompt("已经不能再往上了");
                    break;
                }
                MvInfo upMvInfo = getExMvInfo();
                mvList.Remove(upMvInfo);
                mvList.Insert(int.Parse(test.lvMvList.SelectedItems[0].SubItems[3].Text) - 2, upMvInfo);
                break;

            case ExCmd.CMD_UPUP:
                if (int.Parse(test.lvMvList.SelectedItems[0].SubItems[3].Text) < 3)
                {
                    test.setPrompt("已经不能再往上了");
                    break;
                }
                MvInfo upupMvInfo = getExMvInfo();
                mvList.Remove(upupMvInfo);
                mvList.Insert(1, upupMvInfo);
                break;
            }
            reMvList();
            setCmd(ExCmd.CMD_PLAY);
        }
Exemplo n.º 2
0
 //添加
 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();
 }
Exemplo n.º 3
0
        //获得要操作的MvInfo
        private static MvInfo getExMvInfo()
        {
            MvInfo exMvInfo = null;

            foreach (MvInfo once in mvList)
            {
                if (test.lvMvList.SelectedItems[0].SubItems[2].Text.Equals(once.mv_path))
                {
                    exMvInfo = once;
                    break;
                }
            }
            return(exMvInfo);
        }
Exemplo n.º 4
0
 //添加歌曲
 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();
 }
Exemplo n.º 5
0
        public static void SetEx(int cmd, MvInfo mvInfo)
        {
            switch (cmd)
            {
            case ExCmd.CMD_PLAY:
                break;

            case ExCmd.CMD_PAUSE:
                break;

            case ExCmd.CMD_RESET:
                break;

            case ExCmd.CMD_NEXT:
                break;
            }
        }