From: jpbruyere Date: Wed, 23 Dec 2015 11:41:41 +0000 (+0100) Subject: Group layouting debug (x positionning of children sized with fit) X-Git-Tag: 0.3~98 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=8678a1351e90c94741661a83efefdce8e7493b01;p=jp%2Fcrow.git Group layouting debug (x positionning of children sized with fit) Prevent multiple loading of template and default values while creating XmlSerializer(type) Removed DynamicClass functions, not used for now. Divers debug --- diff --git a/GOLib.csproj b/GOLib.csproj index 652fccc8..35bd69dc 100644 --- a/GOLib.csproj +++ b/GOLib.csproj @@ -46,7 +46,7 @@ bin\Debug - TRACE;DEBUG;__linux__;DEBUG_LOAD_TIME=1 + TRACE;DEBUG;__linux__;DEBUG_LOAD_TIME;DEBUG_LAYOUTING + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/Interfaces/testTypeViewer.goml b/Tests/Interfaces/testTypeViewer.goml index 8055d502..a700993d 100755 --- a/Tests/Interfaces/testTypeViewer.goml +++ b/Tests/Interfaces/testTypeViewer.goml @@ -2,7 +2,7 @@ - diff --git a/Tests/Interfaces/test_Listbox.goml b/Tests/Interfaces/test_Listbox.goml index 9f7645ab..33380cb9 100755 --- a/Tests/Interfaces/test_Listbox.goml +++ b/Tests/Interfaces/test_Listbox.goml @@ -1,22 +1,20 @@  - - + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index e12e092e..d9a5ebc8 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -184,6 +184,9 @@ PreserveNewest + + PreserveNewest + diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 1496e0e5..0374527d 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -23,13 +23,11 @@ namespace go { public class GraphicObject : IXmlSerializable, ILayoutable, IValueChange { - internal List DynamicMethodIds - { - get { return Bindings. - Where(bi=>!string.IsNullOrEmpty(bi.DynMethodId)). - Select (b => b.DynMethodId).ToList (); - } - } + #if DEBUG_LAYOUTING + internal static ulong currentUid = 0; + internal ulong uid = 0; + #endif + internal List Bindings = new List (); #region IValueChange implementation @@ -43,11 +41,22 @@ namespace go #region CTOR public GraphicObject () { + #if DEBUG_LAYOUTING + uid = currentUid; + currentUid++; + #endif + + if (Interface.XmlSerializerInit) + return; + loadDefaultValues (); registerForGraphicUpdate (); } public GraphicObject (Rectangle _bounds) { + if (Interface.XmlSerializerInit) + return; + loadDefaultValues (); Bounds = _bounds; registerForGraphicUpdate (); @@ -531,29 +540,50 @@ namespace go { if (Parent==null) return; - - //Debug.WriteLine ("Layout change: " + this.ToString () + ":" + LastSlots.ToString() + "=>" + Slot.ToString ()); + #if DEBUG_LAYOUTING + Debug.WriteLine ("Layout change: " + this.ToString () + ":" + LastSlots.ToString() + "=>" + Slot.ToString ()); + #endif switch (layoutType) { case LayoutingType.Width: - if (Parent.getBounds ().Width < 0) + if (Parent.getBounds ().Width < 0) { + Group gw = Parent as Group; + if (gw != null) { + if (Slot.Width > gw.maxChildrenWidth) + gw.maxChildrenWidth = Slot.Width; + } this.Parent.RegisterForLayouting ((int)LayoutingType.Width); - else if (Width != 0) //update position in parent + }else if (Width != 0) //update position in parent this.RegisterForLayouting ((int)LayoutingType.X); - if (!(Parent is GenericStack)) - break; - if ((Parent as GenericStack).Orientation == Orientation.Horizontal) + GenericStack gsw = Parent as GenericStack; + if (gsw == null) + break; + if ((Parent as GenericStack).Orientation == Orientation.Horizontal) { +// ulong idx = (ulong)gsw.Children.IndexOf (this); +// if (idx < gsw.stackingUpdateStartIndex) +// gsw.stackingUpdateStartIndex = idx; this.Parent.RegisterForLayouting ((int)LayoutingType.PositionChildren); + } break; case LayoutingType.Height: - if (Parent.getBounds().Height < 0) - this.Parent.RegisterForLayouting((int)LayoutingType.Height); - else if (Height != 0) //update position in parent + if (Parent.getBounds ().Height < 0) { + Group gh = Parent as Group; + if (gh != null) { + if (Slot.Width > gh.maxChildrenHeight) + gh.maxChildrenHeight = Slot.Height; + } + this.Parent.RegisterForLayouting ((int)LayoutingType.Height); + }else if (Height != 0) //update position in parent this.RegisterForLayouting ((int)LayoutingType.Y); - if (!(Parent is GenericStack)) - break; - if ((Parent as GenericStack).Orientation == Orientation.Vertical) + GenericStack gsh = Parent as GenericStack; + if (gsh==null) + break; + if (gsh.Orientation == Orientation.Vertical) { +// ulong idx = (ulong)gsh.Children.IndexOf (this); +// if (idx < gsh.stackingUpdateStartIndex) +// gsh.stackingUpdateStartIndex = idx; this.Parent.RegisterForLayouting ((int)LayoutingType.PositionChildren); + } break; } LayoutChanged.Raise (this, new LayoutChangeEventArgs (layoutType)); @@ -684,7 +714,7 @@ namespace go } /// - /// Interfal drawing context creation on a chached surface limited to slot size + /// Interfal drawing context creation on a cached surface limited to slot size /// this trigger the effective drawing routine protected virtual void UpdateGraphic () { @@ -732,8 +762,7 @@ namespace go #region Keyboard handling public virtual void onKeyDown(object sender, KeyboardKeyEventArgs e){ - if (KeyDown != null) - KeyDown (sender, e); + KeyDown.Raise (sender, e); } #endregion @@ -803,9 +832,14 @@ namespace go public override string ToString () { string tmp =""; + if (Parent != null) tmp = Parent.ToString () + tmp; + #if DEBUG_LAYOUTING + return Name == "unamed" ? tmp + "." + this.GetType ().Name + uid.ToString(): tmp + "." + Name; + #else return Name == "unamed" ? tmp + "." + this.GetType ().Name : tmp + "." + Name; + #endif } #region Binding @@ -855,11 +889,6 @@ namespace go System.Reflection.Emit.Label[] jumpTable = null; System.Reflection.Emit.Label endMethod = new System.Reflection.Emit.Label(); - LocalBuilder lbMemberName = null; - LocalBuilder lbValue = null; - - - #region Retrieve EventHandler parameter type EventInfo ei = targetType.GetEvent ("ValueChanged"); //no dynamic update if ValueChanged interface is not implemented @@ -876,12 +905,8 @@ namespace go args, sourceType,true); - - - il = dm.GetILGenerator(256); - endMethod = il.DefineLabel(); jumpTable = new System.Reflection.Emit.Label[grouped.Length]; for (i = 0; i < grouped.Length; i++) @@ -1162,7 +1187,7 @@ namespace go MemberInfo mi = thisType.GetMember (attName).FirstOrDefault(); if (mi == null) { - Debug.WriteLine (Interface.CurrentGOMLPath + "=>GOML: Unknown attribute in " + thisType.ToString() + " : " + attName); + Debug.WriteLine ("GOML: Unknown attribute in " + thisType.ToString() + " : " + attName); continue; } if (mi.MemberType == MemberTypes.Event) { diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index bf04617d..b2e341da 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -23,6 +23,9 @@ namespace go public event EventHandler ChildrenCleared; #endregion + internal int maxChildrenWidth = 0; + internal int maxChildrenHeight = 0; + bool _multiSelect = false; List children = new List(); @@ -30,9 +33,7 @@ namespace go public virtual List Children { get { return children; } - set { - children = value; - } + set { children = value; } } [XmlAttributeAttribute()][DefaultValue(false)] public bool MultiSelect @@ -128,17 +129,18 @@ namespace go } protected override Size measureRawSize () { - Size tmp = new Size (); - - foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { - tmp.Width = Math.Max (tmp.Width, c.Slot.Right); - tmp.Height = Math.Max (tmp.Height, c.Slot.Bottom); - } - - tmp.Width += 2*Margin; - tmp.Height += 2*Margin; - - return tmp; +// Size tmp = new Size (); +// +// foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { +// tmp.Width = Math.Max (tmp.Width, c.Slot.Right); +// tmp.Height = Math.Max (tmp.Height, c.Slot.Bottom); +// } +// +// tmp.Width += 2*Margin; +// tmp.Height += 2*Margin; +// +// return tmp; + return new Size(maxChildrenWidth + 2 * Margin, maxChildrenHeight + 2 * Margin); } public override void OnLayoutChanges (LayoutingType layoutType) @@ -150,7 +152,7 @@ namespace go case LayoutingType.Width: if (Width < 0) { int crw = ClientRectangle.Width; - foreach (GraphicObject c in Children.Where(ch => ch.Slot.Width != crw && ch.Visible)) + foreach (GraphicObject c in Children.Where(ch => ch.Visible)) c.RegisterForLayouting ((int)LayoutingType.X); } else { foreach (GraphicObject c in Children.Where(ch => ch.Width == 0 && ch.Visible)) @@ -160,7 +162,7 @@ namespace go case LayoutingType.Height: if (Height < 0) { int crh = ClientRectangle.Height; - foreach (GraphicObject c in Children.Where(ch => ch.Slot.Height != crh && ch.Visible)) + foreach (GraphicObject c in Children.Where(ch => ch.Visible)) c.RegisterForLayouting ((int)LayoutingType.Y); } else { foreach (GraphicObject c in Children.Where(ch => ch.Height == 0 && ch.Visible)) diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index 5f1b8eda..1778e340 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -218,7 +218,7 @@ namespace go } } } else - loadTemplate (Interface.Load (template, this, !Interface.DontResoveGOML)); + loadTemplate (Interface.Load (template, this)); //normal xml read diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index 6cc444c5..a412a707 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -96,9 +96,10 @@ namespace go public override void OnLayoutChanges (LayoutingType layoutType) { + base.OnLayoutChanges (layoutType); + switch (layoutType) { - case LayoutingType.Width: - base.OnLayoutChanges (layoutType); + case LayoutingType.Width: if (child != null) { if (child.getBounds ().Width == 0) child.RegisterForLayouting ((int)LayoutingType.Width); @@ -107,7 +108,6 @@ namespace go } break; case LayoutingType.Height: - base.OnLayoutChanges (layoutType); if (child != null) { if (child.getBounds ().Height == 0) child.RegisterForLayouting ((int)LayoutingType.Height); diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index de688d2c..4ab3a362 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -165,7 +165,7 @@ namespace go } } } else - loadTemplate (Interface.Load (template, this, !Interface.DontResoveGOML)); + loadTemplate (Interface.Load (template, this)); //normal xml read diff --git a/src/Interface.cs b/src/Interface.cs index 1b6f2437..7836b903 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -35,12 +35,16 @@ namespace go { public static class Interface { + /// Used to prevent spurious loading of templates + internal static bool XmlSerializerInit = false; + /// keep ressource path for debug msg + internal static string CurrentGOMLPath = ""; + public static int TabSize = 4; public static string LineBreak = "\r\n"; public static bool ReplaceTabsWithSpace = false; /// Allow rendering of interface in development environment public static bool DesignerMode = false; - public static bool DontResoveGOML = false; /// Threshold to catch borders for sizing public static int BorderThreshold = 5; @@ -128,20 +132,12 @@ namespace go public static Type GetTopContainerOfGOMLStream (Stream stream) { string root = "Object"; - string ClassName = ""; stream.Seek (0, SeekOrigin.Begin); using (XmlReader reader = XmlReader.Create (stream)) { while (reader.Read ()) { // first element is the root element if (reader.NodeType == XmlNodeType.Element) { root = reader.Name; - ClassName = reader.GetAttribute ("Class"); - if (!string.IsNullOrEmpty (ClassName)) - break; - if (CurrentGOMLPath.StartsWith ("#")) - ClassName = Path.GetFileNameWithoutExtension (CurrentGOMLPath.Substring (1)); - else - ClassName = Path.GetFileNameWithoutExtension (CurrentGOMLPath); break; } } @@ -149,285 +145,23 @@ namespace go Type t = Type.GetType ("go." + root); - //t = CreateDynamicType (ClassName, t); - stream.Seek (0, SeekOrigin.Begin); return t; } - - - static AssemblyBuilder assemblyBuilder; - static ModuleBuilder moduleBuilder; - - public static void InitDynamicAssembly () - { - AssemblyName an = new AssemblyName ("DynamicGraphicObjects"); - assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly (an, AssemblyBuilderAccess.RunAndSave); - moduleBuilder = assemblyBuilder.DefineDynamicModule ("MainModule"); - } - - public static void TerminateDynamicAssembly () - { - } - - public static CodeCompileUnit CompileUnit; - public static CodeTypeDeclaration GOTypeDecl; - - public static CodeTypeDeclaration GenCodeType (string newTypeName, Type baseType) - { - CompileUnit = new CodeCompileUnit (); - CodeNamespace cns = null; - - int idxLastDot = newTypeName.LastIndexOf ('.'); - string typeName = newTypeName; - if (idxLastDot < 0) - cns = new CodeNamespace ("go"); - else { - typeName = newTypeName.Substring (idxLastDot + 1); - cns = new CodeNamespace (newTypeName.Substring (0, idxLastDot)); - } - CompileUnit.Namespaces.Add (new CodeNamespace ()); - CompileUnit.Namespaces.Add (cns); - CompileUnit.Namespaces [0].Imports.Add (new CodeNamespaceImport ("System")); - CodeTypeDeclaration GOTypeDecl = new CodeTypeDeclaration (typeName); - GOTypeDecl.IsClass = true; - GOTypeDecl.IsPartial = true; - GOTypeDecl.TypeAttributes |= TypeAttributes.Public; - GOTypeDecl.BaseTypes.Add (baseType.Name); - cns.Types.Add (GOTypeDecl); - return GOTypeDecl; - } - - static void GenNewClassFromGOML (string path) - { - string root = null; - string newClassName = ""; - - using (Stream stream = GetStreamFromPath (path)) { - using (XmlReader reader = XmlReader.Create (stream)) { - CodeTypeDeclaration GOTypeDecl = null; - CodeConstructor constructor = null; - - CodeExpression curRef = null; - Type curType = null; - Stack curRefStack = new Stack (); - Stack curTypeStack = new Stack (); - - int arrayIndex = -1; - int localVarCpt = 0; - - while (reader.Read ()) { - switch (reader.NodeType) { - case XmlNodeType.Element: - if (string.IsNullOrEmpty (root)) { - //create the new base class - // first element is the root element - root = reader.Name; - newClassName = reader.GetAttribute ("Class"); - if (string.IsNullOrEmpty (newClassName)) { - if (path.StartsWith ("#")) - newClassName = Path.GetFileNameWithoutExtension (path.Substring (1)); - else - newClassName = Path.GetFileNameWithoutExtension (path); - } - curType = Type.GetType ("go." + root); - - GOTypeDecl = GenCodeType (newClassName, curType); - // Declares a constructor. - constructor = new CodeConstructor (); - constructor.Attributes = MemberAttributes.Public; - GOTypeDecl.Members.Add (constructor); - - curRef = new CodeThisReferenceExpression (); - } else if (reader.Name == "Template") { - }else{ - Type childType = Type.GetType ("go." + reader.Name); - localVarCpt++; - string localVarName = childType.Name + localVarCpt; - constructor.Statements.Add ( - new CodeVariableDeclarationStatement ( - childType, - localVarName, - new CodeObjectCreateExpression (childType) - ) - ); - if (curType == typeof(go.Container) || curType.IsSubclassOf (typeof(go.Container))) { - constructor.Statements.Add ( - new CodeMethodInvokeExpression ( - curRef, - "SetChild", - new CodeVariableReferenceExpression (localVarName) - ) - ); - } else if (curType == typeof(go.Group) || curType.IsSubclassOf (typeof(go.Group))) { - constructor.Statements.Add ( - new CodeMethodInvokeExpression (curRef, "addChild", - new CodeVariableReferenceExpression (localVarName) - ) - ); - } - curTypeStack.Push (curType); - curRefStack.Push (curRef); - curRef = new CodeVariableReferenceExpression (localVarName); - curType = childType; - } - while (reader.MoveToNextAttribute ()) { - string attName = reader.Name; - string attValue = reader.Value; - - if (string.IsNullOrEmpty (attValue)) - continue; - - MemberInfo mi = curType.GetMember (attName).FirstOrDefault (); - if (mi == null) { - Debug.WriteLine (Interface.CurrentGOMLPath + "=>GOML: Unknown attribute in " + curType.ToString () + " : " + attName); - continue; - } - if (mi.MemberType == MemberTypes.Event) { - //TODO: handle events - continue; - } - if (mi.MemberType == MemberTypes.Property) { - PropertyInfo pi = mi as PropertyInfo; - - if (pi.GetSetMethod () == null) { - Debug.WriteLine (Interface.CurrentGOMLPath + "=>GOML: Read only property in " + curType.ToString () + " : " + attName); - continue; - } - - if (attValue.StartsWith("{")) { - if (Interface.DontResoveGOML) - continue; - //binding - if (!attValue.EndsWith("}")) - throw new Exception (string.Format("GOML:Malformed binding: {0}", attValue)); - - string strBinding = attValue.Substring (1, attValue.Length - 2); - - continue; - } - - CodeExpression val = null; - if (pi.PropertyType == typeof(string)) { - val = new CodePrimitiveExpression (attValue); - } else if (pi.PropertyType.IsPrimitive) { - MethodInfo me = pi.PropertyType.GetMethod ("Parse", new Type[] { typeof(string) }); - val = new CodePrimitiveExpression ( - me.Invoke (null, new string[] { attValue })); - } else if (pi.PropertyType.IsEnum || (pi.PropertyType == typeof(go.Color) && Char.IsLetter (attValue [0]))) { - val = new CodeFieldReferenceExpression (new CodeTypeReferenceExpression (pi.PropertyType), attValue); - }else if (pi.PropertyType == typeof(go.Color) || pi.PropertyType == typeof(go.Font)) { - val = new CodeCastExpression(pi.PropertyType, - new CodeMethodInvokeExpression ( - new CodeTypeReferenceExpression (pi.PropertyType), - "Parse", - new CodePrimitiveExpression (attValue) - ) - ); - } else { - val = new CodeMethodInvokeExpression (new CodeTypeReferenceExpression (pi.PropertyType), - "Parse", new CodePrimitiveExpression (attValue)); - - } - constructor.Statements.Add ( - new CodeAssignStatement ( - new CodePropertyReferenceExpression (curRef, attName), - val - ) - ); - } - } - reader.MoveToElement (); - if (reader.IsEmptyElement) { - curType = curTypeStack.Pop (); - curRef = curRefStack.Pop (); - } - break; - case XmlNodeType.EndElement: - if (curTypeStack.Count < 1)//GOML last closing tag - break; - curType = curTypeStack.Pop (); - curRef = curRefStack.Pop (); - if (curType.IsSubclassOf (typeof(go.Container))) - arrayIndex = -1; - break; - } - } - } - } - - - - - GenerateCSharpCode (CompileUnit, path + ".cs"); - } - - static void GenerateCSharpCode (CodeCompileUnit codeBase, string file) - { - CodeDomProvider codeDomProvider = new CSharpCodeProvider (); - //On définit les options de génération de code - CodeGeneratorOptions options = new CodeGeneratorOptions (); - //On demande a ce que le code généré soit dans le même ordre que le code inséré - options.VerbatimOrder = false; - //options.BracingStyle = "C"; - //options.BracingStyle = "C"; - options.ElseOnClosing = true; - options.BlankLinesBetweenMembers = false; - - using (IndentedTextWriter itw = new IndentedTextWriter (new StreamWriter (file, false), "\t")) { - //On demande la génération proprement dite - codeDomProvider.GenerateCodeFromCompileUnit (codeBase, itw, options); - itw.Flush (); - } - Console.WriteLine ("C# code generated: " + file); - } - - public static Type CreateDynamicType (string newTypeName, Type baseType) + public static GraphicObject Load (string path, object hostClass = null) { - if (moduleBuilder == null) - InitDynamicAssembly (); - TypeBuilder tb = moduleBuilder.DefineType (newTypeName - , TypeAttributes.Public | - TypeAttributes.Class | - TypeAttributes.AutoClass | - TypeAttributes.AnsiClass | - TypeAttributes.BeforeFieldInit | - TypeAttributes.AutoLayout - , baseType); - - ConstructorBuilder constructor = tb.DefineDefaultConstructor (MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName); - - ConstructorInfo cn = typeof(XmlRootAttribute).GetConstructor (new Type[] { typeof(string) }); - CustomAttributeBuilder cab = new CustomAttributeBuilder (cn, new object[] { baseType.Name }); - - tb.SetCustomAttribute (cab); - - - - - Type tmp = tb.CreateType (); - //assemblyBuilder.Save ("newAssembly.dll",PortableExecutableKinds.ILOnly,ImageFileMachine.I386); - return tmp; - } - - public static string CurrentGOMLPath; - - public static GraphicObject Load (string path, object hostClass = null, bool resolveGOML = true) - { -// GenNewClassFromGOML (path); -// return null; CurrentGOMLPath = path; using (Stream stream = GetStreamFromPath (path)) { - return Load(stream, GetTopContainerOfGOMLStream(stream), hostClass, resolveGOML); + return Load(stream, GetTopContainerOfGOMLStream(stream), hostClass); } CurrentGOMLPath = ""; } - public static GraphicObject Load (Stream stream, Type type, object hostClass = null, bool resolve = true) + public static GraphicObject Load (Stream stream, Type type, object hostClass = null) { #if DEBUG_LOAD_TIME Stopwatch loadingTime = new Stopwatch (); @@ -439,17 +173,23 @@ namespace go XmlSerializerNamespaces xn = new XmlSerializerNamespaces (); xn.Add ("", ""); + + XmlSerializerInit = true; XmlSerializer xs = new XmlSerializer (type); + XmlSerializerInit = false; result = (GraphicObject)xs.Deserialize (stream); //result.DataSource = hostClass; #if DEBUG_LOAD_TIME + FileStream fs = stream as FileStream; + if (fs!=null) + CurrentGOMLPath = fs.Name; loadingTime.Stop (); - Debug.WriteLine ("GOML Loading ({2}): {0} ticks \t, {1} ms", + Debug.WriteLine ("GOML Loading ({2}->{3}): {0} ticks, {1} ms", loadingTime.ElapsedTicks, loadingTime.ElapsedMilliseconds, - CurrentGOMLPath); + CurrentGOMLPath, result.ToString()); #endif return result; diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 417a70ff..8e8f8a98 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -48,7 +48,9 @@ namespace go } public void ProcessLayouting() { - //Debug.WriteLine ("Layouting => " + this.ToString ()); + #if DEBUG_LAYOUTING + Debug.WriteLine ("Layouting => " + this.ToString ()); + #endif try { GraphicObject.UpdateLayout (LayoutType); } catch (Exception ex) { diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index 0329250a..5fbcd9c1 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -45,12 +45,6 @@ namespace go } #endregion - #if _WIN32 || _WIN64 - public const string rootDir = @"d:\"; - #elif __linux__ - public const string rootDir = @"/mnt/data/"; - #endif - public List GraphicObjects = new List(); public Color Background = Color.Transparent;