// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
using System.ComponentModel;
using System.Reflection;
namespace System.Web.UI.WebControls
{
- [EditorAttribute ("System.Web.UI.Design.WebControls.HotSpotCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
- [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]\r
+ [EditorAttribute ("System.Web.UI.Design.WebControls.HotSpotCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class HotSpotCollection: StateManagedCollection
{
- private static Type[] _knownTypes = new Type[] {
+ static Type[] _knownTypes = new Type[] {
typeof (CircleHotSpot),
typeof (PolygonHotSpot),
typeof (RectangleHotSpot)
};
- public HotSpot this [int idx] {
- get { return (HotSpot) ((IList)this)[idx]; }
+ public HotSpot this [int index] {
+ get { return (HotSpot) ((IList)this)[index]; }
}
public int Add (HotSpot spot)
return ((IList)this).Add (spot);
}
- protected override object CreateKnownType (int idx)
+ protected override object CreateKnownType (int index)
{
- switch (idx) {
- case 0:
- return new CircleHotSpot ();
- case 1:
- return new PolygonHotSpot ();
- case 2:
- return new RectangleHotSpot ();
+ switch (index) {
+ case 0:
+ return new CircleHotSpot ();
+ case 1:
+ return new PolygonHotSpot ();
+ case 2:
+ return new RectangleHotSpot ();
}
throw new ArgumentOutOfRangeException ("index");
return _knownTypes;
}
- public void Insert (int idx, HotSpot spot)
+ public void Insert (int index, HotSpot spot)
{
- ((IList)this).Insert (idx, spot);
+ ((IList)this).Insert (index, spot);
}
protected override void OnValidate (object o)
((IList)this).Remove (spot);
}
- public void RemoveAt (int idx)
+ public void RemoveAt (int index)
{
- ((IList)this).RemoveAt (idx);
+ ((IList)this).RemoveAt (index);
}
protected override void SetDirtyObject (object o)
- {\r
- HotSpot spot = (HotSpot)o;\r
- spot.SetDirty ();\r
+ {
+ HotSpot spot = (HotSpot)o;
+ spot.SetDirty ();
}
}
}
-#endif