Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- BehaviorEditorPart.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RegisteredExpandoAttribute.cs
- HybridCollection.cs
- InstanceKeyNotReadyException.cs
- ResourceDictionaryCollection.cs
- StateMachineSubscription.cs
- ControlIdConverter.cs
- XmlObjectSerializerContext.cs
- ResourcesBuildProvider.cs
- Label.cs
- DataGridColumnFloatingHeader.cs
- FilterException.cs
- Expr.cs
- recordstatefactory.cs
- StateRuntime.cs
- ComboBoxDesigner.cs
- InternalBase.cs
- RepeaterItem.cs
- SchemaNamespaceManager.cs
- WorkflowServiceBehavior.cs
- Aggregates.cs
- QueryCursorEventArgs.cs
- COAUTHIDENTITY.cs
- RegistryPermission.cs
- DataGridViewCellCollection.cs
- ImpersonationContext.cs
- SoapSchemaMember.cs
- ImageListUtils.cs
- RepeaterItem.cs
- LexicalChunk.cs
- Color.cs
- StringConcat.cs
- ToolBar.cs
- SQLSingle.cs
- GetKeyedHashRequest.cs
- VoiceChangeEventArgs.cs
- PhysicalOps.cs
- Image.cs
- BitmapData.cs
- BindingSource.cs
- ResumeStoryboard.cs
- FixedSOMLineCollection.cs
- SQLDecimal.cs
- DictionaryEntry.cs
- WebPartDisplayMode.cs
- shaperfactoryquerycacheentry.cs
- SoapElementAttribute.cs
- loginstatus.cs
- HtmlGenericControl.cs
- InternalDispatchObject.cs
- KoreanCalendar.cs
- URLString.cs
- HttpHeaderCollection.cs
- DoubleLink.cs
- XamlPointCollectionSerializer.cs
- AutoGeneratedField.cs
- ArrayWithOffset.cs
- PathSegment.cs
- ExpressionVisitorHelpers.cs
- Attributes.cs
- BlockCollection.cs
- RelationshipManager.cs
- IntellisenseTextBox.designer.cs
- WebBrowserContainer.cs
- RepeaterItemEventArgs.cs
- Utility.cs
- newinstructionaction.cs
- complextypematerializer.cs
- MailMessageEventArgs.cs
- Stack.cs
- ModuleBuilder.cs
- CustomExpression.cs
- XmlSchemaValidationException.cs
- Rule.cs
- EntityDataSourceViewSchema.cs
- DebugViewWriter.cs
- ProfilePropertyNameValidator.cs
- BooleanConverter.cs
- infer.cs
- StateMachineHistory.cs
- MimePart.cs
- FactoryGenerator.cs
- DataGridViewSelectedColumnCollection.cs
- StructuredProperty.cs
- DbBuffer.cs
- ImageMapEventArgs.cs
- IBuiltInEvidence.cs
- ChtmlImageAdapter.cs
- XmlBinaryReaderSession.cs
- DuplexChannel.cs
- DataBindingExpressionBuilder.cs
- ProcessHost.cs
- NeutralResourcesLanguageAttribute.cs
- ConfigurationElement.cs
- ColumnReorderedEventArgs.cs
- MatrixValueSerializer.cs
- NegotiateStream.cs
- SystemTcpStatistics.cs
- ContentTextAutomationPeer.cs