Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DataMemberFieldConverter.cs / 1 / DataMemberFieldConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.DataMemberFieldConverter..ctor()")] namespace System.Windows.Forms.Design { using System; using System.Globalization; using System.ComponentModel; internal class DataMemberFieldConverter : TypeConverter { 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 != null && value.Equals(System.Design.SR.GetString(System.Design.SR.None))) return String.Empty; else return value; } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string) && (value == null || value.Equals(String.Empty))) return System.Design.SR.GetString(System.Design.SR.None_lc); return base.ConvertTo(context, culture, value, destinationType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpProtocolImporter.cs
- BooleanConverter.cs
- Pair.cs
- GcHandle.cs
- ServiceDescriptionImporter.cs
- BaseEntityWrapper.cs
- HelpEvent.cs
- SystemGatewayIPAddressInformation.cs
- SqlParameterizer.cs
- SqlClientFactory.cs
- QilExpression.cs
- ConnectionPoolManager.cs
- TiffBitmapEncoder.cs
- HttpHandlerAction.cs
- DataGridViewColumnEventArgs.cs
- SQLMoneyStorage.cs
- IndexOutOfRangeException.cs
- XmlSchemaSimpleType.cs
- ParseNumbers.cs
- DefaultBindingPropertyAttribute.cs
- ServiceDesigner.cs
- CustomLineCap.cs
- ListViewInsertionMark.cs
- CodeCatchClause.cs
- ConnectionManagementElement.cs
- ResourceSetExpression.cs
- EntityStoreSchemaFilterEntry.cs
- DataGridHeaderBorder.cs
- MsmqIntegrationBindingElement.cs
- ClientTarget.cs
- HttpServerProtocol.cs
- SSmlParser.cs
- MouseButton.cs
- RecognizerInfo.cs
- SyndicationDeserializer.cs
- TextSelection.cs
- RectAnimationBase.cs
- PersonalizationStateInfo.cs
- ReadOnlyDictionary.cs
- InProcStateClientManager.cs
- CompatibleIComparer.cs
- XPathParser.cs
- CellQuery.cs
- LicenseContext.cs
- CodeGroup.cs
- FormViewCommandEventArgs.cs
- CompiledQuery.cs
- JumpList.cs
- AccessedThroughPropertyAttribute.cs
- EntitySqlQueryBuilder.cs
- MiniParameterInfo.cs
- SchemaName.cs
- InputScopeNameConverter.cs
- DeclarationUpdate.cs
- Border.cs
- RectAnimationUsingKeyFrames.cs
- CaseExpr.cs
- RuntimeHelpers.cs
- SingleStorage.cs
- IndentedWriter.cs
- MSAANativeProvider.cs
- FormatterServicesNoSerializableCheck.cs
- DataTableMapping.cs
- SQLString.cs
- DataGridState.cs
- ObjectQuery_EntitySqlExtensions.cs
- UnsafeNativeMethods.cs
- OdbcErrorCollection.cs
- ServiceDescriptionImporter.cs
- RoutedCommand.cs
- MimeParameter.cs
- UTF8Encoding.cs
- Debug.cs
- SafeRightsManagementSessionHandle.cs
- ApplicationInfo.cs
- XmlProcessingInstruction.cs
- XsdValidatingReader.cs
- ServiceModelStringsVersion1.cs
- VarInfo.cs
- SmiRequestExecutor.cs
- OLEDB_Util.cs
- SafeBitVector32.cs
- WebServiceParameterData.cs
- WindowsToolbarItemAsMenuItem.cs
- InvokeMemberBinder.cs
- ConfigurationValue.cs
- PropertyStore.cs
- AsyncPostBackErrorEventArgs.cs
- SqlUDTStorage.cs
- DependencyObjectProvider.cs
- RubberbandSelector.cs
- Stopwatch.cs
- AsymmetricKeyExchangeFormatter.cs
- RowVisual.cs
- SqlDataRecord.cs
- SubtreeProcessor.cs
- PartialTrustVisibleAssembly.cs
- PasswordTextNavigator.cs
- RadioButtonRenderer.cs
- ToolStrip.cs