コード例 #1
0
        private void metroButton_List_Click(object sender, EventArgs e)
        {
            FRM_LISTNHAC list = new FRM_LISTNHAC();

            list.ShowDialog();
            if (list.ChonNgheListNay == true)
            {
                if (listView1.Items.Count != 0)
                {
                    this.listView1.Items.Clear();
                    this.axVLCPlugin21.playlist.stop();
                    this.axVLCPlugin21.playlist.items.clear();
                }
                int vt = list.ViTriCuaList;
                for (int i = 0; i < FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].SoLuongBaiHat(); i++)
                {
                    this.axVLCPlugin21.playlist.add("file:///" + FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i].path, FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i].name, null);
                    File tempfile = FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i];
                    ThemMotBaiHatVaoListView(tempfile);
                }
            }
        }
コード例 #2
0
        private void userControl_TrinhDieuKhien1_Click(object sender, EventArgs e)
        {
            switch (userControl_TrinhDieuKhien1.NutVuaAnXong)


            {
            case "metroButton_Play":
                if (this.axVLCPlugin21.playlist.isPlaying)
                {
                    this.userControl_TrinhDieuKhien1.metroButton_Play.BackgroundImage = Media_Player_V2.Properties.Resources.pause;
                    this.axVLCPlugin21.playlist.pause();
                }

                else
                {
                    this.userControl_TrinhDieuKhien1.metroButton_Play.BackgroundImage = Media_Player_V2.Properties.Resources.Play__2_;
                    this.axVLCPlugin21.playlist.play();
                }


                break;

            case "metroButton_LuiBaiTruoc":
                this.axVLCPlugin21.playlist.prev();
                break;

            case "metroButton_Stop":
                this.axVLCPlugin21.playlist.stop();
                break;

            case "metroButton_Next":
                this.axVLCPlugin21.playlist.next();
                break;

            case "metroButton_FullScreen":
                this.axVLCPlugin21.video.fullscreen = true;
                break;

            case "metroButton_Loop":

                break;

            case "metroButton_RamDom":
                break;

            case "metroButton_Mute":
                if (this.axVLCPlugin21.audio.mute)
                {
                    this.userControl_TrinhDieuKhien1.metroButton_Mute.BackgroundImage = Media_Player_V2.Properties.Resources.unmute;
                    this.axVLCPlugin21.audio.mute = false;
                }

                else
                {
                    this.userControl_TrinhDieuKhien1.metroButton_Mute.BackgroundImage = Media_Player_V2.Properties.Resources.mute;
                    this.axVLCPlugin21.audio.mute = true;
                }
                break;

            case "metroButton_List":

                FRM_LISTNHAC list = new FRM_LISTNHAC();
                list.ShowDialog();
                if (list.ChonNgheListNay == true)
                {
                    if (listView1.Items.Count != 0)
                    {
                        this.listView1.Items.Clear();
                        this.axVLCPlugin21.playlist.stop();
                        this.axVLCPlugin21.playlist.items.clear();
                    }
                    int vt = list.ViTriCuaList;
                    for (int i = 0; i < FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].SoLuongBaiHat(); i++)
                    {
                        this.axVLCPlugin21.playlist.add("file:///" + FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i].path, FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i].name, null);
                        File tempfile = FRM_MAIN.QLListNhac.DSList.DSList_Nhac[vt].DanhSachBaiHat[i];
                        ThemMotBaiHatVaoListView(tempfile);
                    }
                }
                break;
            }
        }