private async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; var uriSourve = new Uri(comic.Img, UriKind.Absolute); }
public async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; var uriSource = new Uri(comic.Img, UriKind.Absolute); comicImage.Source = new BitmapImage(uriSource, new RequestCachePolicy(RequestCacheLevel.CacheIfAvailable)); }
private async Task LoadComic(int comicNumber = 0) { var comic = await ComicProcessor.LoadComic(comicNumber); if (comicNumber == 0) { _maxNum = comicNumber; } _curNum = comicNumber; var uriImgSource = new Uri(comic.Img, UriKind.Absolute); imgComic.Source = new BitmapImage(uriImgSource); }
private async Task LoadComic(int comicNumber = 0) { var comic = await ComicProcessor.LoadComic(comicNumber); if (comicNumber == 0) { _maxNum = comicNumber; } _curNum = comicNumber; var uriImgSource = new Uri(comic.Img, UriKind.Absolute); pbComicImg.ImageLocation = uriImgSource.ToString();// = new BitmapImage(uriImgSource); }
private async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; var uriSource = new Uri(comic.Img, UriKind.Absolute); pictureBox1.ImageLocation = uriSource.ToString(); }
private async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { MaxNumber = comic.Num; } CurrentNumber = comic.Num; var uriSource = new Uri(comic.Img, UriKind.Absolute); comicImage.Source = new BitmapImage(uriSource); }
public async Task <ViewResult> Index() { APIHelper.InitializeClient(); int id = 0; ComicModel comic = await ComicProcessor.LoadComic(id); currentNumber = comic.Num; maxNumber = currentNumber; ViewBag.Id = currentNumber; comic.btnNextDisabled = true; comic.btnPrevDisabled = false; return(View(comic)); }
private async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { _maxNumber = comic.Num; } _currentNumber = comic.Num; var uriSource = new Uri(comic.Img, UriKind.Absolute); // Creates a bitmap image to be placed in the WPF based off the image url comicImage.Source = new BitmapImage(uriSource); }
private async Task LoadImage(int imageNumber = 0) { // call our API var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; // apply image to interface var uriSource = new Uri(comic.Img, UriKind.Absolute); comicImage.Source = new BitmapImage(uriSource); }
private async Task LoadImage(int imageNumber = 0) { //loads image var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; //grab the uri say its absolute and put it into the source var uriSource = new Uri(comic.Img, UriKind.Absolute); comicImage.Source = new BitmapImage(uriSource); }
private async Task LoadImage(int imageNumber = 0) { var comic = await ComicProcessor.LoadComic(imageNumber); if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; if (currentNumber > 0) { btnPrev.Enabled = true; } var uriSource = new Uri(comic.Img, UriKind.Absolute); pictureBox1.Load(uriSource.AbsoluteUri); }
public async Task <ViewResult> LoadImage(int id = 0) { if (id > maxNumber) { currentNumber = 0; } else { currentNumber = id; } ComicModel comic = await ComicProcessor.LoadComic(currentNumber); switch (currentNumber) { case 0: comic.btnNextDisabled = true; comic.btnPrevDisabled = false; break; case 1: comic.btnNextDisabled = false; comic.btnPrevDisabled = true; break; default: comic.btnNextDisabled = false; comic.btnPrevDisabled = false; break; } ViewBag.Id = currentNumber; return(View(comic)); }
private async Task LoadImage(int imageNumber = 0) { ComicModel comic = new ComicModel(); try { comic = await ComicProcessor.LoadComic(imageNumber); } catch (Exception) { MessageBox.Show("Error!", "ComicProcessor"); } if (imageNumber == 0) { maxNumber = comic.Num; } currentNumber = comic.Num; var uriSource = new Uri(comic.Img, UriKind.Absolute); pictureBox1.ImageLocation = uriSource.AbsoluteUri; }
private async Task LoadImage(int imageNumber) { comics.Add(await ComicProcessor.LoadComic(imageNumber)); }