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
- ConfigurationSettings.cs
- DataTableNewRowEvent.cs
- OracleConnectionString.cs
- Quaternion.cs
- WebEncodingValidator.cs
- DeleteBookmarkScope.cs
- SqlDataSourceView.cs
- ViewManager.cs
- SelectionProviderWrapper.cs
- Pkcs9Attribute.cs
- ExceptionRoutedEventArgs.cs
- SafeFileMappingHandle.cs
- TypeElement.cs
- ServiceTimeoutsBehavior.cs
- Latin1Encoding.cs
- HandledEventArgs.cs
- ScriptingProfileServiceSection.cs
- CompilerGeneratedAttribute.cs
- Rectangle.cs
- DataControlFieldCollection.cs
- AppDomainFactory.cs
- WriteableBitmap.cs
- CookieParameter.cs
- TextTabProperties.cs
- XmlDocumentType.cs
- XsdCachingReader.cs
- Trace.cs
- DomainUpDown.cs
- AutomationProperties.cs
- Encoding.cs
- AutomationPropertyInfo.cs
- PathGradientBrush.cs
- SessionStateModule.cs
- ProtocolsConfiguration.cs
- ViewGenResults.cs
- EntityContainer.cs
- MemoryMappedView.cs
- BitmapEffectGeneralTransform.cs
- FileCodeGroup.cs
- HealthMonitoringSectionHelper.cs
- SqlError.cs
- Tokenizer.cs
- SessionIDManager.cs
- DocumentSchemaValidator.cs
- Win32PrintDialog.cs
- TextPointer.cs
- TypeResolvingOptionsAttribute.cs
- TitleStyle.cs
- RecognizedWordUnit.cs
- ValidationResult.cs
- XMLDiffLoader.cs
- PowerStatus.cs
- HwndMouseInputProvider.cs
- Tuple.cs
- Double.cs
- OutOfMemoryException.cs
- SqlUDTStorage.cs
- AutoScrollExpandMessageFilter.cs
- FileLoadException.cs
- EncoderNLS.cs
- ToolStripManager.cs
- ReachSerializationUtils.cs
- Imaging.cs
- CodeDOMProvider.cs
- SqlLiftWhereClauses.cs
- ToolStripPanelSelectionGlyph.cs
- ToolboxDataAttribute.cs
- ImageCodecInfo.cs
- DetailsViewUpdateEventArgs.cs
- FloaterBaseParaClient.cs
- ParameterRefs.cs
- Transform.cs
- SmiSettersStream.cs
- SqlBulkCopyColumnMappingCollection.cs
- ObjectSecurity.cs
- MatrixUtil.cs
- ConfigurationManagerHelper.cs
- HelpEvent.cs
- AnnotationHelper.cs
- Base64Decoder.cs
- CompilerInfo.cs
- httpstaticobjectscollection.cs
- GroupStyle.cs
- PlatformCulture.cs
- BuilderInfo.cs
- MenuItemBinding.cs
- StrokeNodeEnumerator.cs
- WebConfigurationManager.cs
- StructuredType.cs
- DesignerView.xaml.cs
- WpfPayload.cs
- OletxTransactionFormatter.cs
- Funcletizer.cs
- AnnotationResourceChangedEventArgs.cs
- BmpBitmapEncoder.cs
- ResolveNameEventArgs.cs
- SafeViewOfFileHandle.cs
- CorrelationTokenInvalidatedHandler.cs
- CompiledScopeCriteria.cs
- CodeCommentStatementCollection.cs