private void Alb_ItemClicked(object sender, EventArgs e) { Album alb = (Album)sender; CurrentItems.Clear(); TrackView.Items.Clear(); for (int i = 0; alb.Data.Tracks.Length > i; i++) { LAPP.IO.FileItem fi = CreateItem(alb.Data, i); TrackView.Items.Add(fi.ListItem); CurrentItems.Add(fi); } ClearUC.Utils.AnimationHelper.Visible va = new ClearUC.Utils.AnimationHelper.Visible(); int ind = Children.IndexOf(alb); if (ind == VisibleIndex) { VisibleIndex = -1; Current = null; va.Animate(Config.Current.iValue[Enums.iValue.AlbumVisibleAnimation], TrackView, Visibility.Hidden); EditLabel.Visibility = Visibility.Hidden; } else { VisibleIndex = ind; Current = alb.Data; va.Animate(Config.Current.iValue[Enums.iValue.AlbumVisibleAnimation], TrackView, Visibility.Visible); EditLabel.Visibility = Visibility.Visible; } }
private void OpenB_Click(object sender, System.Windows.RoutedEventArgs e) { if (FolderBrowser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { TopItems.Clear(); TopItems.Add(OpenDirPageItem); string[] paths = Directory.GetFiles(FolderBrowser.SelectedPath); for (int i = 0; paths.Length > i; i++) { MediaFile mf = new MediaFile(paths[i]); TopItems.Add(new FileItem(mf, new ListSubItem() { MainLabelText = mf.Title, SubLabelText = mf.Artist }, true)); } UpdatePage(Level.Top); } }