Content Pipeline:
- Added BuildModeConverter to make Debug/Release mode selectable in PropertyGrids - Added ConverterAttribute to ContentProject
This commit is contained in:
parent
be01038e1f
commit
9d997dd43d
@ -184,6 +184,7 @@
|
||||
<Compile Include="TargetPlatform.cs" />
|
||||
<Compile Include="Tasks\BuildContent.cs" />
|
||||
<Compile Include="Tasks\BuildItem.cs" />
|
||||
<Compile Include="Tasks\BuildModeConverter.cs" />
|
||||
<Compile Include="Tasks\ContentProject.cs" />
|
||||
<Compile Include="Tasks\ImporterConverter.cs" />
|
||||
<Compile Include="Tasks\ImporterManager.cs" />
|
||||
|
36
ANX.Framework.Content.Pipeline/Tasks/BuildModeConverter.cs
Normal file
36
ANX.Framework.Content.Pipeline/Tasks/BuildModeConverter.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA.Development;
|
||||
|
||||
namespace ANX.Framework.Content.Pipeline.Tasks
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for enabling a dropdown list containing all available Processors for the PropertyGrid.
|
||||
/// </summary>
|
||||
[Developer("SilentWarrior/Eagle Eye Studios")]
|
||||
[PercentageComplete(100)]
|
||||
[TestState(TestStateAttribute.TestState.Tested)]
|
||||
public class BuildModeConverter : 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)
|
||||
{
|
||||
var buildModes = new List<string> {"Debug", "Release"};
|
||||
return new StandardValuesCollection(buildModes);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
@ -29,12 +30,14 @@ namespace ANX.Framework.Content.Pipeline.Tasks
|
||||
/// <summary>
|
||||
/// Major version of the project format
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public int VersionMajor { get { return 1; } }
|
||||
|
||||
/// <summary>
|
||||
/// Minor version of the project format.
|
||||
/// Used to keep backwards compatibility
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public int VersionMinor { get { return 2; } } //before you commit your changes, please increase this value by one (and if you added stuff, please check the version before you read anything out of a file).
|
||||
|
||||
/// <summary>
|
||||
@ -81,6 +84,7 @@ namespace ANX.Framework.Content.Pipeline.Tasks
|
||||
/// <summary>
|
||||
/// The configuration. Can be "Debug" or "Release".
|
||||
/// </summary>
|
||||
[TypeConverter(typeof(BuildModeConverter))]
|
||||
public String Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user