Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / CompMod / System / ComponentModel / Design / ArrayEditor.cs / 1 / ArrayEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System.Runtime.Serialization.Formatters; using System.Runtime.Remoting.Activation; using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System; using System.Collections; using Microsoft.Win32; using System.Drawing; using System.Drawing.Design; using System.Reflection; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Windows.Forms.ComponentModel; ////// /// public class ArrayEditor : CollectionEditor { ///Edits an array of values. ////// /// public ArrayEditor(Type type) : base(type) { } ////// Initializes a new instance of ///using the /// specified type for the array. /// /// /// protected override Type CreateCollectionItemType() { return CollectionType.GetElementType(); } ////// Gets or /// sets /// the data type this collection contains. /// ////// /// protected override object[] GetItems(object editValue) { if (editValue is Array) { Array valueArray = (Array)editValue; object[] items = new object[valueArray.GetLength(0)]; Array.Copy(valueArray, items, items.Length); return items; } else { return new object[0]; } } ////// Gets the items in the array. /// ////// /// protected override object SetItems(object editValue, object[] value) { if (editValue is Array || editValue == null) { Array newArray = Array.CreateInstance(CollectionItemType, value.Length); Array.Copy(value, newArray, value.Length); return newArray; } return editValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Sets the items in the array. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TreeIterator.cs
- SchemaTypeEmitter.cs
- Wildcard.cs
- PingReply.cs
- ColorConvertedBitmap.cs
- FixUp.cs
- SymbolEqualComparer.cs
- Pointer.cs
- xmlfixedPageInfo.cs
- SectionVisual.cs
- HostingEnvironmentSection.cs
- TagPrefixAttribute.cs
- __FastResourceComparer.cs
- DataConnectionHelper.cs
- PreProcessor.cs
- StylusPointCollection.cs
- SelectionRange.cs
- DesignerProperties.cs
- FixedHyperLink.cs
- SiteMapNode.cs
- SmiEventSink_Default.cs
- COM2Properties.cs
- HierarchicalDataTemplate.cs
- ImageSource.cs
- XsdDataContractImporter.cs
- VectorConverter.cs
- BoundConstants.cs
- DependentTransaction.cs
- RichTextBoxAutomationPeer.cs
- BitHelper.cs
- TemplatePropertyEntry.cs
- ServerValidateEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- AncestorChangedEventArgs.cs
- DataPointer.cs
- SqlUtil.cs
- MsmqInputChannelListener.cs
- StringUtil.cs
- ExpressionReplacer.cs
- ViewManager.cs
- HtmlInputButton.cs
- RequestQueryParser.cs
- PageSetupDialog.cs
- XPathDocumentNavigator.cs
- StringFormat.cs
- HtmlInputRadioButton.cs
- DocumentPageViewAutomationPeer.cs
- StateWorkerRequest.cs
- MessageEncoderFactory.cs
- Int64.cs
- Win32SafeHandles.cs
- ToolBar.cs
- arclist.cs
- DataColumnMappingCollection.cs
- FloaterBaseParagraph.cs
- NotImplementedException.cs
- KeyTime.cs
- GlyphElement.cs
- DocumentViewer.cs
- updateconfighost.cs
- XAMLParseException.cs
- ParsedAttributeCollection.cs
- UIPermission.cs
- SqlRetyper.cs
- NumberFormatter.cs
- ByteStreamGeometryContext.cs
- DataDocumentXPathNavigator.cs
- XmlSchemaExporter.cs
- Converter.cs
- ValueUnavailableException.cs
- SendMailErrorEventArgs.cs
- GroupDescription.cs
- InfoCardCryptoHelper.cs
- UsernameTokenFactoryCredential.cs
- PipeException.cs
- Compilation.cs
- COM2ExtendedUITypeEditor.cs
- Pkcs7Signer.cs
- Internal.cs
- HostingMessageProperty.cs
- GridViewPageEventArgs.cs
- TimeStampChecker.cs
- BaseValidatorDesigner.cs
- XmlAtomErrorReader.cs
- NamespaceInfo.cs
- dataSvcMapFileLoader.cs
- sqlpipe.cs
- Parameter.cs
- WorkflowPersistenceService.cs
- BitmapEffectCollection.cs
- BamlResourceSerializer.cs
- ToolBar.cs
- StatusBarDrawItemEvent.cs
- DocumentReference.cs
- RenderOptions.cs
- DataGridItemAutomationPeer.cs
- CodeRemoveEventStatement.cs
- XmlNamedNodeMap.cs
- DefinitionBase.cs
- ExtendedPropertiesHandler.cs