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 {
///
///
/// [To be supplied.]
///
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;
}
}
///
///
/// 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];
}
}
///
///
/// [To be supplied.]
///
public GridItem this[string label]{
get {
foreach(GridItem g in entries) {
if (g.Label == label) {
return g;
}
}
return null;
}
}
///
///
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 {
///
///
/// [To be supplied.]
///
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;
}
}
///
///
/// 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];
}
}
///
///
/// [To be supplied.]
///
public GridItem this[string label]{
get {
foreach(GridItem g in entries) {
if (g.Label == label) {
return g;
}
}
return null;
}
}
///
///
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
- UserNameSecurityTokenProvider.cs
- Msmq3PoisonHandler.cs
- TileBrush.cs
- DataObjectCopyingEventArgs.cs
- WebPartConnectionsCancelVerb.cs
- DetailsView.cs
- ReliableOutputSessionChannel.cs
- DataColumnMapping.cs
- UnsafeNativeMethods.cs
- ZipIOFileItemStream.cs
- Parameter.cs
- cookie.cs
- SamlSubjectStatement.cs
- DataReceivedEventArgs.cs
- SortDescription.cs
- ObjectDataSourceEventArgs.cs
- NotCondition.cs
- UpdateException.cs
- EntityDataSourceWrapperCollection.cs
- VarInfo.cs
- EncoderBestFitFallback.cs
- HtmlToClrEventProxy.cs
- SqlExpander.cs
- AccessibleObject.cs
- Subset.cs
- MessageContractAttribute.cs
- MobileSysDescriptionAttribute.cs
- MinimizableAttributeTypeConverter.cs
- DesignerAdapterUtil.cs
- SoundPlayerAction.cs
- FocusTracker.cs
- DataConnectionHelper.cs
- TcpClientSocketManager.cs
- DispatchChannelSink.cs
- GregorianCalendarHelper.cs
- NodeFunctions.cs
- TimelineGroup.cs
- CodeCommentStatementCollection.cs
- JapaneseCalendar.cs
- HttpRuntimeSection.cs
- WebPartZoneBaseDesigner.cs
- ArrangedElementCollection.cs
- CopyEncoder.cs
- Processor.cs
- MulticastDelegate.cs
- WebHttpDispatchOperationSelector.cs
- OleDbRowUpdatingEvent.cs
- HijriCalendar.cs
- OLEDB_Enum.cs
- EntityViewGenerationAttribute.cs
- ImageFormat.cs
- DynamicResourceExtension.cs
- MarkupCompilePass1.cs
- GlyphRun.cs
- SqlWriter.cs
- DocumentApplication.cs
- ValidationResult.cs
- BooleanFunctions.cs
- StrokeCollection2.cs
- QueryContinueDragEvent.cs
- SqlCommand.cs
- XhtmlConformanceSection.cs
- HttpProtocolImporter.cs
- ParserStreamGeometryContext.cs
- _AutoWebProxyScriptEngine.cs
- LogLogRecordEnumerator.cs
- DoubleCollection.cs
- TaskCanceledException.cs
- DataTableTypeConverter.cs
- SQLGuidStorage.cs
- OnOperation.cs
- DataGridViewTextBoxEditingControl.cs
- GenericParameterDataContract.cs
- ComponentCollection.cs
- TextEncodedRawTextWriter.cs
- GregorianCalendar.cs
- HandleDictionary.cs
- ContainerVisual.cs
- DetailsViewInsertedEventArgs.cs
- WebCategoryAttribute.cs
- EncryptedData.cs
- DBSchemaRow.cs
- DataServiceResponse.cs
- SpecialFolderEnumConverter.cs
- CheckBox.cs
- TextDecorationCollectionConverter.cs
- ListControl.cs
- WebPartDescription.cs
- WebPartConnectionCollection.cs
- CalloutQueueItem.cs
- XmlDocumentFragment.cs
- HttpCachePolicyElement.cs
- StylusPointCollection.cs
- httpapplicationstate.cs
- EpmCustomContentSerializer.cs
- TextEditorSpelling.cs
- CollectionDataContractAttribute.cs
- KerberosRequestorSecurityToken.cs
- RefreshEventArgs.cs
- ConsumerConnectionPoint.cs