From: Jean-Philippe Bruyère Date: Sun, 13 Dec 2020 11:53:08 +0000 (+0100) Subject: binding tests + wip X-Git-Tag: v0.9.5-beta~110 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=8f33514940cfd7dc539ff8a0ca207a029b15a4b9;p=jp%2Fcrow.git binding tests + wip --- diff --git a/Samples/BindingTest/BindingTest.csproj b/Samples/BindingTest/BindingTest.csproj new file mode 100644 index 00000000..ed05c677 --- /dev/null +++ b/Samples/BindingTest/BindingTest.csproj @@ -0,0 +1,8 @@ + + + + + ui.%(Filename)%(Extension) + + + \ No newline at end of file diff --git a/Samples/BindingTest/Program.cs b/Samples/BindingTest/Program.cs new file mode 100644 index 00000000..cf19bf26 --- /dev/null +++ b/Samples/BindingTest/Program.cs @@ -0,0 +1,38 @@ +// Copyright (c) 2013-2020 Jean-Philippe Bruyère +// +// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) +using System; +using System.Runtime.CompilerServices; +using Crow; + +namespace BindingTest +{ + class Program : SampleBase + { + + static void Main () + { + using (Program app = new Program ()) + app.Run (); + } + + protected override void OnInitialized () + { + Load ("#ui.test.crow").DataSource = this; + + } + + + void setDataSourceNull (object sender, MouseButtonEventArgs e) + { + TcVCInstance = null; + Console.WriteLine ("set data source null"); + } + void setDataSourceThis (object sender, MouseButtonEventArgs e) + { + TcVCInstance = new TestClassVC () { Prop1 = "instance 1 prop1 value", Prop2 = "instance 1 prop2 value" }; + Console.WriteLine ("set data source not null"); + } + + } +} diff --git a/Samples/BindingTest/ui/test.crow b/Samples/BindingTest/ui/test.crow new file mode 100644 index 00000000..d56524a0 --- /dev/null +++ b/Samples/BindingTest/ui/test.crow @@ -0,0 +1,12 @@ + + + + + +