Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / GridItemCollection.cs / 1305376 / GridItemCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System; using System.IO; using System.Collections; using System.Globalization; using System.Windows.Forms; using System.Drawing; using System.Drawing.Design; using System.Windows.Forms.Design; using System.Windows.Forms.ComponentModel.Com2Interop; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms.PropertyGridInternal; using System.Reflection; using System.Runtime.InteropServices; using Microsoft.Win32; ////// /// A read-only collection of GridItem objects /// public class GridItemCollection : ICollection { ////// /// public static GridItemCollection Empty = new GridItemCollection(new GridItem[0]); internal GridItem[] entries; internal GridItemCollection(GridItem[] entries) { if (entries == null) { this.entries = new GridItem[0]; } else { this.entries = entries; } } ///[To be supplied.] ////// /// Retrieves the number of member attributes. /// public int Count { get { return entries.Length; } } ////// object ICollection.SyncRoot { get { return this; } } /// /// bool ICollection.IsSynchronized { get { return false; } } /// /// /// Retrieves the member attribute with the specified index. /// public GridItem this[int index] { get { return entries[index]; } } ////// /// public GridItem this[string label]{ get { foreach(GridItem g in entries) { if (g.Label == label) { return g; } } return null; } } ///[To be supplied.] ////// void ICollection.CopyTo(Array dest, int index) { if (entries.Length > 0) { System.Array.Copy(entries, 0, dest, index, entries.Length); } } /// /// /// Creates and retrieves a new enumerator for this collection. /// public IEnumerator GetEnumerator() { return entries.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System; using System.IO; using System.Collections; using System.Globalization; using System.Windows.Forms; using System.Drawing; using System.Drawing.Design; using System.Windows.Forms.Design; using System.Windows.Forms.ComponentModel.Com2Interop; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms.PropertyGridInternal; using System.Reflection; using System.Runtime.InteropServices; using Microsoft.Win32; ////// /// A read-only collection of GridItem objects /// public class GridItemCollection : ICollection { ////// /// public static GridItemCollection Empty = new GridItemCollection(new GridItem[0]); internal GridItem[] entries; internal GridItemCollection(GridItem[] entries) { if (entries == null) { this.entries = new GridItem[0]; } else { this.entries = entries; } } ///[To be supplied.] ////// /// Retrieves the number of member attributes. /// public int Count { get { return entries.Length; } } ////// object ICollection.SyncRoot { get { return this; } } /// /// bool ICollection.IsSynchronized { get { return false; } } /// /// /// Retrieves the member attribute with the specified index. /// public GridItem this[int index] { get { return entries[index]; } } ////// /// public GridItem this[string label]{ get { foreach(GridItem g in entries) { if (g.Label == label) { return g; } } return null; } } ///[To be supplied.] ////// void ICollection.CopyTo(Array dest, int index) { if (entries.Length > 0) { System.Array.Copy(entries, 0, dest, index, entries.Length); } } /// /// /// Creates and retrieves a new enumerator for this collection. /// public IEnumerator GetEnumerator() { return entries.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormsIdentity.cs
- KoreanCalendar.cs
- TreeNodeStyleCollection.cs
- RawTextInputReport.cs
- TableParagraph.cs
- SwitchAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- DetailsViewUpdatedEventArgs.cs
- Vector3DCollection.cs
- TabControlAutomationPeer.cs
- CmsInterop.cs
- SHA256.cs
- SqlProfileProvider.cs
- ColorDialog.cs
- DisplayMemberTemplateSelector.cs
- ObjectStateFormatter.cs
- Exceptions.cs
- FileDialogCustomPlace.cs
- RadioButtonStandardAdapter.cs
- ExpressionDumper.cs
- ComplexTypeEmitter.cs
- DataServiceException.cs
- OracleDateTime.cs
- CopyCodeAction.cs
- DiscoveryReference.cs
- ParseNumbers.cs
- KnownBoxes.cs
- BindingFormattingDialog.cs
- AliasExpr.cs
- TrackingWorkflowEventArgs.cs
- FloaterParaClient.cs
- RangeValueProviderWrapper.cs
- StagingAreaInputItem.cs
- HttpWebRequestElement.cs
- XmlAtomicValue.cs
- PrincipalPermission.cs
- VersionConverter.cs
- QueryCacheEntry.cs
- XmlTextEncoder.cs
- GorillaCodec.cs
- QueueProcessor.cs
- DynamicActivityProperty.cs
- FilteredReadOnlyMetadataCollection.cs
- HtmlContainerControl.cs
- NativeRightsManagementAPIsStructures.cs
- StatusBar.cs
- BoolLiteral.cs
- Wizard.cs
- AppSettingsExpressionBuilder.cs
- DataGridItemEventArgs.cs
- compensatingcollection.cs
- UriSection.cs
- XmlNodeReader.cs
- CustomWebEventKey.cs
- StringBlob.cs
- DocumentSchemaValidator.cs
- SamlNameIdentifierClaimResource.cs
- DataGridTable.cs
- NumberSubstitution.cs
- NonBatchDirectoryCompiler.cs
- LineServices.cs
- FramingChannels.cs
- CompilerGeneratedAttribute.cs
- PrinterResolution.cs
- RestHandler.cs
- IgnoreFileBuildProvider.cs
- XmlSerializableReader.cs
- GraphicsContext.cs
- ButtonFieldBase.cs
- EventLogPermissionAttribute.cs
- ComboBoxAutomationPeer.cs
- EventHandlerList.cs
- HandlerWithFactory.cs
- DataViewManager.cs
- TextSchema.cs
- DefinitionUpdate.cs
- AssemblyFilter.cs
- TextRenderingModeValidation.cs
- TreeNode.cs
- ThreadStartException.cs
- _ContextAwareResult.cs
- BroadcastEventHelper.cs
- ReferencedAssembly.cs
- entityreference_tresulttype.cs
- LineGeometry.cs
- WindowsListViewSubItem.cs
- UIElementHelper.cs
- Size3DConverter.cs
- GeneralTransform3DGroup.cs
- Atom10FeedFormatter.cs
- ViewManager.cs
- _StreamFramer.cs
- CellCreator.cs
- GridViewPageEventArgs.cs
- ToolboxItemCollection.cs
- GridViewColumnCollection.cs
- SharedUtils.cs
- HttpInputStream.cs
- HttpRawResponse.cs
- Binding.cs