/// <summary> /// Sets the images. /// </summary> /// <param name="images">The images.</param> public void SetImages(ImageCollection images) { if (images.Count == 0) { throw new ArgumentOutOfRangeException(); } _images = images; ImagePreviewViewer.Images.AddRange(images.ToArray()); selectedImageNumericUpDown.Maximum = images.Count; ImagePreviewViewer.FocusedIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="ShowAnimationForm"/> class. /// </summary> /// <param name="images">The images that make up the animation.</param> public ShowAnimationForm(ImageCollection images) { InitializeComponent(); animatedImageViewer1.Images.AddRange(images.ToArray()); animatedImageViewer1.FocusedIndex = 0; animatedImageViewer1.Animation = true; animatedImageViewer1.DefaultDelay = (int)defaultDelayNumericUpDown.Value; animatedImageViewer1.DisableAutoScrollToFocusedImage(); stopButton.Enabled = true; startButton.Enabled = false; }