XSharp.Project.XSharpFileNode.RetrieveImageIndex C# (CSharp) Méthode

RetrieveImageIndex() private méthode

private RetrieveImageIndex ( ) : int
Résultat int
        private int RetrieveImageIndex()
        {
            int ret = -1;
            switch (GetFileType(this.Url))
            {
                case XSharpFileType.SourceCode:
                    ret = XSharpConstants.ImageListIndex.Source;
                    //
                    if (IsFormSubType)
                    {
                        ret = (int)ProjectNode.ImageName.WindowsForm;
                        return ret;
                    }
                    break;
                case XSharpFileType.Header:
                case XSharpFileType.PreprocessorOutput:

                    ret = XSharpConstants.ImageListIndex.Source;
                    break;
                case XSharpFileType.VOForm:
                    ret = XSharpConstants.ImageListIndex.Form;
                    break;
                case XSharpFileType.VOMenu:
                    ret = XSharpConstants.ImageListIndex.Menu;
                    break;
                case XSharpFileType.VODBServer:
                    ret = XSharpConstants.ImageListIndex.Server;
                    break;
                case XSharpFileType.VOFieldSpec:
                    ret = XSharpConstants.ImageListIndex.FieldSpec;
                    break;

            }
            if (ret != -1)
            {
                // Don't forget that we have two Images bitmap,
                // so add the offset retrieved at load time in the project
                ret += XSharpProjectNode.imageOffset;
            }
            //
            return ret;
        }
        static internal XSharpFileType GetFileType(string filename)