Example #1
0
 public void LoadComicLib(string lib)
 {
     if (Directory.Exists(lib))
     {
         foreach (var item in Directory.GetDirectories(lib))
         {
             ComicHelper.Load(item, ComicList);
         }
     }
 }
        private async Task LoadImage(int comicNumber = 0)
        {
            lblLoading.Content = "loading image....";
            btnNext.IsEnabled  = true;
            ComicHelper comicHelper = new ComicHelper();

            var comic = await comicHelper.LoadComicImage(comicNumber);

            lblLoading.Content = "";

            if (comicNumber == 0 || comicNumber == MaxComicNumber)
            {
                MaxComicNumber    = comic.Num;
                btnNext.IsEnabled = false;
            }
            currentComicNumber = comic.Num;

            var uriSource = new Uri(comic.Img, UriKind.Absolute);

            comicImage.Source = new BitmapImage(uriSource);
        }