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
- ExceptionHandlerDesigner.cs
- DataRowView.cs
- DependencyObjectPropertyDescriptor.cs
- EventMap.cs
- CommonXSendMessage.cs
- CodeSnippetCompileUnit.cs
- GacUtil.cs
- ColumnWidthChangedEvent.cs
- LoadedOrUnloadedOperation.cs
- BitmapEffectDrawing.cs
- TextEditorContextMenu.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- SetUserPreferenceRequest.cs
- ResourcePool.cs
- ScriptControl.cs
- LocalizedNameDescriptionPair.cs
- ThousandthOfEmRealPoints.cs
- EmptyEnumerator.cs
- UrlMappingsModule.cs
- PermissionToken.cs
- OpCellTreeNode.cs
- AssemblyHash.cs
- ContainerUtilities.cs
- BeginSelectCardRequest.cs
- OracleConnectionStringBuilder.cs
- JavaScriptString.cs
- TreeNodeStyleCollection.cs
- MatrixCamera.cs
- DataPagerField.cs
- CurrentChangedEventManager.cs
- DrawTreeNodeEventArgs.cs
- OleDbSchemaGuid.cs
- Tracer.cs
- ImageIndexConverter.cs
- DoubleAnimationClockResource.cs
- Button.cs
- DefaultTextStore.cs
- TargetInvocationException.cs
- DeclaredTypeElementCollection.cs
- FieldTemplateUserControl.cs
- IconConverter.cs
- ConfigurationSectionGroupCollection.cs
- BitmapEffectInput.cs
- LineBreak.cs
- MessageSmuggler.cs
- LineVisual.cs
- TreeNodeCollectionEditor.cs
- OdbcParameter.cs
- SpellCheck.cs
- XmlReturnWriter.cs
- MultipartContentParser.cs
- FormConverter.cs
- AnimatedTypeHelpers.cs
- ColumnWidthChangingEvent.cs
- XamlSerializer.cs
- IISMapPath.cs
- Column.cs
- ProxyWebPart.cs
- ResourceExpressionBuilder.cs
- LoadedOrUnloadedOperation.cs
- RunWorkerCompletedEventArgs.cs
- QilList.cs
- EventBindingService.cs
- SharedStream.cs
- ScrollableControl.cs
- SqlDataSourceCustomCommandEditor.cs
- SqlClientPermission.cs
- CompilerParameters.cs
- Compiler.cs
- PointConverter.cs
- GeneralTransform3D.cs
- odbcmetadatafactory.cs
- ConfigUtil.cs
- QilXmlWriter.cs
- SAPIEngineTypes.cs
- ComMethodElementCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- X509CertificateInitiatorServiceCredential.cs
- SqlDataSourceCommandEventArgs.cs
- Bezier.cs
- XmlSerializerVersionAttribute.cs
- TypeConvertions.cs
- BuilderPropertyEntry.cs
- TypeListConverter.cs
- BindingBase.cs
- DataTransferEventArgs.cs
- DesignerAutoFormatStyle.cs
- XamlBrushSerializer.cs
- AssertFilter.cs
- BitmapEffectDrawing.cs
- WorkflowMarkupSerializer.cs
- OracleFactory.cs
- LocationUpdates.cs
- KeyToListMap.cs
- PtsPage.cs
- XhtmlTextWriter.cs
- Point4DValueSerializer.cs
- ReadOnlyDataSource.cs
- ActiveXSite.cs
- DataGridViewSelectedCellCollection.cs