From 1b1c4fda673aba4b17767af34d58b9e8c218346e Mon Sep 17 00:00:00 2001
From: the_fiddler <the_fiddler@ebc5dd9b-fb1d-0410-b6f8-d24c324e9604>
Date: Sun, 4 May 2008 16:32:11 +0000
Subject: [PATCH] Make ExampleAttribute.Visible a named parameter, that is true
 by default (even for test examples).

---
 Source/Examples/ExampleAttribute.cs       | 3 ++-
 Source/Examples/ExampleLauncher.cs        | 2 +-
 Source/Examples/Tests/GameWindowStates.cs | 2 +-
 Source/Examples/Tests/MathSpeed.cs        | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Source/Examples/ExampleAttribute.cs b/Source/Examples/ExampleAttribute.cs
index b1298b3d..500cc057 100644
--- a/Source/Examples/ExampleAttribute.cs
+++ b/Source/Examples/ExampleAttribute.cs
@@ -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) { }
diff --git a/Source/Examples/ExampleLauncher.cs b/Source/Examples/ExampleLauncher.cs
index 3e46f13c..0efef5d9 100644
--- a/Source/Examples/ExampleLauncher.cs
+++ b/Source/Examples/ExampleLauncher.cs
@@ -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
                     {
diff --git a/Source/Examples/Tests/GameWindowStates.cs b/Source/Examples/Tests/GameWindowStates.cs
index b52b6754..5d81a28d 100644
--- a/Source/Examples/Tests/GameWindowStates.cs
+++ b/Source/Examples/Tests/GameWindowStates.cs
@@ -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));
diff --git a/Source/Examples/Tests/MathSpeed.cs b/Source/Examples/Tests/MathSpeed.cs
index 469b9b7c..7d7da843 100644
--- a/Source/Examples/Tests/MathSpeed.cs
+++ b/Source/Examples/Tests/MathSpeed.cs
@@ -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()