/// <summary>
        /// Gets a default animation from shell32.dll.
        /// </summary>
        /// <param name="animation">The animation to get.</param>
        /// <returns>An instance of the <see cref="AnimationResource"/> class representing the specified animation.</returns>
        /// <exception cref="ArgumentOutOfRangeException">The <paramref name="animation"/> parameter was not a value defined in the
        /// <see cref="ShellAnimation"/> enumeration.</exception>
        public static AnimationResource GetShellAnimation(ShellAnimation animation)
        {
            if( !Enum.IsDefined(typeof(ShellAnimation), animation) )
                throw new ArgumentOutOfRangeException("animation");

            return new AnimationResource("shell32.dll", (int)animation);
        }
Beispiel #2
0
        /// <summary>
        /// Gets a default animation from shell32.dll.
        /// </summary>
        /// <param name="animation">The animation to get.</param>
        /// <returns>An instance of the <see cref="AnimationResource"/> class representing the specified animation.</returns>
        /// <exception cref="ArgumentOutOfRangeException">The <paramref name="animation"/> parameter was not a value defined in the
        /// <see cref="ShellAnimation"/> enumeration.</exception>
        public static AnimationResource GetShellAnimation(ShellAnimation animation)
        {
            if (!Enum.IsDefined(typeof(ShellAnimation), animation))
            {
                throw new ArgumentOutOfRangeException("animation");
            }

            return(new AnimationResource("shell32.dll", (int)animation));
        }