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
- RelOps.cs
- PropertyItemInternal.cs
- Crc32.cs
- WhitespaceRule.cs
- NavigationService.cs
- DiagnosticSection.cs
- DataRowView.cs
- SoapFault.cs
- TextSelectionProcessor.cs
- IChannel.cs
- MachineKeySection.cs
- DesignerVerbCollection.cs
- RegexCapture.cs
- ToolStripDesignerUtils.cs
- KnowledgeBase.cs
- HMACRIPEMD160.cs
- RemotingConfiguration.cs
- X509RecipientCertificateClientElement.cs
- EndOfStreamException.cs
- MemoryPressure.cs
- TrackBarRenderer.cs
- XPathNavigatorKeyComparer.cs
- GenerateTemporaryAssemblyTask.cs
- AmbientLight.cs
- RowUpdatingEventArgs.cs
- HtmlLiteralTextAdapter.cs
- RemoteCryptoSignHashRequest.cs
- DetailsViewCommandEventArgs.cs
- InkPresenter.cs
- ColumnWidthChangedEvent.cs
- HyperLinkColumn.cs
- ConfigurationManagerInternal.cs
- TypeViewSchema.cs
- ApplicationServicesHostFactory.cs
- DirectoryNotFoundException.cs
- ContainerUtilities.cs
- ScriptingRoleServiceSection.cs
- SqlOuterApplyReducer.cs
- HMACMD5.cs
- ExtenderControl.cs
- SectionUpdates.cs
- CacheRequest.cs
- ParameterModifier.cs
- UnknownBitmapEncoder.cs
- MenuItem.cs
- EntityProviderFactory.cs
- ConfigXmlElement.cs
- RepeatButton.cs
- PackagingUtilities.cs
- TCPListener.cs
- HttpWebRequest.cs
- ExeConfigurationFileMap.cs
- Mapping.cs
- SqlHelper.cs
- nulltextnavigator.cs
- NotifyInputEventArgs.cs
- ServiceModelReg.cs
- SelectionListDesigner.cs
- XmlDigitalSignatureProcessor.cs
- ResourceType.cs
- ServiceEndpointAssociationProvider.cs
- QuotedPairReader.cs
- XmlHierarchyData.cs
- WindowsToolbarItemAsMenuItem.cs
- ColorMap.cs
- Journaling.cs
- ImageCreator.cs
- Int16Converter.cs
- IteratorFilter.cs
- ExpressionEditorAttribute.cs
- DataGridViewRowsRemovedEventArgs.cs
- FrameworkContextData.cs
- SqlRowUpdatingEvent.cs
- SqlDataSourceParameterParser.cs
- PrintController.cs
- GridViewCancelEditEventArgs.cs
- AuthenticationException.cs
- CompilerCollection.cs
- DataObjectEventArgs.cs
- HierarchicalDataBoundControlAdapter.cs
- UnsafeNativeMethods.cs
- ObjectViewQueryResultData.cs
- MeasureData.cs
- PasswordPropertyTextAttribute.cs
- ButtonBase.cs
- TemplatedAdorner.cs
- StreamResourceInfo.cs
- PrintDocument.cs
- Encoder.cs
- ReferenceCountedObject.cs
- CustomErrorCollection.cs
- InfoCardServiceInstallComponent.cs
- ScrollViewerAutomationPeer.cs
- BypassElement.cs
- Validator.cs
- ApplicationGesture.cs
- Dump.cs
- ExpandCollapsePatternIdentifiers.cs
- WorkflowMarkupSerializationProvider.cs
- Int32Storage.cs