aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests/BasicTests.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-01 13:50:55 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-08-01 13:50:55 +0200
commitdb2c28d9ca9f69b4bf181d2360df139dcf617324 (patch)
tree5548089533afa528f7a8f0d56c514dab3e981e50 /Tests/BasicTests.cs
parentab038cf43805cc3aa071ae2ecbf3fa011fd3a6ca (diff)
use RegisterForRedraw when applicable
Diffstat (limited to 'Tests/BasicTests.cs')
-rw-r--r--Tests/BasicTests.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index 231a5afa..e75ed01d 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -79,7 +79,7 @@ namespace Tests
this.KeyDown += KeyboardKeyDown1;
testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
- //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray ();
+ testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
//testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/basicTests", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
@@ -101,16 +101,24 @@ namespace Tests
TestList.Add ("new string");
NotifyValueChanged ("TestList", TestList);
return;
- } else if (e.Key == OpenTK.Input.Key.F2) {
+ } else if (e.Key == OpenTK.Input.Key.F4) {
GraphicObject w = CrowInterface.LoadInterface ("Interfaces/Divers/testWindow.goml");
w.DataSource = this;
return;
- } else if (e.Key != OpenTK.Input.Key.F3)
+ } else if (e.Key == OpenTK.Input.Key.F2)
+ idx--;
+ else if (e.Key == OpenTK.Input.Key.F3)
+ idx++;
+ else
return;
+
CrowInterface.ClearInterface ();
- idx++;
+
if (idx == testFiles.Length)
idx = 0;
+ else if (idx < 0)
+ idx = testFiles.Length - 1;
+
this.Title = testFiles [idx] + ". Press <F3> to cycle examples.";
GraphicObject obj = CrowInterface.LoadInterface(testFiles[idx]);
obj.DataSource = this;