Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SetStoryboardSpeedRatio.cs
- CustomAttributeBuilder.cs
- safex509handles.cs
- ToolStripGrip.cs
- RSAProtectedConfigurationProvider.cs
- DrawingContext.cs
- PasswordBox.cs
- WebBaseEventKeyComparer.cs
- ExpandSegmentCollection.cs
- ChtmlCommandAdapter.cs
- RequestSecurityTokenResponse.cs
- StringUtil.cs
- MobileErrorInfo.cs
- DataGridViewColumnCollection.cs
- DataBinding.cs
- WebFormsRootDesigner.cs
- ProcessInfo.cs
- DataColumnCollection.cs
- SID.cs
- XmlQueryCardinality.cs
- Transactions.cs
- SubstitutionList.cs
- ExpandableObjectConverter.cs
- MetadataProperty.cs
- BinarySecretSecurityToken.cs
- ModuleBuilderData.cs
- XPathException.cs
- AsymmetricKeyExchangeDeformatter.cs
- EditingCommands.cs
- XmlEntityReference.cs
- CodePageUtils.cs
- ToolStripItemEventArgs.cs
- DataViewListener.cs
- SiblingIterators.cs
- DateTimeConverter2.cs
- ReferentialConstraint.cs
- LayoutTable.cs
- SessionEndingEventArgs.cs
- TdsParameterSetter.cs
- TextTreeRootNode.cs
- ResolveMatchesApril2005.cs
- CalendarModeChangedEventArgs.cs
- PtsContext.cs
- TypeConverterHelper.cs
- DesignBindingValueUIHandler.cs
- Int64Converter.cs
- ObjectDataSourceStatusEventArgs.cs
- TextDecorationUnitValidation.cs
- GridItem.cs
- DocumentGridContextMenu.cs
- ProcessThread.cs
- Adorner.cs
- OuterGlowBitmapEffect.cs
- OdbcHandle.cs
- AliasedExpr.cs
- AddingNewEventArgs.cs
- RequestResizeEvent.cs
- HTTPNotFoundHandler.cs
- BinaryNode.cs
- DispatchProxy.cs
- AxisAngleRotation3D.cs
- DataGridTextBoxColumn.cs
- VectorAnimation.cs
- FileDialogCustomPlace.cs
- MatrixTransform.cs
- ConfigurationLoaderException.cs
- CodeDirectoryCompiler.cs
- BamlReader.cs
- DataControlExtensions.cs
- ContractMapping.cs
- _FtpControlStream.cs
- EventLogInternal.cs
- FormsAuthenticationModule.cs
- FindCriteriaElement.cs
- RtfToken.cs
- Column.cs
- IPAddress.cs
- StreamGeometryContext.cs
- FixedSOMSemanticBox.cs
- MemberInitExpression.cs
- ContractAdapter.cs
- HttpServerProtocol.cs
- DataPagerFieldCollection.cs
- CriticalFinalizerObject.cs
- ReferencedType.cs
- PasswordPropertyTextAttribute.cs
- AdRotator.cs
- ExceptionUtil.cs
- ReflectionHelper.cs
- NegatedCellConstant.cs
- ProfileInfo.cs
- DataGridViewAccessibleObject.cs
- TextServicesProperty.cs
- XMLSyntaxException.cs
- BindingBase.cs
- DesignTimeSiteMapProvider.cs
- Attachment.cs
- RedirectionProxy.cs
- GridPattern.cs
- DictionaryBase.cs