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
- EncodingFallbackAwareXmlTextWriter.cs
- SerializationObjectManager.cs
- cookieexception.cs
- RequestQueue.cs
- GcSettings.cs
- DeferredReference.cs
- TcpServerChannel.cs
- DesignerTransactionCloseEvent.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- OrderingInfo.cs
- _PooledStream.cs
- DataGridViewColumnHeaderCell.cs
- MimePart.cs
- Matrix3DValueSerializer.cs
- WizardStepCollectionEditor.cs
- AppSettingsSection.cs
- CompoundFileStorageReference.cs
- NeutralResourcesLanguageAttribute.cs
- TextTrailingCharacterEllipsis.cs
- UniqueIdentifierService.cs
- DataGridViewImageCell.cs
- Setter.cs
- TaiwanLunisolarCalendar.cs
- FunctionImportElement.cs
- GPPOINTF.cs
- ResXDataNode.cs
- ForEachAction.cs
- TextServicesProperty.cs
- MiniModule.cs
- WindowsFormsDesignerOptionService.cs
- Hashtable.cs
- MaterialCollection.cs
- RestClientProxyHandler.cs
- RelationHandler.cs
- PolicyValidationException.cs
- ProcessInfo.cs
- WorkItem.cs
- SecUtil.cs
- MemberProjectedSlot.cs
- BufferedOutputStream.cs
- SqlXml.cs
- QilChoice.cs
- URL.cs
- ObservableCollection.cs
- BroadcastEventHelper.cs
- CellIdBoolean.cs
- ClientCultureInfo.cs
- DrawingAttributesDefaultValueFactory.cs
- UndirectedGraph.cs
- PageBuildProvider.cs
- UserNameServiceElement.cs
- CodeObject.cs
- MimeMultiPart.cs
- DuplicateWaitObjectException.cs
- MethodBuilder.cs
- ServiceDescriptionImporter.cs
- RelationshipEndCollection.cs
- CatalogZone.cs
- StorageInfo.cs
- NullableDoubleAverageAggregationOperator.cs
- FormatException.cs
- SortableBindingList.cs
- GenericWebPart.cs
- LayoutSettings.cs
- InertiaTranslationBehavior.cs
- PathFigureCollectionConverter.cs
- XmlQueryRuntime.cs
- EntityModelSchemaGenerator.cs
- QuaternionAnimation.cs
- XmlAttributeProperties.cs
- ISAPIRuntime.cs
- WSHttpSecurityElement.cs
- DataBoundControlActionList.cs
- ScriptingScriptResourceHandlerSection.cs
- ActionMismatchAddressingException.cs
- TaskCanceledException.cs
- AttachedPropertyBrowsableAttribute.cs
- HttpRuntime.cs
- DataGridViewRowHeaderCell.cs
- Variant.cs
- ZipIOFileItemStream.cs
- RawUIStateInputReport.cs
- EntityExpressionVisitor.cs
- RtfToXamlReader.cs
- GeneratedCodeAttribute.cs
- DrawingContext.cs
- GPRECTF.cs
- Exception.cs
- InternalMappingException.cs
- AbstractSvcMapFileLoader.cs
- RefreshEventArgs.cs
- WorkflowViewStateService.cs
- DataServiceQueryException.cs
- ContentOnlyMessage.cs
- VersionPair.cs
- SystemColors.cs
- TranslateTransform.cs
- NetworkInformationException.cs
- MbpInfo.cs
- ChannelParameterCollection.cs