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
- NullNotAllowedCollection.cs
- VersionUtil.cs
- SessionParameter.cs
- ControlParser.cs
- Command.cs
- ListChangedEventArgs.cs
- Msec.cs
- Size3DValueSerializer.cs
- ToolStripItemCollection.cs
- FunctionNode.cs
- SoapMessage.cs
- ObfuscateAssemblyAttribute.cs
- CompositeDataBoundControl.cs
- TemplateBuilder.cs
- Int16KeyFrameCollection.cs
- BmpBitmapEncoder.cs
- Console.cs
- VerticalAlignConverter.cs
- Choices.cs
- ReferentialConstraintRoleElement.cs
- MenuItemCollection.cs
- TraceListeners.cs
- StorageBasedPackageProperties.cs
- SafeFileHandle.cs
- PersistChildrenAttribute.cs
- FormViewRow.cs
- DecoderNLS.cs
- PageBorderless.cs
- smtppermission.cs
- FrameworkElement.cs
- ListenerUnsafeNativeMethods.cs
- CookieProtection.cs
- MachineKeyConverter.cs
- DataTableClearEvent.cs
- SspiNegotiationTokenProvider.cs
- SharedConnectionListener.cs
- XmlEntity.cs
- DocumentSchemaValidator.cs
- DSASignatureDeformatter.cs
- DataGridViewTextBoxEditingControl.cs
- HandlerWithFactory.cs
- BindingExpression.cs
- PngBitmapEncoder.cs
- OutArgumentConverter.cs
- WindowsUpDown.cs
- SynchronizationContext.cs
- followingsibling.cs
- ExpressionCopier.cs
- SchemaImporterExtension.cs
- DrawingImage.cs
- EventLogEntryCollection.cs
- GC.cs
- GeometryCollection.cs
- XmlReaderSettings.cs
- ValidatedControlConverter.cs
- ReceiveCompletedEventArgs.cs
- WebPartUserCapability.cs
- CounterSampleCalculator.cs
- util.cs
- FunctionParameter.cs
- SafeViewOfFileHandle.cs
- UrlMapping.cs
- ActiveXHost.cs
- SettingsAttributeDictionary.cs
- ToolboxItem.cs
- CodeNamespaceCollection.cs
- TemplateContentLoader.cs
- EntityDesignerDataSourceView.cs
- HWStack.cs
- RouteParameter.cs
- Repeater.cs
- SerializerProvider.cs
- ReferenceEqualityComparer.cs
- Vector3DAnimationUsingKeyFrames.cs
- Int32Collection.cs
- ShortcutKeysEditor.cs
- TypeElement.cs
- XmlSchemaAll.cs
- StringArrayConverter.cs
- TrackingParticipant.cs
- WsdlBuildProvider.cs
- followingquery.cs
- DbConvert.cs
- OperationCanceledException.cs
- TaskFormBase.cs
- SimpleTextLine.cs
- ProcessHost.cs
- EarlyBoundInfo.cs
- SQLResource.cs
- XmlSchemaSimpleTypeUnion.cs
- WrappedOptions.cs
- COSERVERINFO.cs
- AndCondition.cs
- SqlDataSourceQuery.cs
- WorkflowViewStateService.cs
- SqlRowUpdatedEvent.cs
- PointAnimationBase.cs
- TrackingDataItem.cs
- DataColumnMappingCollection.cs
- MetabaseServerConfig.cs