/// <summary> /// Check if we can do command photoUp /// </summary> /// <param name="image">CurrentImage</param> private void ChangePhotoToUp(Image image) { int index = ImageCollection.IndexOf(image); index--; CurrentImage = ImageCollection[index]; }
/// <summary> /// Command PhotoDown method /// </summary> /// <param name="image">CurrentImage</param> /// <returns></returns> private bool CanPhotoUp(Image image) { int index = ImageCollection.IndexOf(image); index--; return(index > -1); }
/// <summary> /// Check if we can do command photoDown /// </summary> /// <param name="image">CurrentImage</param> /// <returns></returns> private bool CanPhotoDown(Image image) { if (image == null) { return(false); } int index = ImageCollection.IndexOf(image); index++; return(index < ImageCollection.Count); }