From: Jean-Philippe Bruyère Date: Sun, 13 Dec 2020 13:50:43 +0000 (+0100) Subject: test binding X-Git-Tag: v0.9.5-beta~109 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=c2a1e884f9130101939ecc111092abc773b612be;p=jp%2Fcrow.git test binding --- diff --git a/Crow.sln b/Crow.sln index 8f6e3f3d..473cfabc 100644 --- a/Crow.sln +++ b/Crow.sln @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dragNdrop", "Samples\dragNd EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dockableWindows", "Samples\dockableWindows\dockableWindows.csproj", "{E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BindingTest", "Samples\BindingTest\BindingTest.csproj", "{242094B3-A1F1-44F8-B78D-D819B595DDBA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -77,6 +79,10 @@ Global {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Debug|Any CPU.Build.0 = Debug|Any CPU {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Release|Any CPU.ActiveCfg = Release|Any CPU {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Release|Any CPU.Build.0 = Release|Any CPU + {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -90,6 +96,7 @@ Global {7915538F-B2B1-414C-95A3-1FC58E3286B9} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {6E361E34-D266-4BEB-97F4-E209E01C6246} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} + {242094B3-A1F1-44F8-B78D-D819B595DDBA} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {00D4E149-7131-49F4-BAAD-559AA961A78E} diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index c053f2ba..faede56d 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -14,13 +14,10 @@ GUI Widget toolkit Interface C# Net False https://github.com/jpbruyere/Crow/wiki - https://opensource.org/licenses/MIT + MIT crow.png Copyright 2013-2020 - This release is a major step to finaly get a 1.0 version of crow. - A single glfw backend to handle os layers, and NetCore target for samples - to overcome CAS exceptions on windows. True true @@ -32,7 +29,7 @@ full - $(DefineConstants);_DEBUG_LOG;DEBUG;TRACE;DEBUG_LAYOUTING;DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE + $(DefineConstants);_DEBUG_LOG;DEBUG;TRACE;_DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE true diff --git a/Crow/src/DebugUtils/DebugLogger.cs b/Crow/src/DebugUtils/DebugLogger.cs index ecb9dbd1..65e49d53 100644 --- a/Crow/src/DebugUtils/DebugLogger.cs +++ b/Crow/src/DebugUtils/DebugLogger.cs @@ -19,6 +19,7 @@ namespace Crow IFace = 0x10000, Focus = 0x20000, Override = 0x40000, + Binding = 0x80000, Widget = 0x00100, //GOLayouting = 0x00200, //Drawing = 0x00400, diff --git a/Crow/src/IML/CompilerServices.cs b/Crow/src/IML/CompilerServices.cs index 9a1eced6..c1d4edd7 100644 --- a/Crow/src/IML/CompilerServices.cs +++ b/Crow/src/IML/CompilerServices.cs @@ -766,7 +766,7 @@ namespace Crow.IML if (d.Method.Name == delegateName) { eiEvt.RemoveEventHandler (instance, d); #if DEBUG_BINDING - Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName); + Debug.WriteLine ("\tremoveEventHandlerByName: {0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName); #endif } } @@ -785,7 +785,7 @@ namespace Crow.IML if (d.Target == target) { eiEvt.RemoveEventHandler (instance, d); #if DEBUG_BINDING - Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName); + Debug.WriteLine ("\tremoveEventHandlerByTarget: {0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName); #endif } } diff --git a/Crow/src/Widgets/Widget.cs b/Crow/src/Widgets/Widget.cs index ec21a6d6..84e91c56 100644 --- a/Crow/src/Widgets/Widget.cs +++ b/Crow/src/Widgets/Widget.cs @@ -182,12 +182,7 @@ namespace Crow #if DEBUG_LOG internal static List GraphicObjects = new List(); - #endif - - //internal bool isPopup = false; - //public Widget focusParent { - // get { return (isPopup ? LogicalParent : parent) as Widget; } - //} +#endif /// /// interface this widget is bound to, this should not be changed once the instance is created @@ -541,11 +536,11 @@ namespace Crow [DesignCategory ("Divers")][DefaultValue(null)] public virtual string Name { get { - #if DEBUG_LOG +#if DEBUG_LOG return string.IsNullOrEmpty(name) ? this.GetType().Name + GraphicObjects.IndexOf(this).ToString () : name; - #else +#else return name; - #endif +#endif } set { if (name == value) @@ -811,19 +806,6 @@ namespace Crow } } - /// - /// forward mouse events even if an handle is bound - /// - //[DesignCategory ("Behaviour")][DefaultValue (false)] - //public bool ForwardMouseEvents { - // get { return forwardMouseEvents; } - // set { - // if (forwardMouseEvents == value) - // return; - // forwardMouseEvents = value; - // NotifyValueChanged ("ForwardMouseEvents", forwardMouseEvents); - // } - //} bool clearBackground = false; /// /// background fill of the control, maybe solid color, gradient, image, or svg diff --git a/Samples/BindingTest/Program.cs b/Samples/BindingTest/Program.cs index cf19bf26..469e3473 100644 --- a/Samples/BindingTest/Program.cs +++ b/Samples/BindingTest/Program.cs @@ -12,14 +12,16 @@ namespace BindingTest static void Main () { - using (Program app = new Program ()) + using (Program app = new Program ()) { app.Run (); + //DbgLogger.save (app); + } } protected override void OnInitialized () { Load ("#ui.test.crow").DataSource = this; - + TcVCInstance = new TestClassVC (); } diff --git a/Samples/BindingTest/ui/test.crow b/Samples/BindingTest/ui/test.crow index d56524a0..21aa5aa3 100644 --- a/Samples/BindingTest/ui/test.crow +++ b/Samples/BindingTest/ui/test.crow @@ -1,6 +1,6 @@  - - + +