2012-10-05 11:11:31 +00:00
using System.Collections.Specialized ;
2012-10-05 11:19:08 +00:00
using System.Linq ;
2012-10-05 11:11:31 +00:00
using System.ComponentModel ;
2012-10-05 11:27:02 +00:00
using ANX.Framework.NonXNA.Development ;
2012-10-05 11:11:31 +00:00
namespace ANX.Framework.Content.Pipeline.Tasks
{
/// <summary>
/// Class for enabling a dropdown list containing all available Importers for the PropertyGrid.
/// </summary>
2012-10-05 11:27:02 +00:00
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
2012-10-05 11:11:31 +00:00
public class ImporterConverter : StringConverter
{
public override bool GetStandardValuesSupported ( ITypeDescriptorContext context )
{
//Show comboBox
return true ;
}
public override bool GetStandardValuesExclusive ( ITypeDescriptorContext context )
{
//Non editable list
return true ;
}
public override StandardValuesCollection GetStandardValues ( ITypeDescriptorContext context )
{
2012-10-05 11:19:08 +00:00
var iManager = new ImporterManager ( ) ; //<- No, thats not a new apple product :-)
return new StandardValuesCollection ( iManager . AvailableImporters . Select ( availableImporter = > availableImporter . Key ) . ToArray ( ) ) ; //TODO: Implement correct call to get available Importers
2012-10-05 11:11:31 +00:00
}
}
}