Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / Design / VerbConverter.cs / 1 / VerbConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics.Design { using System.Diagnostics; using System; using System.Design; using System.Windows.Forms.ComponentModel; using System.ComponentModel; using System.ComponentModel.Design; using System.Globalization; ////// /// Editor that shows a list of verbs based on the value of the FileName property. /// ///internal class VerbConverter : TypeConverter { private const string DefaultVerb = SR.VerbEditorDefault; /// /// /// public VerbConverter() { } ////// Initializes a new instance of the 'VerbConverter' class for the given type. /// ////// /// /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } ////// /// /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { string text = ((string)value).Trim(); return text; } return base.ConvertFrom(context, culture, value); } ////// /// /// public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ProcessStartInfo info = (context == null) ? null : context.Instance as ProcessStartInfo; StandardValuesCollection values; if (info != null) values = new StandardValuesCollection(info.Verbs); else values = null; return values; } ///Gets a collection of standard values for the data type this validator is /// designed for. ////// /// /// public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { return true; } public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.Gets a value indicating /// whether this object /// supports a standard set of values that can be picked /// from a list using the specified context. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeAttachEventStatement.cs
- ToolStripOverflow.cs
- XmlExpressionDumper.cs
- BinHexEncoder.cs
- ColumnCollectionEditor.cs
- ResourceReferenceExpressionConverter.cs
- ServiceAuthorizationElement.cs
- NativeCompoundFileAPIs.cs
- RemoteWebConfigurationHostStream.cs
- MasterPage.cs
- SystemMulticastIPAddressInformation.cs
- InputLanguageEventArgs.cs
- ControlCommandSet.cs
- Activator.cs
- X509Utils.cs
- ItemsControlAutomationPeer.cs
- HostedTransportConfigurationManager.cs
- InputScope.cs
- TextBreakpoint.cs
- XPathMultyIterator.cs
- AlphabeticalEnumConverter.cs
- UIAgentMonitorHandle.cs
- MappableObjectManager.cs
- SqlDependencyUtils.cs
- DesignTableCollection.cs
- SetterBaseCollection.cs
- TextContainerHelper.cs
- WrappedReader.cs
- RequestQueue.cs
- DiscoveryReferences.cs
- ConfigurationProperty.cs
- HandledEventArgs.cs
- PageBuildProvider.cs
- ThreadStateException.cs
- ResourceDisplayNameAttribute.cs
- ObjectComplexPropertyMapping.cs
- ProbeMatchesMessage11.cs
- ParallelDesigner.xaml.cs
- WCFBuildProvider.cs
- SqlDataSourceQueryConverter.cs
- BufferModesCollection.cs
- ObjectPropertyMapping.cs
- DefaultSerializationProviderAttribute.cs
- XmlSchemaSimpleType.cs
- InputBinder.cs
- RuntimeHandles.cs
- SQLConvert.cs
- XmlAnyElementAttribute.cs
- SecurityContextSecurityTokenResolver.cs
- CustomSignedXml.cs
- COM2PropertyPageUITypeConverter.cs
- HopperCache.cs
- SqlExpressionNullability.cs
- GeneralTransform2DTo3DTo2D.cs
- BasePropertyDescriptor.cs
- Formatter.cs
- LinqDataSourceSelectEventArgs.cs
- OpenFileDialog.cs
- InkCanvas.cs
- SR.cs
- NamedPipeChannelListener.cs
- XmlSchemaParticle.cs
- EntityClientCacheKey.cs
- EncodingNLS.cs
- SignedXml.cs
- XmlLinkedNode.cs
- FloaterBaseParaClient.cs
- TranslateTransform.cs
- WebPartUtil.cs
- DurableInstanceProvider.cs
- Set.cs
- HttpModule.cs
- OdbcReferenceCollection.cs
- WinFormsComponentEditor.cs
- MD5.cs
- GenericWebPart.cs
- Subset.cs
- StateMachineWorkflowInstance.cs
- DependencyPropertyConverter.cs
- ServiceElement.cs
- ResourceCodeDomSerializer.cs
- DataControlLinkButton.cs
- ConnectionPoolRegistry.cs
- RedirectionProxy.cs
- LayoutTable.cs
- DefaultValueConverter.cs
- FileSecurity.cs
- ServerIdentity.cs
- Span.cs
- IIS7WorkerRequest.cs
- AssemblyResourceLoader.cs
- TabItem.cs
- ClientCredentialsSecurityTokenManager.cs
- DataListItemEventArgs.cs
- EditorBrowsableAttribute.cs
- ResourceReader.cs
- GraphicsPathIterator.cs
- WindowsListViewItem.cs
- Identity.cs
- SelectionBorderGlyph.cs