//Constructor: public AllPatientImages() { indexImage = 0; allImages = new List <GroupImages>(); allImages.Add(new GroupImages()); currentGroupImages = allImages[allImages.Count - 1]; }
public static void addImage(Image img) { img = resizeImageCorrectly(img); indexImage++; currentGroupImages.addImage(img); if (!currentGroupImages.canAddImage()) { allImages.Add(new GroupImages()); currentGroupImages = allImages[allImages.Count - 1]; } }
public static void removeImage() { if (!currentGroupImages.canRemoveImage() && allImages.Count != 1) { allImages.RemoveAt(allImages.Count - 1); currentGroupImages = allImages[allImages.Count - 1]; currentGroupImages.removeImage(); indexImage--; } else if (currentGroupImages.canRemoveImage()) { currentGroupImages.removeImage(); indexImage--; } }