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
- SubMenuStyle.cs
- BoolLiteral.cs
- OdbcFactory.cs
- QilFunction.cs
- GenerateScriptTypeAttribute.cs
- DbMetaDataColumnNames.cs
- BitmapEffectOutputConnector.cs
- TextMetrics.cs
- DesignTimeTemplateParser.cs
- ReadOnlyDictionary.cs
- WebDescriptionAttribute.cs
- StateDesigner.TransitionInfo.cs
- cryptoapiTransform.cs
- GZipDecoder.cs
- FileRecordSequenceHelper.cs
- Timer.cs
- ConnectionStringsExpressionEditor.cs
- RadioButtonPopupAdapter.cs
- Section.cs
- RecordManager.cs
- ControlBindingsCollection.cs
- SrgsElement.cs
- GridViewRow.cs
- IndexExpression.cs
- Point4D.cs
- WebMethodAttribute.cs
- CustomPopupPlacement.cs
- _Connection.cs
- EventLogQuery.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- input.cs
- TextElementEnumerator.cs
- DbDataSourceEnumerator.cs
- LazyLoadBehavior.cs
- CharacterMetrics.cs
- MeasureData.cs
- ConfigurationManagerInternal.cs
- GlyphInfoList.cs
- ProviderCollection.cs
- FileDialog.cs
- XsdBuilder.cs
- DefaultValidator.cs
- XmlSchemaSimpleContent.cs
- SecurityKeyIdentifierClause.cs
- DataGridViewUtilities.cs
- UserMapPath.cs
- LogSwitch.cs
- PagerStyle.cs
- Geometry3D.cs
- handlecollector.cs
- SimpleMailWebEventProvider.cs
- XmlBinaryReader.cs
- RuntimeIdentifierPropertyAttribute.cs
- Timer.cs
- FilterQueryOptionExpression.cs
- CodeObjectCreateExpression.cs
- RelationshipDetailsRow.cs
- Pair.cs
- Image.cs
- ServiceObjectContainer.cs
- XmlTextAttribute.cs
- DeferredTextReference.cs
- InternalsVisibleToAttribute.cs
- SuppressIldasmAttribute.cs
- DashStyle.cs
- CompoundFileIOPermission.cs
- NetworkCredential.cs
- _SSPIWrapper.cs
- CryptoStream.cs
- ListItemCollection.cs
- WriteTimeStream.cs
- Version.cs
- PeerObject.cs
- WorkflowStateRollbackService.cs
- CollectionType.cs
- AesCryptoServiceProvider.cs
- FunctionNode.cs
- OutputCacheSettingsSection.cs
- FilterQuery.cs
- DataViewSetting.cs
- SubtreeProcessor.cs
- XslCompiledTransform.cs
- XmlEntityReference.cs
- ConfigurationManagerHelperFactory.cs
- GridViewDeletedEventArgs.cs
- ValidatorUtils.cs
- ipaddressinformationcollection.cs
- WmlTextViewAdapter.cs
- ResourceDisplayNameAttribute.cs
- RolePrincipal.cs
- Drawing.cs
- XmlSchemaObjectCollection.cs
- ExplicitDiscriminatorMap.cs
- RegionInfo.cs
- CodeSnippetExpression.cs
- LinkClickEvent.cs
- xdrvalidator.cs
- XmlDocument.cs
- EntityContainer.cs
- XPathNodeList.cs