/// <summary> /// Get the next image in the list /// </summary> /// <returns></returns> public System.Drawing.Image GetNextImage() { currentImage = BootedPictures.Current; if (BootedPictures.Count > 1) { while (pictureEnumerator.MoveNext() && currentImage != null && currentImage.Equals(pictureEnumerator.Current)) { ; } BootedPictures.AddNext((Picture)pictureEnumerator.Current); } return(currentImage.Image); //return null; }
/// <summary> /// Get the previous image viewed. /// </summary> /// <returns></returns> public System.Drawing.Image GetPreviousImage() { currentImage = BootedPictures.Current; if (BootedPictures.Count > 1) { while (pictureEnumerator.MovePrevious() && currentImage != null && currentImage.Equals(pictureEnumerator.Current)) { ; } BootedPictures.AddNext((Picture)pictureEnumerator.Current); } return(currentImage.Image); /* * if (pictureEnumerator.MovePrevious()) * { * currentImage = BootedPictures.Current; * Picture p = new Picture(BootedPictures.Current.Name); * BootedPictures.AddNext(pictureEnumerator.GetIndex(p, LIMITS)); * return currentImage.Image; * } * return null;*/ }