aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests/BasicTests.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-06 17:48:03 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-08-06 17:48:03 +0200
commitc45ce80e0e4298afcbeee9215ee2d1d30c4c3be8 (patch)
treeec659a28153b9df8406736d9f8df6ee255b8cb7e /Tests/BasicTests.cs
parentf42cabddc008529eddc0a43cad3be2b39b6790ee (diff)
* Crow.csproj:
* Label.cs: update * GraphicObject.cs: key up * ListBox.cs: IMLStream instanciing * PrivateContainer.cs: Clear child Changes * Scroller.cs: scroller have VerticalSrcrolling by default * TemplatedControl.cs: remove unused hostClass attribute * IMLStream.cs: IMLStream instance and source properties * Interface.cs: removed unused hostClass Only putOnTop Window widget when focused KeyboardState key up and down * TreeView.crow: no border in default template * BasicTests.cs: IMLEditor PropLessBinding test * Tests.csproj: * 2.crow: * 0.crow: * test5.crow: * 2.crow: * testTreeView.crow: update tests * Bindings.cs: * MemberReference.cs: * CompilerServices.cs: property less bindings debug
Diffstat (limited to 'Tests/BasicTests.cs')
-rw-r--r--Tests/BasicTests.cs35
1 files changed, 34 insertions, 1 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index 0c515aa6..2a82bd23 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -70,6 +70,16 @@ namespace Tests
}
get { return testList; }
}
+ string curSources = "";
+ public string CurSources {
+ get { return curSources; }
+ set {
+ if (value == curSources)
+ return;
+ curSources = value;
+ NotifyValueChanged ("CurSources", curSources);
+ }
+ }
#endregion
void OnClear (object sender, MouseButtonEventArgs e) => TestList = null;
@@ -113,6 +123,10 @@ namespace Tests
GraphicObject w = CrowInterface.LoadInterface ("Interfaces/Divers/testWindow2.goml");
w.DataSource = this;
return;
+ }else if (e.Key == OpenTK.Input.Key.F6) {
+ GraphicObject w = CrowInterface.LoadInterface ("Interfaces/Divers/imlEditor.crow");
+ w.DataSource = this;
+ return;
} else if (e.Key == OpenTK.Input.Key.F2)
idx--;
else if (e.Key == OpenTK.Input.Key.F3)
@@ -131,7 +145,20 @@ namespace Tests
GraphicObject obj = CrowInterface.LoadInterface(testFiles[idx]);
obj.DataSource = this;
}
-
+ void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
+ {
+ FileInfo fi = e.NewValue as FileInfo;
+ if (fi == null)
+ return;
+ if (fi.Extension == ".crow" || fi.Extension == ".goml") {
+ IMLStream imls = new IMLStream (fi.FullName);
+ lock (CrowInterface.UpdateMutex) {
+ (CrowInterface.FindByName ("crowContainer") as Container).SetChild
+ (imls.Instance);
+ CurSources = imls.Source;
+ }
+ }
+ }
void onButClick(object send, MouseButtonEventArgs e)
{
Console.WriteLine ("button clicked:" + send.ToString());
@@ -150,5 +177,11 @@ namespace Tests
BasicTests win = new BasicTests ();
win.Run (30);
}
+ protected override void OnUpdateFrame (OpenTK.FrameEventArgs e)
+ {
+ base.OnUpdateFrame (e);
+ string test = e.Time.ToString ();
+ NotifyValueChanged ("PropertyLessBinding", test);
+ }
}
}