Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. //------------------------------------------------------------------------------ //Marks a HotSpot as dirty so that it will record its entire state into view state. ///// 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.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
- RMEnrollmentPage2.cs
- SecureEnvironment.cs
- CodeAttributeDeclarationCollection.cs
- DesignerSelectionListAdapter.cs
- RepeatInfo.cs
- CoreSwitches.cs
- XmlHierarchyData.cs
- ContainsRowNumberChecker.cs
- CloseSequence.cs
- GenericParameterDataContract.cs
- SHA384.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SubpageParaClient.cs
- TextTreeExtractElementUndoUnit.cs
- XPathException.cs
- InfoCardRSACryptoProvider.cs
- uribuilder.cs
- Catch.cs
- ScrollEvent.cs
- AuthorizationRule.cs
- MembershipValidatePasswordEventArgs.cs
- CalendarBlackoutDatesCollection.cs
- DocumentGridContextMenu.cs
- ResourceExpression.cs
- ChineseLunisolarCalendar.cs
- PageThemeBuildProvider.cs
- CalendarAutoFormatDialog.cs
- EmbeddedMailObject.cs
- AppDomainAttributes.cs
- QilFunction.cs
- OutputScopeManager.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- IChannel.cs
- OutputScope.cs
- HealthMonitoringSection.cs
- TypeResolvingOptions.cs
- ServicesUtilities.cs
- ConfigurationElementProperty.cs
- BindingBase.cs
- PopupEventArgs.cs
- UnmanagedBitmapWrapper.cs
- SqlTriggerContext.cs
- TypedDatasetGenerator.cs
- DisposableCollectionWrapper.cs
- DataFieldEditor.cs
- _ProxyChain.cs
- EnumBuilder.cs
- TypeDescriptor.cs
- ProxyGenerator.cs
- CustomLineCap.cs
- ImpersonateTokenRef.cs
- BuildProviderAppliesToAttribute.cs
- ControlEvent.cs
- DataRowExtensions.cs
- MailAddressParser.cs
- SoapIncludeAttribute.cs
- HtmlFormAdapter.cs
- ObjectDisposedException.cs
- Condition.cs
- EarlyBoundInfo.cs
- ObfuscateAssemblyAttribute.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- DataTable.cs
- WS2007HttpBinding.cs
- DrawingServices.cs
- TransactionContextManager.cs
- SmtpException.cs
- Grammar.cs
- QualifiedId.cs
- EntityViewGenerator.cs
- CallbackValidatorAttribute.cs
- CloudCollection.cs
- DetailsViewDeletedEventArgs.cs
- NativeCppClassAttribute.cs
- elementinformation.cs
- FileDialog_Vista_Interop.cs
- GreenMethods.cs
- OrthographicCamera.cs
- AsymmetricCryptoHandle.cs
- ComponentEditorForm.cs
- MsmqTransportBindingElement.cs
- Debug.cs
- ThicknessAnimation.cs
- TransformGroup.cs
- ButtonFieldBase.cs
- SupportsEventValidationAttribute.cs
- Message.cs
- PerspectiveCamera.cs
- TCEAdapterGenerator.cs
- TextBoxAutomationPeer.cs
- NetworkInterface.cs
- SQlBooleanStorage.cs
- StylusLogic.cs
- IList.cs
- XPathDocumentBuilder.cs
- BlurBitmapEffect.cs
- DataGridViewTextBoxCell.cs
- WindowsRichEdit.cs
- ListBindingHelper.cs
- NativeMethods.cs