Code:
/ FX-1434 / FX-1434 / 1.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
- TextServicesCompartment.cs
- CreateUserWizardStep.cs
- BamlTreeNode.cs
- CommandArguments.cs
- RectAnimationClockResource.cs
- OverlappedAsyncResult.cs
- documentation.cs
- TileModeValidation.cs
- EditModeSwitchButton.cs
- XPathDocument.cs
- DSACryptoServiceProvider.cs
- PropertyValueChangedEvent.cs
- ErrorWebPart.cs
- Helper.cs
- WebPartConnectVerb.cs
- StylusPoint.cs
- ImageConverter.cs
- UserControl.cs
- TemplateColumn.cs
- JournalEntryStack.cs
- DecodeHelper.cs
- XMLSchema.cs
- Subtree.cs
- Viewport3DAutomationPeer.cs
- CallbackException.cs
- WebColorConverter.cs
- FormatterServicesNoSerializableCheck.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- StateManagedCollection.cs
- EnumerableCollectionView.cs
- ArgumentDesigner.xaml.cs
- PageTheme.cs
- BamlWriter.cs
- SmiTypedGetterSetter.cs
- InputEventArgs.cs
- SequenceQuery.cs
- X509Chain.cs
- DeleteMemberBinder.cs
- ProviderConnectionPoint.cs
- ListViewItem.cs
- ReadOnlyHierarchicalDataSource.cs
- SqlDataSourceParameterParser.cs
- FrameSecurityDescriptor.cs
- AdPostCacheSubstitution.cs
- ConfigXmlSignificantWhitespace.cs
- sqlcontext.cs
- OAVariantLib.cs
- FilteredAttributeCollection.cs
- RegistrySecurity.cs
- Panel.cs
- shaperfactoryquerycachekey.cs
- ToolboxItemAttribute.cs
- Style.cs
- JsonByteArrayDataContract.cs
- KeyboardNavigation.cs
- LambdaCompiler.Address.cs
- SecUtil.cs
- PersonalizationStateQuery.cs
- LowerCaseStringConverter.cs
- EventLogger.cs
- OperationAbortedException.cs
- SqlDependency.cs
- ApplicationSecurityInfo.cs
- WindowInteropHelper.cs
- DBDataPermissionAttribute.cs
- CodeVariableDeclarationStatement.cs
- Perspective.cs
- ResetableIterator.cs
- Tuple.cs
- RtfFormatStack.cs
- BitmapEffectGroup.cs
- SchemaImporterExtensionsSection.cs
- HtmlShimManager.cs
- AppAction.cs
- FileInfo.cs
- XmlAttributeOverrides.cs
- JoinTreeSlot.cs
- Error.cs
- ConfigurationManager.cs
- DBSchemaRow.cs
- WebServicesSection.cs
- ExpressionTextBox.xaml.cs
- BezierSegment.cs
- ListParaClient.cs
- ThreadInterruptedException.cs
- DbProviderFactory.cs
- RegexTree.cs
- BamlRecordHelper.cs
- SQLUtility.cs
- SqlClientWrapperSmiStream.cs
- HandleRef.cs
- RtfToXamlLexer.cs
- DefaultHttpHandler.cs
- Message.cs
- MouseGestureValueSerializer.cs
- ExtensionWindowResizeGrip.cs
- DataGridViewCellValueEventArgs.cs
- ControlOperationBehavior.cs
- FindCompletedEventArgs.cs
- ConstraintConverter.cs