Make ExampleAttribute.Visible a named parameter, that is true by default (even for test examples).
This commit is contained in:
parent
a8eafbd367
commit
5dbf0c100b
4 changed files with 5 additions and 4 deletions
|
@ -14,10 +14,11 @@ namespace Examples
|
|||
public class ExampleAttribute : System.Attribute
|
||||
{
|
||||
string title;
|
||||
bool visible = true;
|
||||
public string Title { get { return title; } internal set { title = value; } }
|
||||
public readonly ExampleCategory Category;
|
||||
public readonly int Difficulty;
|
||||
public readonly bool Visible = true;
|
||||
public bool Visible { get { return visible; } set { visible = value; } }
|
||||
|
||||
public ExampleAttribute(string title, ExampleCategory category)
|
||||
: this(title, category, 0, true) { }
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace Examples
|
|||
////sb.Append(type.Name);
|
||||
//sb.Append(example.Title);
|
||||
|
||||
if (example.Visible && example.Category != ExampleCategory.Test)
|
||||
if (example.Visible)
|
||||
listBox1.Items.Add(new ExampleInfo(type, example));
|
||||
else
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ using OpenTK.Input;
|
|||
|
||||
namespace Examples.Tests
|
||||
{
|
||||
[Example("GameWindow states.", ExampleCategory.Test)]
|
||||
[Example("GameWindow states", ExampleCategory.Test)]
|
||||
public class GameWindowStates : GameWindow
|
||||
{
|
||||
TextureFont font = new TextureFont(new Font(FontFamily.GenericSansSerif, 16.0f));
|
||||
|
|
|
@ -12,7 +12,7 @@ using OpenTK.Math;
|
|||
|
||||
namespace Examples.Tests
|
||||
{
|
||||
[Example("Math speed test", ExampleCategory.Test)]
|
||||
[Example("Math speed test", ExampleCategory.Test, Visible = false)]
|
||||
public class MathSpeed
|
||||
{
|
||||
public static void Main()
|
||||
|
|
Loading…
Reference in a new issue