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
- XmlAggregates.cs
- ExpandedProjectionNode.cs
- SpellerInterop.cs
- BufferedGraphicsManager.cs
- MenuItemCollection.cs
- DesignConnectionCollection.cs
- ViewStateException.cs
- ServiceContractGenerationContext.cs
- CollectionViewGroupInternal.cs
- NamespaceEmitter.cs
- PathSegmentCollection.cs
- MenuItemStyle.cs
- MsmqAppDomainProtocolHandler.cs
- AutomationAttributeInfo.cs
- RegistrationServices.cs
- LinkedList.cs
- PerformanceCounterLib.cs
- ViewGenResults.cs
- KeyProperty.cs
- EastAsianLunisolarCalendar.cs
- ConfigurationValidatorAttribute.cs
- MulticastIPAddressInformationCollection.cs
- ColumnWidthChangingEvent.cs
- SHA512.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ClientConvert.cs
- FormViewDeletedEventArgs.cs
- SettingsBindableAttribute.cs
- StorageEntityContainerMapping.cs
- Line.cs
- DependencyObjectType.cs
- BitmapImage.cs
- HtmlTableRow.cs
- ListViewDeletedEventArgs.cs
- DebugView.cs
- XPathBinder.cs
- SafeUserTokenHandle.cs
- InnerItemCollectionView.cs
- keycontainerpermission.cs
- CheckPair.cs
- InvokeGenerator.cs
- ObjectDataSource.cs
- Icon.cs
- WebPartDescription.cs
- DLinqTableProvider.cs
- Binding.cs
- FixedTextView.cs
- DataViewSettingCollection.cs
- SiteOfOriginContainer.cs
- StringDictionary.cs
- CompositeDataBoundControl.cs
- MappingException.cs
- Positioning.cs
- SelectionRange.cs
- XmlImplementation.cs
- OracleDataAdapter.cs
- DataGridViewColumnHeaderCell.cs
- GrammarBuilderWildcard.cs
- StorageAssociationTypeMapping.cs
- SimpleMailWebEventProvider.cs
- OracleParameterCollection.cs
- InfoCardSymmetricCrypto.cs
- DataControlFieldCell.cs
- InvalidOleVariantTypeException.cs
- CurrentTimeZone.cs
- SchemaNamespaceManager.cs
- RichTextBox.cs
- LinqDataSource.cs
- IsolatedStorage.cs
- ComboBoxRenderer.cs
- TextSyndicationContentKindHelper.cs
- _Connection.cs
- ManualResetEvent.cs
- List.cs
- RecognizedPhrase.cs
- RepeaterItemEventArgs.cs
- MessageSecurityOverHttp.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DocumentReference.cs
- RootDesignerSerializerAttribute.cs
- AdPostCacheSubstitution.cs
- XpsFont.cs
- ArithmeticException.cs
- CodeDefaultValueExpression.cs
- JoinCqlBlock.cs
- Buffer.cs
- FontSource.cs
- XPathChildIterator.cs
- DocumentViewerHelper.cs
- UnmanagedMemoryStreamWrapper.cs
- ColorContext.cs
- Type.cs
- UInt16Storage.cs
- ReaderWriterLockWrapper.cs
- SubpageParagraph.cs
- RSAPKCS1SignatureDeformatter.cs
- UntypedNullExpression.cs
- OlePropertyStructs.cs
- SerializationStore.cs
- MulticastOption.cs