aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Interface.cs b/src/Interface.cs
index f451dc56..8439c31e 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -630,8 +630,8 @@ namespace Crow
/// <summary>Search a Graphic object in the tree named 'nameToFind'</summary>
public GraphicObject FindByName (string nameToFind)
{
- for (int i = 0; i < GraphicTree.Count; i++) {
- GraphicObject r = GraphicTree[i].FindByName (nameToFind);
+ foreach (GraphicObject w in GraphicTree) {
+ GraphicObject r = w.FindByName (nameToFind);
if (r != null)
return r;
}
@@ -647,8 +647,8 @@ namespace Crow
int bmpSize = Math.Abs (stride) * ClientRectangle.Height;
bmp = new byte[bmpSize];
- for (int i = 0; i < GraphicTree.Count; i++)
- GraphicTree[i].RegisterForLayouting (LayoutingType.All);
+ foreach (GraphicObject g in GraphicTree)
+ g.RegisterForLayouting (LayoutingType.All);
clipping.AddRectangle (clientRectangle);
}