コード例 #1
0
        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()));
            }
        }
コード例 #2
0
        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()));
            }
        }
コード例 #3
0
 public ComicBook[] GetListOfAvailableComics()
 {
     return(comicManager.GetComicBookList().ToArray());
 }