Esempio n. 1
0
        static public int GetFileIconIndex(string filename, string overlayIcon)
        {
            if (mFileTypeManager == null)
            {
                mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
            }

            int returnInt = 0;

            // Make sure this is a full path, if not append the tools directory to it?
            string overlayIconFilename = MOG_ControllerSystem.LocateTool(overlayIcon);

            // Try getting a File Icon
            if (File.Exists(filename) && File.Exists(overlayIconFilename))
            {
                returnInt = mFileTypeManager.AddFileOverlayIcon(filename, "MISSING", overlayIconFilename);
            }

            // If we got the default index, return our Class Icon index
            if (returnInt == 0)
            {
                return(GetAssetIconIndex(filename, null));
            }
            else
            {
                return(returnInt);
            }
        }