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
- SymbolEqualComparer.cs
- CodeTypeMemberCollection.cs
- HttpListenerRequest.cs
- DynamicRenderer.cs
- Nullable.cs
- SafeIUnknown.cs
- MailWriter.cs
- SimpleWebHandlerParser.cs
- AsyncDataRequest.cs
- TabPanel.cs
- DSACryptoServiceProvider.cs
- mongolianshape.cs
- SortableBindingList.cs
- ButtonColumn.cs
- HyperLinkStyle.cs
- FileDialog.cs
- EntityClassGenerator.cs
- nulltextnavigator.cs
- DataControlCommands.cs
- DataSourceGeneratorException.cs
- DockPanel.cs
- PersonalizableAttribute.cs
- StoreItemCollection.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- PhonemeEventArgs.cs
- ImageListDesigner.cs
- FilteredAttributeCollection.cs
- FieldValue.cs
- DataGridAddNewRow.cs
- CompositeDispatchFormatter.cs
- StrongNameUtility.cs
- rsa.cs
- WindowsContainer.cs
- IdleTimeoutMonitor.cs
- BatchServiceHost.cs
- PointCollection.cs
- Context.cs
- HwndKeyboardInputProvider.cs
- AccessDataSource.cs
- MappingMetadataHelper.cs
- ComponentManagerBroker.cs
- ConnectionManagementSection.cs
- OleDbTransaction.cs
- SystemIPv4InterfaceProperties.cs
- StringUtil.cs
- QEncodedStream.cs
- EndpointAddressMessageFilterTable.cs
- BlockCollection.cs
- basemetadatamappingvisitor.cs
- DispatcherExceptionEventArgs.cs
- UdpReplyToBehavior.cs
- DrawingGroup.cs
- EntityCommandExecutionException.cs
- updatecommandorderer.cs
- RNGCryptoServiceProvider.cs
- MimeParameterWriter.cs
- SqlDataSource.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- InputReport.cs
- MediaCommands.cs
- MergablePropertyAttribute.cs
- ExpressionHelper.cs
- HttpConfigurationSystem.cs
- AdornerPresentationContext.cs
- TargetException.cs
- BuildResultCache.cs
- HttpContextWrapper.cs
- DBAsyncResult.cs
- ResolvedKeyFrameEntry.cs
- HttpStaticObjectsCollectionBase.cs
- errorpatternmatcher.cs
- OracleMonthSpan.cs
- QuaternionRotation3D.cs
- TextWriterTraceListener.cs
- HtmlHead.cs
- SqlTriggerAttribute.cs
- ExpandCollapsePattern.cs
- BuilderInfo.cs
- HttpModuleCollection.cs
- CompositeDataBoundControl.cs
- HostExecutionContextManager.cs
- ControlTemplate.cs
- SafeProcessHandle.cs
- CultureSpecificStringDictionary.cs
- ContainerSelectorActiveEvent.cs
- StringStorage.cs
- MissingManifestResourceException.cs
- ReferenceSchema.cs
- XpsFontSubsetter.cs
- PersonalizationDictionary.cs
- AssociationProvider.cs
- TransactionBridgeSection.cs
- SqlCharStream.cs
- EntryPointNotFoundException.cs
- WebPartAuthorizationEventArgs.cs
- JournalEntry.cs
- HashSetDebugView.cs
- SqlDataSourceQueryEditor.cs
- IDictionary.cs
- FileDialog_Vista.cs