Code:
/ DotNET / DotNET / 8.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
- CustomActivityDesigner.cs
- X509WindowsSecurityToken.cs
- SQLInt32Storage.cs
- SafeHandles.cs
- AgileSafeNativeMemoryHandle.cs
- ColorConverter.cs
- SchemaInfo.cs
- ListViewDataItem.cs
- UnaryQueryOperator.cs
- TextElementEditingBehaviorAttribute.cs
- _LocalDataStoreMgr.cs
- XamlSerializerUtil.cs
- XmlIlGenerator.cs
- HostingEnvironmentException.cs
- OptimalBreakSession.cs
- TextEffect.cs
- DbRetry.cs
- MetabaseReader.cs
- TextSerializer.cs
- OptimalBreakSession.cs
- ClientConfigPaths.cs
- SqlCommand.cs
- XmlJsonWriter.cs
- Figure.cs
- TransformDescriptor.cs
- HttpTransportSecurityElement.cs
- ExpressionPrefixAttribute.cs
- WorkflowDesigner.cs
- Composition.cs
- XamlBrushSerializer.cs
- BaseTransportHeaders.cs
- exports.cs
- NullEntityWrapper.cs
- TrackingQuery.cs
- GetImportFileNameRequest.cs
- Mapping.cs
- Empty.cs
- Group.cs
- DependencyPropertyDescriptor.cs
- PenContext.cs
- TextBoxRenderer.cs
- PriorityItem.cs
- WindowsPen.cs
- RequestStatusBarUpdateEventArgs.cs
- CompositeActivityMarkupSerializer.cs
- PolyQuadraticBezierSegment.cs
- RelationshipConverter.cs
- Registry.cs
- HashHelper.cs
- ListViewCancelEventArgs.cs
- DataSourceBooleanViewSchemaConverter.cs
- XPathDocument.cs
- DropDownList.cs
- TcpClientChannel.cs
- TablePattern.cs
- EntityDataSourceView.cs
- SafeNativeMethods.cs
- CompletionProxy.cs
- log.cs
- linebase.cs
- SubMenuStyle.cs
- DirectoryObjectSecurity.cs
- ListenerConnectionModeReader.cs
- WindowsFont.cs
- MasterPageCodeDomTreeGenerator.cs
- SessionParameter.cs
- StorageEndPropertyMapping.cs
- PreviewPrintController.cs
- XmlSerializer.cs
- EntityParameterCollection.cs
- PackageStore.cs
- CodeTypeConstructor.cs
- AsyncDataRequest.cs
- BuildManagerHost.cs
- DependencyObject.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- TransformerInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- SimpleTypeResolver.cs
- PropertyMapper.cs
- ListViewItemMouseHoverEvent.cs
- NoClickablePointException.cs
- SiteMapNodeItem.cs
- OleDbFactory.cs
- SqlUtil.cs
- TogglePattern.cs
- MDIClient.cs
- WS2007FederationHttpBinding.cs
- WebPartCloseVerb.cs
- xmlfixedPageInfo.cs
- XmlSchemaSimpleTypeRestriction.cs
- StrokeCollection2.cs
- DockEditor.cs
- ClientSettingsStore.cs
- ITreeGenerator.cs
- DataKey.cs
- CookieProtection.cs
- PartialCachingAttribute.cs
- WebSysDescriptionAttribute.cs
- CryptoConfig.cs