Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / GridItemCollection.cs / 1 / 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
- DeferredSelectedIndexReference.cs
- InputLanguageEventArgs.cs
- PersonalizationProviderHelper.cs
- DbConnectionStringBuilder.cs
- DictionaryBase.cs
- PreDigestedSignedInfo.cs
- DispatcherObject.cs
- ExceptionUtil.cs
- ColumnResizeAdorner.cs
- EmptyCollection.cs
- HierarchicalDataBoundControl.cs
- DataSvcMapFile.cs
- SQLInt32Storage.cs
- DocumentReference.cs
- BinaryParser.cs
- HttpListenerRequest.cs
- AttachedAnnotation.cs
- ContextMenuService.cs
- CodeDelegateCreateExpression.cs
- ObjectKeyFrameCollection.cs
- SettingsContext.cs
- DesignerHelpers.cs
- QueryStringParameter.cs
- Pair.cs
- TrustLevel.cs
- SiteMapHierarchicalDataSourceView.cs
- BamlStream.cs
- ByteAnimationBase.cs
- MultiplexingDispatchMessageFormatter.cs
- StateFinalizationActivity.cs
- BooleanKeyFrameCollection.cs
- Attributes.cs
- Descriptor.cs
- TextFormatterContext.cs
- ServicePointManager.cs
- TypeKeyValue.cs
- MetadataSource.cs
- PointLight.cs
- FloatUtil.cs
- Crypto.cs
- ProfilePropertyNameValidator.cs
- CancellationTokenSource.cs
- TextEditorTables.cs
- ExpandButtonVisibilityConverter.cs
- ObjectItemAttributeAssemblyLoader.cs
- ReachUIElementCollectionSerializerAsync.cs
- XhtmlBasicValidatorAdapter.cs
- ConnectionManagementSection.cs
- CardSpaceException.cs
- FixedDocumentSequencePaginator.cs
- WinFormsSecurity.cs
- IndicShape.cs
- XMLSchema.cs
- XsltOutput.cs
- DefaultClaimSet.cs
- ServicesUtilities.cs
- SessionIDManager.cs
- ContentDesigner.cs
- _IPv4Address.cs
- AsymmetricCryptoHandle.cs
- BatchWriter.cs
- AutoGeneratedFieldProperties.cs
- DataServiceRequestOfT.cs
- LoadGrammarCompletedEventArgs.cs
- AssemblyCache.cs
- PasswordRecoveryAutoFormat.cs
- SelectionPattern.cs
- HttpWebResponse.cs
- Constraint.cs
- StylusPointPropertyInfoDefaults.cs
- LoginName.cs
- DockAndAnchorLayout.cs
- SoapAttributeOverrides.cs
- TextRenderingModeValidation.cs
- ReferencedType.cs
- TextServicesCompartment.cs
- DataGridViewComboBoxColumn.cs
- QueryContinueDragEvent.cs
- ColumnMapVisitor.cs
- BooleanFunctions.cs
- CommentGlyph.cs
- SHA384Managed.cs
- XmlNamespaceMapping.cs
- BitmapCodecInfo.cs
- IPipelineRuntime.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TabPanel.cs
- BuilderElements.cs
- BuildResult.cs
- DbConnectionHelper.cs
- UrlUtility.cs
- MatrixTransform.cs
- SqlConnectionManager.cs
- WebColorConverter.cs
- StaticResourceExtension.cs
- DataGrid.cs
- X509ChainPolicy.cs
- CredentialCache.cs
- Rules.cs
- CodeSubDirectory.cs