Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / HotSpotCollection.cs / 1 / HotSpotCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.Drawing.Design; using System.Web.UI; using System.Security.Permissions; namespace System.Web.UI.WebControls { ////// [ Editor("System.Web.UI.Design.WebControls.HotSpotCollectionEditor, " + AssemblyRef.SystemDesign, typeof(UITypeEditor)) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class HotSpotCollection : StateManagedCollection { private static readonly Type[] knownTypes = new Type[] { typeof(CircleHotSpot), typeof(RectangleHotSpot), typeof(PolygonHotSpot), }; ///Collection of HotSpots. ////// public HotSpot this[int index] { get { return (HotSpot)((IList)this)[index]; } } ///Returns the HotSpot at a given index. ////// public int Add(HotSpot spot) { return ((IList)this).Add(spot); } ///Adds a HotSpot to the collection. ////// protected override object CreateKnownType(int index) { switch (index) { case 0: return new CircleHotSpot(); case 1: return new RectangleHotSpot(); case 2: return new PolygonHotSpot(); default: throw new ArgumentOutOfRangeException(SR.GetString(SR.HotSpotCollection_InvalidTypeIndex)); } } ///Creates a known type of HotSpot. ////// protected override Type[] GetKnownTypes() { return knownTypes; } ///Returns an ArrayList of known HotSpot types. ////// public void Insert(int index, HotSpot spot) { ((IList)this).Insert(index, spot); } ///Inserts a HotSpot into the collection. ////// protected override void OnValidate(object o) { base.OnValidate(o); if (!(o is HotSpot)) throw new ArgumentException(SR.GetString(SR.HotSpotCollection_InvalidType)); } ///Validates that an object is a HotSpot. ////// public void Remove(HotSpot spot) { ((IList)this).Remove(spot); } ///Removes a HotSpot from the collection. ////// public void RemoveAt(int index) { ((IList)this).RemoveAt(index); } ///Removes a HotSpot from the collection at a given index. ////// protected override void SetDirtyObject(object o) { ((HotSpot)o).SetDirty(); } } }Marks a HotSpot as dirty so that it will record its entire state into view state. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AudioBase.cs
- XPathScanner.cs
- DynamicDiscoSearcher.cs
- BeginEvent.cs
- ChtmlTextWriter.cs
- NegotiateStream.cs
- RijndaelManaged.cs
- RightsManagementPermission.cs
- DeviceContext.cs
- TypeUtil.cs
- ServicesUtilities.cs
- TablePattern.cs
- HtmlInputHidden.cs
- SiteMapHierarchicalDataSourceView.cs
- TypedDataSourceCodeGenerator.cs
- LoginName.cs
- RegexInterpreter.cs
- MethodBuilderInstantiation.cs
- DeferredRunTextReference.cs
- Int16KeyFrameCollection.cs
- BamlLocalizer.cs
- SupportsEventValidationAttribute.cs
- Privilege.cs
- XmlSerializationGeneratedCode.cs
- QuaternionAnimation.cs
- SamlAuthorizationDecisionStatement.cs
- FrameworkElement.cs
- PermissionSet.cs
- XPathArrayIterator.cs
- PartDesigner.cs
- EntityDataSourceValidationException.cs
- TextMarkerSource.cs
- PolicyVersionConverter.cs
- MonthChangedEventArgs.cs
- XmlChildEnumerator.cs
- EmbeddedMailObjectsCollection.cs
- AssemblyFilter.cs
- DecimalConverter.cs
- Single.cs
- CheckBoxField.cs
- TraceFilter.cs
- GPStream.cs
- DefaultProxySection.cs
- Synchronization.cs
- Model3DCollection.cs
- Journal.cs
- ADRoleFactory.cs
- NameValueSectionHandler.cs
- Helpers.cs
- WorkflowWebHostingModule.cs
- SplineQuaternionKeyFrame.cs
- COM2ExtendedUITypeEditor.cs
- OutKeywords.cs
- CompilerParameters.cs
- odbcmetadatacollectionnames.cs
- TextOptionsInternal.cs
- FileVersionInfo.cs
- XPathSelectionIterator.cs
- LabelExpression.cs
- ProfilePropertyNameValidator.cs
- RegexTypeEditor.cs
- UrlMappingsModule.cs
- IndexedEnumerable.cs
- SymmetricKey.cs
- HttpPostedFileBase.cs
- SharedUtils.cs
- Journaling.cs
- SqlInfoMessageEvent.cs
- StyleSelector.cs
- AudioBase.cs
- ProfilePropertyMetadata.cs
- CellPartitioner.cs
- DataListItemCollection.cs
- ReadContentAsBinaryHelper.cs
- NewExpression.cs
- SchemaImporterExtensionElementCollection.cs
- PerspectiveCamera.cs
- HttpException.cs
- OleDbErrorCollection.cs
- xdrvalidator.cs
- DataRelationPropertyDescriptor.cs
- ConfigurationCollectionAttribute.cs
- StagingAreaInputItem.cs
- FixedSOMLineCollection.cs
- ScopelessEnumAttribute.cs
- SchemaCollectionPreprocessor.cs
- unsafeIndexingFilterStream.cs
- CodeStatement.cs
- DiscoveryInnerClientAdhoc11.cs
- ResponseBodyWriter.cs
- TextElementEnumerator.cs
- ValidatorCompatibilityHelper.cs
- RowToFieldTransformer.cs
- DataSet.cs
- StatusBarAutomationPeer.cs
- ConfigXmlText.cs
- NativeMethods.cs
- LockedHandleGlyph.cs
- HistoryEventArgs.cs
- DataGridPagerStyle.cs