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
- HexParser.cs
- ExeContext.cs
- TextDecorations.cs
- RuntimeResourceSet.cs
- SqlBinder.cs
- UdpDuplexChannel.cs
- FilteredDataSetHelper.cs
- SingleAnimationUsingKeyFrames.cs
- Compiler.cs
- TypeSystem.cs
- M3DUtil.cs
- EmbeddedMailObject.cs
- CacheVirtualItemsEvent.cs
- PowerStatus.cs
- TextServicesCompartmentContext.cs
- ProvidersHelper.cs
- ReadOnlyDataSourceView.cs
- NamespaceImport.cs
- InvariantComparer.cs
- SpanIndex.cs
- SHA512.cs
- StrokeFIndices.cs
- ApplicationId.cs
- TransactionManagerProxy.cs
- ToolStripDesignerUtils.cs
- TraceContext.cs
- HtmlControlPersistable.cs
- Subtree.cs
- HttpStaticObjectsCollectionBase.cs
- UpDownBase.cs
- Connection.cs
- DbException.cs
- HitTestWithGeometryDrawingContextWalker.cs
- DeviceContext2.cs
- TableHeaderCell.cs
- RC2CryptoServiceProvider.cs
- ErrorItem.cs
- TemplateControl.cs
- KeySplineConverter.cs
- XmlSchemaDocumentation.cs
- Compiler.cs
- KnownBoxes.cs
- SHA1Cng.cs
- RemotingException.cs
- ToolStripOverflowButton.cs
- ToolStripPanelCell.cs
- CodeTryCatchFinallyStatement.cs
- DecoderReplacementFallback.cs
- Update.cs
- SrgsGrammar.cs
- EntityContainerEmitter.cs
- BoundPropertyEntry.cs
- DocumentGrid.cs
- MaskedTextBoxDesignerActionList.cs
- AuthStoreRoleProvider.cs
- TextServicesProperty.cs
- HwndKeyboardInputProvider.cs
- ForeignConstraint.cs
- Cursor.cs
- BindableAttribute.cs
- HostSecurityManager.cs
- DependencyPropertyConverter.cs
- SqlCacheDependencySection.cs
- PasswordTextContainer.cs
- sqlinternaltransaction.cs
- StorageScalarPropertyMapping.cs
- CreateUserWizard.cs
- WinCategoryAttribute.cs
- InputMethodStateChangeEventArgs.cs
- ActivityCodeGenerator.cs
- AppSettingsExpressionBuilder.cs
- TrustSection.cs
- UpdateRecord.cs
- AutoCompleteStringCollection.cs
- ContentElement.cs
- KeySplineConverter.cs
- DictionaryBase.cs
- JournalEntryStack.cs
- ComponentEditorForm.cs
- Point3DCollectionConverter.cs
- Dictionary.cs
- StorageSetMapping.cs
- TypeUtil.cs
- StringReader.cs
- Constraint.cs
- OutputCacheProfileCollection.cs
- DockingAttribute.cs
- DetailsViewPageEventArgs.cs
- InvokePattern.cs
- SqlUtils.cs
- KeyboardEventArgs.cs
- DesigntimeLicenseContext.cs
- Currency.cs
- MenuCommand.cs
- DataGridColumnReorderingEventArgs.cs
- ThreadAbortException.cs
- HtmlContainerControl.cs
- _HTTPDateParse.cs
- TextLine.cs
- StorageEntityContainerMapping.cs