2005-09-29 Jonathan Chambers <jonathan.chambers@ansys.com>
authorJonathan Chambers <joncham@gmail.com>
Fri, 30 Sep 2005 02:33:13 +0000 (02:33 -0000)
committerJonathan Chambers <joncham@gmail.com>
Fri, 30 Sep 2005 02:33:13 +0000 (02:33 -0000)
        * GridItem.cs: Fixed TODOs
        * GridItemCollection.cs: Added ICollection interface

svn path=/trunk/mcs/; revision=51021

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridItem.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridItemCollection.cs

index 938655852e87329a0743533eb0ac8625656a3794..91865b666ac778717cc9fc5fd17fb67b6ba5512b 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-29  Jonathan Chambers <jonathan.chambers@ansys.com>
+       * GridItem.cs: Fixed TODOs
+       * GridItemCollection.cs: Added ICollection interface
+
 2005-09-30  Kornél Pál  <kornelpal@hotmail.com>
 
        * ImageList.cs: Resize icons when needed.
index 935ebddb715a36f602e3229a265c39766df99258..246ec173cf8e5048c24ad509c1bf93a971a857e2 100644 (file)
@@ -32,29 +32,34 @@ namespace System.Windows.Forms
 {
        public abstract class GridItem
        {
+
+               #region Fields
+               private bool expanded;
+               #endregion Fields
+
                #region Constructors
-               protected GridItem() {
+               protected GridItem() 
+               {
+                       expanded = false;
                }
                #endregion      // Constructors
 
                #region Public Instance Properties
-               [MonoTODO]
-               public virtual new bool Expandable
+               public virtual bool Expandable
                {
                        get {
-                               throw new NotImplementedException();
+                               return GridItems.Count > 1;
                        }
                }
 
-               [MonoTODO]
-               public virtual new bool Expanded
+               public virtual bool Expanded
                {
                        get {
-                               throw new NotImplementedException();
+                               return expanded;
                        }
 
                        set {
-                               throw new NotImplementedException();
+                               expanded = value;
                        }
                }
 
index fea1cb43d11e6bb9897057a31b794755d18fde37..e6c6a8069ec39e2ebd65afaab2cfa1d3a1761315 100644 (file)
@@ -30,7 +30,7 @@ using System.Collections;
 
 namespace System.Windows.Forms
 {
-       public class GridItemCollection : IEnumerable
+       public class GridItemCollection : IEnumerable, ICollection
        {
                #region Local Variables
                private System.Collections.SortedList list;
@@ -112,5 +112,30 @@ namespace System.Windows.Forms
                        }
                }
                #endregion
+
+               #region ICollection Members
+
+               public bool IsSynchronized
+               {
+                       get
+                       {
+                               return list.IsSynchronized;
+                       }
+               }
+
+               public void CopyTo(Array array, int index)
+               {
+                       list.CopyTo(array, index);
+               }
+
+               public object SyncRoot
+               {
+                       get
+                       {
+                               return list.SyncRoot;
+                       }
+               }
+
+               #endregion
        }
 }