diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-23 12:51:16 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-23 12:51:16 +0100 |
| commit | a2a18e264a8a2d586f2c058ebb5b2b15b745804e (patch) | |
| tree | 2d64f47263fb3b6ecdc5edad0fca3690fb47efb8 /src/GraphicObjects | |
| parent | 938d7a404ec022a077579a8245e80d6fa5bbb890 (diff) | |
instantiators dictionary no longer static but local to Interface
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/Docker.cs | 10 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedGroup.cs | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/GraphicObjects/Docker.cs b/src/GraphicObjects/Docker.cs index c52c094f..d34e5ba7 100644 --- a/src/GraphicObjects/Docker.cs +++ b/src/GraphicObjects/Docker.cs @@ -35,12 +35,12 @@ namespace Crow static Instantiator instStack, instSplit, instSpacer; #region CTOR static Docker () { - instStack = Instantiator.CreateFromImlFragment(@"<GenericStack Background='Blue' AllowDrop='true' DragEnter='onStackDragEnter'/>"); - instSplit = Instantiator.CreateFromImlFragment(@"<Splitter/>"); - instSpacer = Instantiator.CreateFromImlFragment(@"<GraphicObject Background='Red' IsEnabled='false'/>"); } public Docker () : base () { + instStack = Instantiator.CreateFromImlFragment(CurrentInterface, @"<GenericStack Background='Blue' AllowDrop='true' DragEnter='onStackDragEnter'/>"); + instSplit = Instantiator.CreateFromImlFragment(CurrentInterface, @"<Splitter/>"); + instSpacer = Instantiator.CreateFromImlFragment(CurrentInterface, @"<GraphicObject Background='Red' IsEnabled='false'/>"); } #endregion @@ -196,7 +196,7 @@ namespace Crow return; lock (CurrentInterface.UpdateMutex) { - Splitter splitter = instSplit.CreateInstance<Splitter> (CurrentInterface); + Splitter splitter = instSplit.CreateInstance<Splitter> (); dw.Resizable = false; dw.Left = dw.Top = 0; @@ -204,7 +204,7 @@ namespace Crow Rectangle r; if (mainStack == null) { - mainStack = instStack.CreateInstance<GenericStack> (CurrentInterface); + mainStack = instStack.CreateInstance<GenericStack> (); this.AddChild (mainStack); this.putWidgetOnBottom (mainStack); r = ClientRectangle; diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index 34e4ce07..e0e77fc0 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -133,9 +133,9 @@ namespace Crow this.ClearTemplateBinding(); if (template == null) { - if (!Interface.DefaultTemplates.ContainsKey (this.GetType ().FullName)) + if (!CurrentInterface.DefaultTemplates.ContainsKey (this.GetType ().FullName)) throw new Exception (string.Format ("No default template found for '{0}'", this.GetType ().FullName)); - this.SetChild (CurrentInterface.Load (Interface.DefaultTemplates[this.GetType ().FullName])); + this.SetChild (CurrentInterface.Load (CurrentInterface.DefaultTemplates[this.GetType ().FullName])); }else this.SetChild (template); } diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs index a6f1b151..cf378dbd 100644 --- a/src/GraphicObjects/TemplatedGroup.cs +++ b/src/GraphicObjects/TemplatedGroup.cs @@ -428,7 +428,7 @@ namespace Crow } lock (CurrentInterface.LayoutMutex) { - g = iTemp.CreateInstance(CurrentInterface); + g = iTemp.CreateInstance(); page.AddChild (g); // if (isPaged) g.LogicalParent = this; |