Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.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
- RemotingConfiguration.cs
- SqlMetaData.cs
- DataServiceQueryContinuation.cs
- SettingsPropertyNotFoundException.cs
- MemberCollection.cs
- Image.cs
- DynamicDataExtensions.cs
- PageOutputQuality.cs
- OdbcConnectionPoolProviderInfo.cs
- OdbcEnvironment.cs
- TrackBarRenderer.cs
- wgx_sdk_version.cs
- WebConfigurationHostFileChange.cs
- HybridDictionary.cs
- UnSafeCharBuffer.cs
- XXXInfos.cs
- TextBounds.cs
- RtfControls.cs
- AuthorizationSection.cs
- HtmlInputPassword.cs
- DbProviderFactories.cs
- NamedPipeHostedTransportConfiguration.cs
- FixedPageProcessor.cs
- EventWaitHandle.cs
- COM2IDispatchConverter.cs
- CorrelationQueryBehavior.cs
- PrintController.cs
- IPPacketInformation.cs
- ToolboxDataAttribute.cs
- Opcode.cs
- HttpModuleAction.cs
- XamlContextStack.cs
- InternalCache.cs
- ManagementNamedValueCollection.cs
- SqlFormatter.cs
- ListManagerBindingsCollection.cs
- EventLog.cs
- WebBrowserUriTypeConverter.cs
- SharedStatics.cs
- WindowsListViewScroll.cs
- GiveFeedbackEvent.cs
- PaintEvent.cs
- XmlDeclaration.cs
- DatePicker.cs
- RepeaterItem.cs
- DataGridTablesFactory.cs
- DocumentScope.cs
- DesignConnection.cs
- MailSettingsSection.cs
- TransformDescriptor.cs
- Win32SafeHandles.cs
- AliasedExpr.cs
- DataColumnSelectionConverter.cs
- HtmlInputRadioButton.cs
- XhtmlBasicLabelAdapter.cs
- StandardBindingImporter.cs
- TextFormatterImp.cs
- TreeNodeStyle.cs
- TranslateTransform.cs
- ParallelRangeManager.cs
- SymbolEqualComparer.cs
- ProxyElement.cs
- Pen.cs
- HttpRawResponse.cs
- MemoryMappedFileSecurity.cs
- OdbcFactory.cs
- HtmlInputImage.cs
- ComPersistableTypeElementCollection.cs
- HttpApplicationFactory.cs
- SqlTriggerContext.cs
- DataSourceProvider.cs
- MultiSelector.cs
- Rotation3DAnimationBase.cs
- ConcurrentDictionary.cs
- MembershipSection.cs
- QilPatternVisitor.cs
- XmlTypeAttribute.cs
- BevelBitmapEffect.cs
- DTCTransactionManager.cs
- HandlerBase.cs
- Walker.cs
- brushes.cs
- XmlSchemaSimpleTypeRestriction.cs
- BamlResourceDeserializer.cs
- ToolboxBitmapAttribute.cs
- shaperfactory.cs
- SqlDesignerDataSourceView.cs
- ValidatedControlConverter.cs
- ActivationArguments.cs
- EntityRecordInfo.cs
- HyperLinkStyle.cs
- DesignerVerb.cs
- EmptyStringExpandableObjectConverter.cs
- KnowledgeBase.cs
- WindowsToolbar.cs
- SymbolTable.cs
- TrustManagerPromptUI.cs
- MarkupProperty.cs
- Rectangle.cs
- ListenDesigner.cs