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
- CategoryAttribute.cs
- NonParentingControl.cs
- DurationConverter.cs
- SelectionBorderGlyph.cs
- CommandBinding.cs
- TogglePattern.cs
- Drawing.cs
- ColumnMap.cs
- WebBrowser.cs
- HtmlImage.cs
- ResolveResponse.cs
- NumericPagerField.cs
- ProcessInfo.cs
- SchemaMerger.cs
- TreeNode.cs
- UTF32Encoding.cs
- PrintDialogException.cs
- XpsInterleavingPolicy.cs
- IconBitmapDecoder.cs
- RecognizeCompletedEventArgs.cs
- TextDecorations.cs
- MenuItemBindingCollection.cs
- SecureUICommand.cs
- LineBreakRecord.cs
- Pool.cs
- OverlappedAsyncResult.cs
- CompositeDataBoundControl.cs
- XhtmlBasicPanelAdapter.cs
- VBIdentifierDesigner.xaml.cs
- CodeSubDirectoriesCollection.cs
- CommentEmitter.cs
- HashMembershipCondition.cs
- XhtmlBasicPageAdapter.cs
- XsltQilFactory.cs
- HttpCapabilitiesEvaluator.cs
- DesignTimeValidationFeature.cs
- TypefaceMetricsCache.cs
- Error.cs
- PropertyValueChangedEvent.cs
- HtmlPhoneCallAdapter.cs
- ImageDrawing.cs
- HwndSubclass.cs
- SqlClientPermission.cs
- MetadataArtifactLoader.cs
- BaseAppDomainProtocolHandler.cs
- WebZone.cs
- WebHttpBindingElement.cs
- FontFamily.cs
- SafeThemeHandle.cs
- DataGridViewHeaderCell.cs
- QuaternionAnimation.cs
- WebSysDefaultValueAttribute.cs
- MulticastNotSupportedException.cs
- WebScriptClientGenerator.cs
- CompModSwitches.cs
- CellConstantDomain.cs
- DataGridViewRowConverter.cs
- PriorityRange.cs
- ConfigurationConverterBase.cs
- DataGridViewCellEventArgs.cs
- InfoCardArgumentException.cs
- SelectedDatesCollection.cs
- BinaryConverter.cs
- FieldInfo.cs
- SequenceDesigner.cs
- ListViewDataItem.cs
- ReferenceService.cs
- AttachedAnnotationChangedEventArgs.cs
- RuleInfoComparer.cs
- DetailsViewInsertedEventArgs.cs
- TextMarkerSource.cs
- DesignerMetadata.cs
- SignatureDescription.cs
- KernelTypeValidation.cs
- UserPersonalizationStateInfo.cs
- WebPartPersonalization.cs
- SpnEndpointIdentityExtension.cs
- ConstNode.cs
- DynamicDataManager.cs
- WorkflowTerminatedException.cs
- DataContractSerializerOperationBehavior.cs
- OdbcFactory.cs
- MediaTimeline.cs
- XmlResolver.cs
- SourceChangedEventArgs.cs
- NavigationPropertyEmitter.cs
- GetUserPreferenceRequest.cs
- OdbcCommand.cs
- RectangleGeometry.cs
- CustomWebEventKey.cs
- XmlWrappingWriter.cs
- WebHttpDispatchOperationSelector.cs
- Variant.cs
- WindowsSecurityToken.cs
- LazyTextWriterCreator.cs
- ObjectListGeneralPage.cs
- DynamicDataRoute.cs
- EmissiveMaterial.cs
- DescriptionAttribute.cs
- CodeObjectCreateExpression.cs