Ejemplo n.º 1
0
        //展示音乐整合后
        public MusicMenu ShowFiles()
        {
            this.musicMenu = new MusicMenu();
            List <MusicFile> files = MusicFileService.Instance().GetAllFiles();

            for (int i = 0; i < files.Count; i++)
            {
                this.musicMenu.addItem(new MenuItem(i, files[i].Name));
            }
            if (this.musicMenu.playingIndex != -1)
            {
                this.musicMenu.CurrentItem = this.musicMenu.playingIndex;
            }
            return(this.musicMenu);
        }
Ejemplo n.º 2
0
        private void showMusicMenu()
        {
            this.listView1.BeginUpdate();
            this.listView1.Items.Clear();
            this.musicMenu = this.musiceMain.ShowFiles();
            for (int i = 0; i < this.musicMenu.getItemSize(); i++)
            {
                ListViewItem lvi = new ListViewItem();
                lvi.Text = this.musicMenu.getItemByIndex(i).Id + "";
                lvi.SubItems.Add(this.musicMenu.getItemByIndex(i).Name);
                listView1.Items.Add(lvi);
            }

            this.listView1.EndUpdate();
        }