public void ClickLocalMusicExecute() { ListId = string.Empty; MusicInfos.Clear(); var list = new LocalListManager().GetList(); list.ForEach(item => { var mim = new MusicInfoManager(); var music = mim.Find(item.Id); MusicInfos.Add(music.ToIMusic()); }); PlayerList.SetPreList(MusicInfos, "本地音乐"); DataGridAnimation(); }
public void DefaultListExecute() { ListId = string.Empty; var orm = new DefaultListManager(); var list = orm.GetList(); MusicInfos.Clear(); list.ForEach(item => { var mif = new MusicInfoManager(); var music = mif.Find(item.Id); MusicInfos.Add(music.ToIMusic()); }); PlayerList.SetPreList(MusicInfos, "默认列表"); DataGridAnimation(); }
public void ClickCustomList(object parameter) { ListId = string.Empty; string title = parameter.ToString(); var ls = new CustomListManager().GetList(); MusicInfos.Clear(); ls.ForEach(item => { if (item.Title == title) { var mim = new MusicInfoManager(); var music = mim.Find(item.Id); MusicInfos.Add(music.ToIMusic()); } }); PlayerList.SetPreList(MusicInfos, title); DataGridAnimation(); }
public void ClickPlatformList(object parameter) { string id = parameter.ToString(); ListId = id; var ls = new PlatformListManager().GetList(); MusicInfos.Clear(); ls.ForEach(item => { if (item.PlatformId == id) { var mim = new MusicInfoManager(); var music = mim.Find(item.MusicId); MusicInfos.Add(music.ToIMusic()); } }); PlayerList.SetPreList(MusicInfos, new PlatformInfoManager().Find(id).Title); DataGridAnimation(); }
public void RefreshShowList(string title) { //如果当前BasePage的DataGrid展示的是默认列表,进行刷新 if (PlayerList.PreListTitle != title) { return; } if (ListId == string.Empty) { if (title == "默认列表") { var orm = new DefaultListManager(); var list = orm.GetList(); MusicInfos.Clear(); list.ForEach(item => { var mif = new MusicInfoManager(); var music = mif.Find(item.Id); MusicInfos.Add(music.ToIMusic()); }); } else if (title == "本地音乐") { MusicInfos.Clear(); var list = new LocalListManager().GetList(); list.ForEach(item => { var mim = new MusicInfoManager(); var music = mim.Find(item.Id); MusicInfos.Add(music.ToIMusic()); }); } else { var ls = new CustomListManager().GetList(); MusicInfos.Clear(); ls.ForEach(item => { if (item.Title == title) { var mim = new MusicInfoManager(); var music = mim.Find(item.Id); MusicInfos.Add(music.ToIMusic()); } }); } } else { var ls = new PlatformListManager().GetList(); MusicInfos.Clear(); ls.ForEach(item => { if (item.PlatformId == ListId) { var mim = new MusicInfoManager(); var music = mim.Find(item.MusicId); MusicInfos.Add(music.ToIMusic()); } }); } }