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
- DictionaryContent.cs
- PageThemeCodeDomTreeGenerator.cs
- HyperlinkAutomationPeer.cs
- ExternalFile.cs
- ScriptingJsonSerializationSection.cs
- ProfileSection.cs
- TemplateControlParser.cs
- ScriptComponentDescriptor.cs
- Tokenizer.cs
- safesecurityhelperavalon.cs
- TextEndOfSegment.cs
- MimeMultiPart.cs
- SelectedDatesCollection.cs
- DataObjectCopyingEventArgs.cs
- WebConfigurationHostFileChange.cs
- _FtpControlStream.cs
- LongCountAggregationOperator.cs
- CodeComment.cs
- TypeElement.cs
- ResourceProviderFactory.cs
- PeerCollaboration.cs
- DelegatingConfigHost.cs
- EmissiveMaterial.cs
- QilTypeChecker.cs
- FunctionDetailsReader.cs
- ReflectTypeDescriptionProvider.cs
- ImageFormatConverter.cs
- TextTabProperties.cs
- StringCollectionEditor.cs
- SqlTypeSystemProvider.cs
- XmlIterators.cs
- FunctionUpdateCommand.cs
- LinearGradientBrush.cs
- AppDomainUnloadedException.cs
- OutOfMemoryException.cs
- ParameterCollection.cs
- DbConvert.cs
- SectionInput.cs
- PageTrueTypeFont.cs
- QuaternionAnimationBase.cs
- SqlCommandBuilder.cs
- SerialErrors.cs
- XPathNodeHelper.cs
- HwndSubclass.cs
- ZipIOExtraFieldElement.cs
- Profiler.cs
- EdmEntityTypeAttribute.cs
- Visual3D.cs
- PointLightBase.cs
- ListViewEditEventArgs.cs
- EventHandlerService.cs
- SQLGuidStorage.cs
- SharedConnectionWorkflowTransactionService.cs
- DesignerCategoryAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- ADMembershipUser.cs
- ListControlDesigner.cs
- LinqDataSourceHelper.cs
- GlobalId.cs
- Floater.cs
- DrawingAttributesDefaultValueFactory.cs
- ListViewGroupItemCollection.cs
- HwndStylusInputProvider.cs
- DetailsView.cs
- ControlBindingsConverter.cs
- ToolStripDropDownClosingEventArgs.cs
- MDIClient.cs
- ToolStripArrowRenderEventArgs.cs
- ColumnBinding.cs
- Executor.cs
- StringValidator.cs
- PerfService.cs
- StreamInfo.cs
- SqlError.cs
- IPPacketInformation.cs
- Exceptions.cs
- PropertyGeneratedEventArgs.cs
- FilteredXmlReader.cs
- DataGridItem.cs
- SimpleHandlerBuildProvider.cs
- Focus.cs
- WebPartEditorCancelVerb.cs
- CompModSwitches.cs
- MouseButton.cs
- SafeViewOfFileHandle.cs
- TrackingProfileDeserializationException.cs
- DateTimeUtil.cs
- DbParameterHelper.cs
- IQueryable.cs
- XmlILIndex.cs
- SchemaRegistration.cs
- RecognitionResult.cs
- CodeObject.cs
- CodeEventReferenceExpression.cs
- InProcStateClientManager.cs
- PatternMatcher.cs
- ToolboxControl.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ExchangeUtilities.cs
- TcpAppDomainProtocolHandler.cs