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
- _SslStream.cs
- CalendarDay.cs
- Canonicalizers.cs
- MouseButtonEventArgs.cs
- BoundPropertyEntry.cs
- Aggregates.cs
- XmlDictionary.cs
- ColorKeyFrameCollection.cs
- SpeakInfo.cs
- ImageIndexConverter.cs
- Debug.cs
- TraceRecord.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- Camera.cs
- TextRenderer.cs
- ExportException.cs
- BitmapEffectDrawingContextWalker.cs
- XmlElement.cs
- ToolZone.cs
- Renderer.cs
- ConsumerConnectionPointCollection.cs
- ProfileSettings.cs
- ConnectionPoolManager.cs
- CapabilitiesPattern.cs
- PnrpPeerResolverElement.cs
- SharedPerformanceCounter.cs
- OperationParameterInfo.cs
- ScriptControl.cs
- QueryOutputWriterV1.cs
- HtmlTitle.cs
- StateBag.cs
- GradientSpreadMethodValidation.cs
- OperationPickerDialog.designer.cs
- UnsafeNativeMethods.cs
- ImageDrawing.cs
- XPathCompileException.cs
- Type.cs
- NetworkInterface.cs
- BaseTemplateBuildProvider.cs
- HtmlInputRadioButton.cs
- ObjectManager.cs
- CompositeDataBoundControl.cs
- MetadataUtil.cs
- PropertyStore.cs
- NamedPipeTransportManager.cs
- WindowsIdentity.cs
- RoleManagerSection.cs
- DataListCommandEventArgs.cs
- MimeFormReflector.cs
- OrderedDictionaryStateHelper.cs
- Sentence.cs
- WithStatement.cs
- EncodingDataItem.cs
- EndpointIdentityConverter.cs
- SliderAutomationPeer.cs
- ConstraintStruct.cs
- ApplicationManager.cs
- BamlRecordWriter.cs
- WindowsTokenRoleProvider.cs
- TransactionValidationBehavior.cs
- ThreadLocal.cs
- SafeProcessHandle.cs
- X509SubjectKeyIdentifierClause.cs
- OptimizerPatterns.cs
- Content.cs
- CustomWebEventKey.cs
- CTreeGenerator.cs
- StateDesignerConnector.cs
- ArrangedElementCollection.cs
- EncoderParameter.cs
- TabControlCancelEvent.cs
- StringCollectionEditor.cs
- UiaCoreProviderApi.cs
- DataServiceContext.cs
- LoginDesignerUtil.cs
- VisualStyleInformation.cs
- DbProviderSpecificTypePropertyAttribute.cs
- PieceDirectory.cs
- XmlElement.cs
- ConstraintCollection.cs
- CallbackHandler.cs
- FormViewModeEventArgs.cs
- DataFormats.cs
- SmiEventSink_DeferedProcessing.cs
- AutoResizedEvent.cs
- MarshalDirectiveException.cs
- TypeBuilder.cs
- RootBuilder.cs
- IndividualDeviceConfig.cs
- VoiceChangeEventArgs.cs
- CreateUserWizardStep.cs
- DPCustomTypeDescriptor.cs
- connectionpool.cs
- SerialPort.cs
- HtmlWindow.cs
- RotateTransform3D.cs
- WebReferencesBuildProvider.cs
- ApplicationFileCodeDomTreeGenerator.cs
- PropertyGridView.cs
- LogSwitch.cs