Esempio n. 1
0
                public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
                {
                    ContentFileWrapper wrapper = context != null ? context.Instance as ContentFileWrapper : null;

                    if (wrapper != null && wrapper.file != null)
                    {
                        MonoGameContentProject project = wrapper.file.Project as MonoGameContentProject;
                        if (project != null)
                        {
                            return(new StandardValuesCollection(project.GetProcessorNames()));
                        }
                    }
                    return(new StandardValuesCollection(null));
                }
Esempio n. 2
0
                public override bool IsValid(ITypeDescriptorContext context, object value)
                {
                    if (!(value is string))
                    {
                        return(false);
                    }
                    string             str     = value as string;
                    ContentFileWrapper wrapper = context != null ? context.Instance as ContentFileWrapper : null;

                    if (wrapper != null && wrapper.file != null)
                    {
                        MonoGameContentProject project = wrapper.file.Project as MonoGameContentProject;
                        if (project != null)
                        {
                            return(project.IsProcessorNameValid(str));
                        }
                    }
                    return(false);
                }