From: jpbruyere Date: Sat, 6 Aug 2016 15:48:03 +0000 (+0200) Subject: * Crow.csproj: X-Git-Tag: v0.4~16 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=c45ce80e0e4298afcbeee9215ee2d1d30c4c3be8;p=jp%2Fcrow.git * 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 --- diff --git a/Crow.csproj b/Crow.csproj index 3f6f6b2d..7dde305f 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -135,6 +135,7 @@ + @@ -227,6 +228,7 @@ + diff --git a/Templates/TreeView.crow b/Templates/TreeView.crow index db6533e3..fe083072 100644 --- a/Templates/TreeView.crow +++ b/Templates/TreeView.crow @@ -1,10 +1,7 @@ - - - - - - + + + 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); + } } } diff --git a/Tests/Interfaces/Divers/2.crow b/Tests/Interfaces/Divers/2.crow index 5b4d9c75..b4a06b68 100755 --- a/Tests/Interfaces/Divers/2.crow +++ b/Tests/Interfaces/Divers/2.crow @@ -10,26 +10,4 @@