// Pedro MartÃnez Juliá <pedromj@gmail.com>
//
-
-#if NET_2_0
-
using System;
using System.Collections;
+using System.ComponentModel;
-namespace System.Windows.Forms {
-
- public class DataGridViewSelectedCellCollection : BaseCollection, IList, ICollection, IEnumerable {
-
- public DataGridViewSelectedCellCollection () {
+namespace System.Windows.Forms
+{
+ [ListBindable (false)]
+ public class DataGridViewSelectedCellCollection : BaseCollection, IList, ICollection, IEnumerable
+ {
+ internal DataGridViewSelectedCellCollection ()
+ {
}
- public bool IsFixedSize {
+ bool IList.IsFixedSize {
get { return base.List.IsFixedSize; }
}
object IList.this [int index] {
- get { return this[index]; }
+ get { return this [index]; }
set { throw new NotSupportedException(); }
}
public DataGridViewCell this [int index] {
- get { return (DataGridViewCell) base.List[index]; }
+ get { return (DataGridViewCell) base.List [index]; }
+ }
+
+ protected override ArrayList List {
+ get { return base.List; }
}
- public int Add (object o) {
- throw new NotSupportedException();
+ int IList.Add (object value)
+ {
+ throw new NotSupportedException ();
+ }
+
+ void IList.Clear ()
+ {
+ Clear ();
}
- public void Clear () {
- throw new NotSupportedException("Cannot clear this base.List");
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ public void Clear ()
+ {
+ throw new NotSupportedException ("Cannot clear this base.List");
}
- public bool Contains (object o) {
- return Contains(o as DataGridViewCell);
+ bool IList.Contains (object value)
+ {
+ return Contains (value as DataGridViewCell);
}
- public bool Contains (DataGridViewCell dataGridViewCell) {
- return base.List.Contains(dataGridViewCell);
+ public bool Contains (DataGridViewCell dataGridViewCell)
+ {
+ return base.List.Contains (dataGridViewCell);
}
- public void CopyTo (DataGridViewCell[] array, int index) {
- base.List.CopyTo(array, index);
+ public void CopyTo (DataGridViewCell [] array, int index)
+ {
+ base.List.CopyTo (array, index);
/*
if (array == null) {
throw new ArgumentNullException("array is null");
*/
}
- public int IndexOf (object o) {
- return base.List.IndexOf(o as DataGridViewCell);
+ int IList.IndexOf (object value)
+ {
+ return base.List.IndexOf (value as DataGridViewCell);
}
- public void Insert (int index, object o) {
- Insert(index, o as DataGridViewCell);
+ void IList.Insert (int index, object value)
+ {
+ Insert (index, value as DataGridViewCell);
}
- public void Insert (int index, DataGridViewCell dataGridViewCell) {
- throw new NotSupportedException("Can't insert to selected cell base.List");
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ public void Insert (int index, DataGridViewCell dataGridViewCell)
+ {
+ throw new NotSupportedException ("Can't insert to selected cell base.List");
}
- public void Remove (object o) {
- throw new NotSupportedException("Can't remove elements of selected cell base.List.");
+ void IList.Remove (object value)
+ {
+ throw new NotSupportedException ("Can't remove elements of selected cell base.List.");
}
- public void RemoveAt (int index) {
- throw new NotSupportedException("Can't remove elements of selected cell base.List.");
+ void IList.RemoveAt (int index)
+ {
+ throw new NotSupportedException ("Can't remove elements of selected cell base.List.");
}
- internal void InternalAdd (DataGridViewCell dataGridViewCell) {
- base.List.Add(dataGridViewCell);
+ internal void InternalAdd (DataGridViewCell dataGridViewCell)
+ {
+ base.List.Add (dataGridViewCell);
}
- internal void InternalRemove (DataGridViewCell dataGridViewCell) {
- base.List.Remove(dataGridViewCell);
+ internal void InternalRemove (DataGridViewCell dataGridViewCell)
+ {
+ base.List.Remove (dataGridViewCell);
}
-
}
-
}
-
-#endif