diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-06 22:48:20 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-06 22:49:34 +0100 |
| commit | bf1c5457f87dbe1a30693f18c1599bd3fd1dd860 (patch) | |
| tree | 07ff96c598722d82507cc1bf388aeb44b3caf6b8 /src | |
| parent | f6418d2a9219a63116ba706cbf54d8c0e8d88bff (diff) | |
divers
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/Container.cs | 9 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 5 | ||||
| -rw-r--r-- | src/GraphicObjects/ListBox.cs | 9 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs index cb6145a8..58512a08 100644 --- a/src/GraphicObjects/Container.cs +++ b/src/GraphicObjects/Container.cs @@ -3,6 +3,7 @@ using System.Xml.Serialization; using System.Reflection; using System.ComponentModel; using System.Linq; +using System.Threading; namespace Crow { @@ -50,11 +51,11 @@ namespace Crow return; Type t = Type.GetType("Crow." + subTree.Name); - GraphicObject go = (GraphicObject)Activator.CreateInstance(t); + GraphicObject go = (GraphicObject)Activator.CreateInstance(t); - (go as IXmlSerializable).ReadXml(subTree); - - SetChild(go); + (go as IXmlSerializable).ReadXml(subTree); + + SetChild(go); subTree.Read();//closing tag } diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index b8b2a38f..8b6ea18f 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -626,7 +626,8 @@ namespace Crow public virtual void RegisterClip(Rectangle clip){ if (CacheEnabled && bmp != null) Clipping.AddRectangle (clip + ClientRectangle.Position); - Parent.RegisterClip (clip + Slot.Position + ClientRectangle.Position); + if (Parent != null) + Parent.RegisterClip (clip + Slot.Position + ClientRectangle.Position); } public bool IsQueueForGraphicUpdate = false; /// <summary> @@ -1516,7 +1517,6 @@ namespace Crow #if DEBUG_LOAD Debug.WriteLine ("ApplyStyle for " + this.ToString ()); #endif - using (StreamReader sr = new StreamReader (s)) { while (!sr.EndOfStream) { string tmp = sr.ReadLine (); @@ -1544,7 +1544,6 @@ namespace Crow Style = stylePath; applyStyle (); } - while (reader.MoveToNextAttribute ()) { if (reader.Name == "Style") continue; diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index 2257e62d..b6e17485 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -149,10 +149,13 @@ namespace Crow //reset size to fit in the dir of the stacking //because _list total size is forced to approx size - if (_gsList.Orientation == Orientation.Horizontal) + if (_gsList.Orientation == Orientation.Horizontal) { page.Width = -1; - else - page.Height = -1; + page.Height = 0; + } else { + page.Height = -1; + page.Width = 0; + } for (int i = (pageNum - 1) * itemPerPage; i < pageNum * itemPerPage; i++) { |