From ad004bcd3a03e0002f9ce2aae5f3f1da941e9a5a Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Wed, 3 Aug 2016 11:23:09 +0200 Subject: [PATCH] update tests --- Templates/TreeView.crow | 4 +- Tests/BasicTests.cs | 4 +- Tests/GOLIBTest_DirViewer.cs | 10 +- Tests/Interfaces/Unsorted/0.crow | 4 + Tests/Interfaces/Unsorted/test4.1.crow | 98 ------------------- Tests/Interfaces/Unsorted/test6.crow | 2 +- Tests/Interfaces/Unsorted/testDirViewer.crow | 4 +- Tests/Interfaces/Unsorted/testImage.crow | 8 +- Tests/Interfaces/Unsorted/testLabel.crow | 6 -- Tests/Interfaces/Unsorted/testMsgBox.crow | 6 +- .../Unsorted/testOutOfClipUpdate.crow | 2 +- .../Interfaces/Unsorted/testRadioButton2.crow | 15 --- Tests/Interfaces/Unsorted/testTreeView.crow | 2 +- Tests/Tests.csproj | 12 +-- Tests/UIEditor.cs | 59 +++++++++++ 15 files changed, 83 insertions(+), 153 deletions(-) create mode 100755 Tests/Interfaces/Unsorted/0.crow delete mode 100755 Tests/Interfaces/Unsorted/test4.1.crow delete mode 100755 Tests/Interfaces/Unsorted/testLabel.crow delete mode 100755 Tests/Interfaces/Unsorted/testRadioButton2.crow create mode 100644 Tests/UIEditor.cs diff --git a/Templates/TreeView.crow b/Templates/TreeView.crow index 32e3db21..82d2c3e9 100644 --- a/Templates/TreeView.crow +++ b/Templates/TreeView.crow @@ -1,7 +1,7 @@ - + diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index e75ed01d..0733f189 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -79,7 +79,6 @@ 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/GraphicObject", "*.crow")).ToArray (); //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/basicTests", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray (); @@ -88,6 +87,7 @@ namespace Tests testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Expandable", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray (); + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray (); this.Title = testFiles [idx] + ". Press to switch example."; CrowInterface.LoadInterface(testFiles[idx]).DataSource = this; @@ -143,4 +143,4 @@ namespace Tests win.Run (30); } } -} \ No newline at end of file +} diff --git a/Tests/GOLIBTest_DirViewer.cs b/Tests/GOLIBTest_DirViewer.cs index 04e46aa4..f17afb9b 100644 --- a/Tests/GOLIBTest_DirViewer.cs +++ b/Tests/GOLIBTest_DirViewer.cs @@ -19,16 +19,8 @@ using System.Collections.Generic; namespace test2 { - class GOLIBTest_DirViewer : OpenTKGameWindow, IValueChange + class GOLIBTest_DirViewer : OpenTKGameWindow { - #region IValueChange implementation - public event EventHandler ValueChanged; - public void NotifyValueChanged(string name, object value) - { - ValueChanged.Raise (this, new ValueChangeEventArgs (name, value)); - } - #endregion - public GOLIBTest_DirViewer () : base(1024, 600,"test") {} diff --git a/Tests/Interfaces/Unsorted/0.crow b/Tests/Interfaces/Unsorted/0.crow new file mode 100755 index 00000000..4e9fb7f4 --- /dev/null +++ b/Tests/Interfaces/Unsorted/0.crow @@ -0,0 +1,4 @@ + + + - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tests/Interfaces/Unsorted/test6.crow b/Tests/Interfaces/Unsorted/test6.crow index 532450da..aa1f33e8 100755 --- a/Tests/Interfaces/Unsorted/test6.crow +++ b/Tests/Interfaces/Unsorted/test6.crow @@ -1,7 +1,7 @@ - + diff --git a/Tests/Interfaces/Unsorted/testDirViewer.crow b/Tests/Interfaces/Unsorted/testDirViewer.crow index dd6f9b8a..af170947 100755 --- a/Tests/Interfaces/Unsorted/testDirViewer.crow +++ b/Tests/Interfaces/Unsorted/testDirViewer.crow @@ -1,6 +1,6 @@ - + @@ -15,7 +15,7 @@ Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}"> - diff --git a/Tests/Interfaces/Unsorted/testImage.crow b/Tests/Interfaces/Unsorted/testImage.crow index 46ffdcb6..cfa0f113 100755 --- a/Tests/Interfaces/Unsorted/testImage.crow +++ b/Tests/Interfaces/Unsorted/testImage.crow @@ -3,7 +3,7 @@ - + \ No newline at end of file diff --git a/Tests/Interfaces/Unsorted/testLabel.crow b/Tests/Interfaces/Unsorted/testLabel.crow deleted file mode 100755 index 51cf97b6..00000000 --- a/Tests/Interfaces/Unsorted/testLabel.crow +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/Tests/Interfaces/Unsorted/testMsgBox.crow b/Tests/Interfaces/Unsorted/testMsgBox.crow index 680f43b4..95366377 100755 --- a/Tests/Interfaces/Unsorted/testMsgBox.crow +++ b/Tests/Interfaces/Unsorted/testMsgBox.crow @@ -1,4 +1,4 @@  - \ No newline at end of file + + \ No newline at end of file diff --git a/Tests/Interfaces/Unsorted/testOutOfClipUpdate.crow b/Tests/Interfaces/Unsorted/testOutOfClipUpdate.crow index b5e29f4e..5e4e4177 100755 --- a/Tests/Interfaces/Unsorted/testOutOfClipUpdate.crow +++ b/Tests/Interfaces/Unsorted/testOutOfClipUpdate.crow @@ -1,6 +1,6 @@  - + diff --git a/Tests/Interfaces/Unsorted/testRadioButton2.crow b/Tests/Interfaces/Unsorted/testRadioButton2.crow deleted file mode 100755 index 02231d25..00000000 --- a/Tests/Interfaces/Unsorted/testRadioButton2.crow +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/Tests/Interfaces/Unsorted/testTreeView.crow b/Tests/Interfaces/Unsorted/testTreeView.crow index 86bcae88..9504c958 100755 --- a/Tests/Interfaces/Unsorted/testTreeView.crow +++ b/Tests/Interfaces/Unsorted/testTreeView.crow @@ -1,2 +1,2 @@  - \ No newline at end of file + \ No newline at end of file diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 61868849..03b2b281 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -52,7 +52,6 @@ $(SolutionDir)packages\GtkSharp.3.1.3\lib\net45\glib-sharp.dll - glib-sharp-3.0 $(SolutionDir)packages\OpenTK.Next.1.2.2336.6514-pre\lib\net20\OpenTK.dll @@ -69,6 +68,7 @@ + @@ -323,9 +323,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest @@ -347,13 +344,10 @@ PreserveNewest - - PreserveNewest - - + PreserveNewest - + PreserveNewest diff --git a/Tests/UIEditor.cs b/Tests/UIEditor.cs new file mode 100644 index 00000000..b08584d4 --- /dev/null +++ b/Tests/UIEditor.cs @@ -0,0 +1,59 @@ +// +// HelloCube.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2016 jp +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using OpenTK; +using OpenTK.Graphics.OpenGL; +using Crow; + +namespace Tests +{ + class UIEditor : OpenTKGameWindow + { + [STAThread] + static void Main () + { + UIEditor win = new UIEditor (); + win.Run (30); + } + + public UIEditor () + : base(800, 600,"UIEditor") + { + } + + protected override void OnLoad (EventArgs e) + { + base.OnLoad (e); + + CrowInterface.AddWidget( + new Window () + { + Title = "Hello World" + } + ); + } + public override void OnRender (FrameEventArgs e) + { + base.OnRender (e); + } + } +} \ No newline at end of file -- 2.47.3