public ChartsUI() { InitializeComponent(); comicManager = new ComicAccess(); var cbList = comicManager.GetComicBookList(); cbList = ComicSortingInterface.SortBy(cbList, SortComicOption.ViewCount, Application_Interface.SortOrder.Descending); foreach (var cb in cbList) { lstBxComics.Items.Add(Path.GetFileName(cb.GetArchivePath())); } }
private void ReloadLibrary() { lstBxSavedComics.Items.Clear(); lstBxAvailableComics.Items.Clear(); //load user's saved comic books into list view foreach (var cb in loggedInUser.MyComicLibrary.GetAllComicBooks()) { lstBxSavedComics.Items.Add(Path.GetFileName(cb.GetArchivePath())); } List <ComicBook> availableComicBooks = comicManager.GetComicBookList() .Where(cb => !loggedInUser.MyComicLibrary.ComicBookExists(cb.GetArchivePath())) .ToList(); foreach (var cb in availableComicBooks) { lstBxAvailableComics.Items.Add(Path.GetFileName(cb.GetArchivePath())); } }
public ComicBook[] GetListOfAvailableComics() { return(comicManager.GetComicBookList().ToArray()); }