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
- sqlmetadatafactory.cs
- XPathDocumentBuilder.cs
- Int32.cs
- HiddenField.cs
- RecognitionEventArgs.cs
- DelegatedStream.cs
- LinearGradientBrush.cs
- DataServiceSaveChangesEventArgs.cs
- ItemCollection.cs
- WinFormsUtils.cs
- ComponentDispatcherThread.cs
- GridItem.cs
- GeneralTransform3DTo2D.cs
- SynchronizationContext.cs
- GeneralTransform.cs
- DrawingState.cs
- PageClientProxyGenerator.cs
- ProtocolsSection.cs
- ProviderMetadataCachedInformation.cs
- SequentialUshortCollection.cs
- XmlTextWriter.cs
- ContractMapping.cs
- AppDomainManager.cs
- DataGridViewCellEventArgs.cs
- DefinitionBase.cs
- ImplicitInputBrush.cs
- SchemaNamespaceManager.cs
- GeneralTransformGroup.cs
- Soap12ProtocolImporter.cs
- InputGestureCollection.cs
- TabControl.cs
- HtmlInputText.cs
- ContentTextAutomationPeer.cs
- StylusButton.cs
- ValueCollectionParameterReader.cs
- CommandManager.cs
- OperationPerformanceCounters.cs
- ProfileSection.cs
- ProfilePropertyNameValidator.cs
- ISFTagAndGuidCache.cs
- AssemblyCollection.cs
- SpellerInterop.cs
- ExtenderProvidedPropertyAttribute.cs
- ByteStream.cs
- ManualResetEvent.cs
- XmlRawWriter.cs
- MenuItemStyle.cs
- StorageEndPropertyMapping.cs
- GridViewCellAutomationPeer.cs
- DefaultBinder.cs
- ValidationError.cs
- SwitchElementsCollection.cs
- XmlSchemas.cs
- DocumentPageViewAutomationPeer.cs
- ComAdminInterfaces.cs
- ThreadAbortException.cs
- Mouse.cs
- AddInAttribute.cs
- DiagnosticsConfiguration.cs
- Cursors.cs
- Wildcard.cs
- UriTemplateTrieNode.cs
- SplashScreen.cs
- RuleCache.cs
- ConnectionStringSettings.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- columnmapfactory.cs
- EntityCollection.cs
- WebPartCloseVerb.cs
- MultiTrigger.cs
- InternalBase.cs
- DefaultValueTypeConverter.cs
- DoubleLinkListEnumerator.cs
- AccessorTable.cs
- AnnotationService.cs
- MessageSmuggler.cs
- LinkGrep.cs
- CombinedGeometry.cs
- HttpAsyncResult.cs
- MobileCategoryAttribute.cs
- UnionCodeGroup.cs
- XmlNamespaceDeclarationsAttribute.cs
- DeobfuscatingStream.cs
- DataGridViewColumnEventArgs.cs
- ValidationResult.cs
- QueryExtender.cs
- UpdateTracker.cs
- DockAndAnchorLayout.cs
- FixedSchema.cs
- TimeoutValidationAttribute.cs
- RuntimeResourceSet.cs
- DataColumnMapping.cs
- Matrix3D.cs
- ApplicationBuildProvider.cs
- RichTextBoxAutomationPeer.cs
- DescendantQuery.cs
- ResourceExpression.cs
- X509Certificate.cs
- MultilineStringEditor.cs
- OutputScope.cs