Code:
/ FX-1434 / FX-1434 / 1.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
- UndoManager.cs
- StylusPoint.cs
- AspNetHostingPermission.cs
- TextLineResult.cs
- InlineObject.cs
- DataGridViewCellValueEventArgs.cs
- XmlObjectSerializerReadContext.cs
- HandleTable.cs
- KnownIds.cs
- GroupItem.cs
- _ListenerAsyncResult.cs
- xdrvalidator.cs
- ClusterUtils.cs
- CodeArrayIndexerExpression.cs
- AdRotatorDesigner.cs
- SnapshotChangeTrackingStrategy.cs
- PageThemeParser.cs
- TextBounds.cs
- WebResponse.cs
- EmptyImpersonationContext.cs
- UserControlBuildProvider.cs
- RowsCopiedEventArgs.cs
- TimeSpan.cs
- UIntPtr.cs
- SdlChannelSink.cs
- DrawingBrush.cs
- DelegatingConfigHost.cs
- ImageMap.cs
- ContentFileHelper.cs
- ApplicationFileParser.cs
- FlowNode.cs
- CustomCategoryAttribute.cs
- ObjectRef.cs
- RenderContext.cs
- ProcessThreadDesigner.cs
- TextElementAutomationPeer.cs
- PageAsyncTask.cs
- TextFormatter.cs
- CreationContext.cs
- WebPartActionVerb.cs
- ICspAsymmetricAlgorithm.cs
- TagPrefixAttribute.cs
- PlanCompiler.cs
- SystemSounds.cs
- CommandEventArgs.cs
- IERequestCache.cs
- BreakRecordTable.cs
- EventLogPermissionEntry.cs
- DtcInterfaces.cs
- SpeechEvent.cs
- InvariantComparer.cs
- ImageIndexConverter.cs
- XmlNullResolver.cs
- DPCustomTypeDescriptor.cs
- RewritingPass.cs
- ListViewInsertionMark.cs
- TextShapeableCharacters.cs
- WindowsIdentity.cs
- WebServiceAttribute.cs
- ChannelFactoryRefCache.cs
- MonikerBuilder.cs
- DoubleAverageAggregationOperator.cs
- Cursor.cs
- UIElementAutomationPeer.cs
- PermissionRequestEvidence.cs
- SocketException.cs
- Merger.cs
- ToolTipService.cs
- PointCollection.cs
- UnitControl.cs
- WindowsListView.cs
- InplaceBitmapMetadataWriter.cs
- NotifyIcon.cs
- GraphicsPathIterator.cs
- WorkflowServiceHostFactory.cs
- QueryCacheManager.cs
- SyntaxCheck.cs
- LogLogRecordEnumerator.cs
- ComContractElement.cs
- GeneralTransformCollection.cs
- TransformPattern.cs
- RelationshipEntry.cs
- ScriptRef.cs
- InvariantComparer.cs
- EmissiveMaterial.cs
- CalendarKeyboardHelper.cs
- HTMLTagNameToTypeMapper.cs
- ServiceMetadataBehavior.cs
- DataView.cs
- UrlAuthFailedErrorFormatter.cs
- versioninfo.cs
- SettingsPropertyCollection.cs
- cookiecontainer.cs
- SamlAttributeStatement.cs
- XmlSchemaSimpleType.cs
- WindowsGraphics2.cs
- TypeUtil.cs
- Errors.cs
- OperationFormatUse.cs
- DataGridViewImageCell.cs