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
- DesignerTransaction.cs
- HttpInputStream.cs
- SchemaMapping.cs
- BasePropertyDescriptor.cs
- KeyTimeConverter.cs
- TextDecorationCollectionConverter.cs
- StoreConnection.cs
- XmlElementAttribute.cs
- IPGlobalProperties.cs
- TableRow.cs
- SafeUserTokenHandle.cs
- XmlLoader.cs
- XamlPathDataSerializer.cs
- ProfileBuildProvider.cs
- TrustLevel.cs
- TranslateTransform3D.cs
- TitleStyle.cs
- PolyBezierSegment.cs
- listitem.cs
- Operators.cs
- RecognizerInfo.cs
- ImageButton.cs
- ToolStripHighContrastRenderer.cs
- AnonymousIdentificationSection.cs
- HandlerWithFactory.cs
- StyleBamlTreeBuilder.cs
- ToolStripActionList.cs
- FrameworkPropertyMetadata.cs
- Timer.cs
- LinqDataSourceContextEventArgs.cs
- Config.cs
- ConnectionsZone.cs
- BaseValidatorDesigner.cs
- cache.cs
- MediaEntryAttribute.cs
- XmlDocument.cs
- COM2ICategorizePropertiesHandler.cs
- XmlNodeList.cs
- XmlNodeWriter.cs
- PixelFormat.cs
- XmlSchemaProviderAttribute.cs
- _Rfc2616CacheValidators.cs
- CodeAccessSecurityEngine.cs
- Literal.cs
- ResourceExpressionEditor.cs
- PagePropertiesChangingEventArgs.cs
- GPStream.cs
- CommandDevice.cs
- EventProvider.cs
- ChameleonKey.cs
- TraceHandlerErrorFormatter.cs
- MethodToken.cs
- IdlingCommunicationPool.cs
- SamlDelegatingWriter.cs
- DocumentAutomationPeer.cs
- LayoutUtils.cs
- MethodRental.cs
- StrongName.cs
- OrderingQueryOperator.cs
- RegionIterator.cs
- TextEditorMouse.cs
- SimpleWorkerRequest.cs
- AttachedAnnotation.cs
- MarkupCompilePass2.cs
- ArraySet.cs
- bindurihelper.cs
- ClientRuntime.cs
- Zone.cs
- SplineKeyFrames.cs
- Win32KeyboardDevice.cs
- Variant.cs
- SmiEventSink_Default.cs
- ProcessHostFactoryHelper.cs
- UpdateRecord.cs
- HandleCollector.cs
- SystemWebExtensionsSectionGroup.cs
- ListBindingConverter.cs
- DesignerDataConnection.cs
- ListParaClient.cs
- Choices.cs
- _NetworkingPerfCounters.cs
- CodeTypeDeclarationCollection.cs
- ListViewInsertionMark.cs
- List.cs
- EntityViewGenerationConstants.cs
- CodeCompiler.cs
- BuildProviderAppliesToAttribute.cs
- UIElementPropertyUndoUnit.cs
- XmlSchemaAppInfo.cs
- MemoryMappedFileSecurity.cs
- XmlTextReader.cs
- InfocardInteractiveChannelInitializer.cs
- DispatcherHooks.cs
- EdmMember.cs
- WebFormDesignerActionService.cs
- MultipleViewProviderWrapper.cs
- ISCIIEncoding.cs
- wpf-etw.cs
- TabControl.cs
- XmlUtf8RawTextWriter.cs