Esempio n. 1
0
        //==========================================================================================
        // Methods
        //==========================================================================================

        /// <summary>
        /// Gets an individual image from the image list.
        /// </summary>
        /// <param name="index">The index of the image to retrieve.</param>
        /// <returns>The requested image.</returns>
        private static Image GetImage(NodeImageIndex index)
        {
            // If we previously tried to initialize the image list and failed, then don't try again.
            // We'll just return null, which is an acceptable value to return.
            if (imageList == null && !bitmapLoadFailed)
            {
                Initialize();
            }

            if (imageList != null)
            {
                return(imageList.Images[(int)index]);
            }

            return(null);
        }
        //==========================================================================================
        // Methods
        //==========================================================================================
        /// <summary>
        /// Gets an individual image from the image list.
        /// </summary>
        /// <param name="index">The index of the image to retrieve.</param>
        /// <returns>The requested image.</returns>
        private static Image GetImage(NodeImageIndex index)
        {
            // If we previously tried to initialize the image list and failed, then don't try again.
            // We'll just return null, which is an acceptable value to return.
            if (imageList == null && !bitmapLoadFailed)
            {
                Initialize();
            }

            if (imageList != null)
            {
                return imageList.Images[(int)index];
            }

            return null;
        }