public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { BaseFileWrapper wrapper = context != null ? context.Instance as BaseFileWrapper : null; if (wrapper != null && wrapper.file != null) { MonoGameContentProject project = wrapper.file.Project as MonoGameContentProject; return(project != null); } return(false); }
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)); }
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); }
public bool SupportsObject(object o) { bool result = false; ProjectFile file = o as ProjectFile; if (file != null) { MonoGameContentProject proj = file.Project as MonoGameContentProject; if (proj != null) { Type processor = proj.Manager.GetProcessorType((string)file.ExtendedProperties["Processor"]); if (processor != null && processor.Equals(typeof(TextureProcessor))) { result = true; } } } return(result); }