private void panel6_MouseClick(object sender, MouseEventArgs e)
        {
            UCPanel uCPanel   = (UCPanel)sender;
            Type    classType = Type.GetType(uCPanel.Tag.ToString());

            object[] constructParms = new object[] { currPlaySongList.Count };
            contextPlayModel = new ContextPlayModel((PlayModel)Activator.CreateInstance(classType, constructParms));
            switch (uCPanel.Name)
            {
            case "panel4":
                panel2.BackgroundImage = panel4.BackgroundImage;
                label2.Text            = "当前播放模式为随机播放";
                break;

            case "panel5":
                panel2.BackgroundImage = panel5.BackgroundImage;
                label2.Text            = "当前播放模式为列表循环";
                break;

            case "panel6":
                panel2.BackgroundImage = panel6.BackgroundImage;
                label2.Text            = "当前播放模式为单曲播放";
                break;
            }
            panel3.Visible = false;
        }
Esempio n. 2
0
        private void panel6_MouseClick(object sender, MouseEventArgs e)
        {
            UCPanel uCPanel = (UCPanel)sender;

            switch (uCPanel.Name)
            {
            case "panel4":
                contextPlayModel       = new ContextPlayModel(new RandomCycle(currPlaySongList.Count));
                panel2.BackgroundImage = panel4.BackgroundImage;
                label2.Text            = "当前播放模式为随机播放";
                break;

            case "panel5":
                contextPlayModel       = new ContextPlayModel(new ListCycle());
                panel2.BackgroundImage = panel5.BackgroundImage;
                label2.Text            = "当前播放模式为列表循环";
                break;

            case "panel6":
                contextPlayModel       = new ContextPlayModel(new SingleCycle());
                panel2.BackgroundImage = panel6.BackgroundImage;
                label2.Text            = "当前播放模式为单曲播放";
                break;

            default:
                contextPlayModel = new ContextPlayModel(new ListCycle());
                label2.Text      = "当前播放模式为列表循环";
                break;
            }
            panel3.Visible = false;
        }