private ClearUC.ListViewItems.ListItem CreateSubItem(Page.Album.AlbumData.Track Track) { ListAnimativeItem Lai = new ListAnimativeItem(true); Lai.DataType = typeof(Page.Album.AlbumData.Track); Lai.Data = Track; ListSubItem lsi = new ListSubItem(); if (Track.TrackNumber > 0) { lsi.LeftItem = ListSubItem.LeftItems.Number; lsi.NumberLabelText = Track.TrackNumber.ToString(); } Lai.ItemsHeight = lsi.Height; lsi.SubLabelVisibility = Visibility.Visible; lsi.SubLabelText = "Unknown"; lsi.MainLabelText = System.IO.Path.GetFileName(Track.Path) + " - " + Utils.Config.Language.Strings.Path.File; lsi.SubLabelText = Utils.Config.Language.Strings.Window.Album.Disc + ":" + Track.DiscNumber + " (" + Track.Path + ")"; Lai.FirstItem = lsi; ListButtonsItem lbi = new ListButtonsItem(); ListButtonsItem.ListButton Remove = new ListButtonsItem.ListButton(Lai); Remove.Click += Remove_Click; Remove.Content = Utils.Config.Language.Strings.ContextMenu.Remove; lbi.Add(Remove); Lai.SecondItem = lbi; return(Lai); }
private ListItem CreateSubItem(Page.Playlist.Playlist.PlaylistData.Path Path) { ListAnimativeItem Lai = new ListAnimativeItem(true); Lai.DataType = typeof(Page.Playlist.Playlist.PlaylistData.Path); Lai.Data = Path; ListSubItem lsi = new ListSubItem(); Lai.ItemsHeight = lsi.Height; lsi.SubLabelVisibility = Visibility.Visible; lsi.SubLabelText = "Unknown"; switch (Path.IsFile) { case true: lsi.MainLabelText = System.IO.Path.GetFileName(Path.FilePath) + " - " + Utils.Config.Language.Strings.Path.File; lsi.SubLabelText = Path.FilePath; break; case false: lsi.MainLabelText = System.IO.Path.GetFileName(Path.DirectoryPath) + " - " + Utils.Config.Language.Strings.Path.Directory; lsi.SubLabelText = Path.DirectoryPath + " - Filter : " + string.Join(" , ", Path.Filter); break; } Lai.FirstItem = lsi; ListButtonsItem lbi = new ListButtonsItem(); ListButtonsItem.ListButton Remove = new ListButtonsItem.ListButton(Lai); Remove.Click += Remove_Click; Remove.Content = Utils.Config.Language.Strings.ContextMenu.Remove; lbi.Add(Remove); Lai.SecondItem = lbi; return(Lai); }