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
- HMACSHA1.cs
- COAUTHINFO.cs
- ComponentCommands.cs
- TextEditorTables.cs
- StartUpEventArgs.cs
- QueryOperatorEnumerator.cs
- AlphabeticalEnumConverter.cs
- ArgumentOutOfRangeException.cs
- WebResponse.cs
- BamlRecordWriter.cs
- LogicalExpr.cs
- LayoutDump.cs
- SerializationInfoEnumerator.cs
- BufferModeSettings.cs
- UnauthorizedAccessException.cs
- ObjectResult.cs
- GcSettings.cs
- PrintingPermission.cs
- ExceptionRoutedEventArgs.cs
- ScriptingJsonSerializationSection.cs
- Rules.cs
- Rect3DValueSerializer.cs
- XmlAttribute.cs
- SmtpMail.cs
- HelpKeywordAttribute.cs
- Model3D.cs
- StateInitializationDesigner.cs
- Int32AnimationBase.cs
- AuthenticateEventArgs.cs
- XmlReaderSettings.cs
- TextStore.cs
- HttpWrapper.cs
- FontUnitConverter.cs
- ClrPerspective.cs
- TdsEnums.cs
- Processor.cs
- TextEditorTables.cs
- XmlBindingWorker.cs
- AccessText.cs
- SecurityKeyIdentifierClause.cs
- AmbientValueAttribute.cs
- initElementDictionary.cs
- ListControlConvertEventArgs.cs
- Operator.cs
- WebServiceFault.cs
- CqlLexerHelpers.cs
- Assert.cs
- StopStoryboard.cs
- EllipseGeometry.cs
- DataGridViewCellValueEventArgs.cs
- PointAnimationUsingPath.cs
- IncrementalCompileAnalyzer.cs
- ThousandthOfEmRealPoints.cs
- XmlSchemaFacet.cs
- StringSource.cs
- Empty.cs
- XmlCharacterData.cs
- LogManagementAsyncResult.cs
- ToolStripButton.cs
- OdbcReferenceCollection.cs
- PropertyFilter.cs
- ScriptResourceMapping.cs
- RSAOAEPKeyExchangeDeformatter.cs
- OrderablePartitioner.cs
- PkcsMisc.cs
- GatewayDefinition.cs
- WSUtilitySpecificationVersion.cs
- MethodAccessException.cs
- CommandHelper.cs
- RecognizerStateChangedEventArgs.cs
- OneOfScalarConst.cs
- Span.cs
- BuilderPropertyEntry.cs
- TraceHandler.cs
- TCEAdapterGenerator.cs
- CodeObject.cs
- XamlWriter.cs
- WebPartVerbsEventArgs.cs
- smtppermission.cs
- DataGridViewRowsAddedEventArgs.cs
- listitem.cs
- CornerRadiusConverter.cs
- BinaryMessageFormatter.cs
- ISO2022Encoding.cs
- Journal.cs
- SecurityChannel.cs
- EncryptedData.cs
- BitmapMetadataEnumerator.cs
- XamlReaderHelper.cs
- EdmSchemaAttribute.cs
- DataBindingHandlerAttribute.cs
- RowSpanVector.cs
- DESCryptoServiceProvider.cs
- CommandField.cs
- ToolbarAUtomationPeer.cs
- CodeMemberField.cs
- COM2FontConverter.cs
- BinaryCommonClasses.cs
- ClonableStack.cs
- ConsoleKeyInfo.cs