Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DesignBinding.cs / 1 / DesignBinding.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.Design { using System; using System.ComponentModel; using System.Drawing.Design; using System.Globalization; [ Editor("System.Windows.Forms.Design.DesignBindingEditor, " + AssemblyRef.SystemDesign,typeof(UITypeEditor)) ] internal class DesignBinding { private object dataSource; private string dataMember; public static DesignBinding Null = new DesignBinding(null, null); public DesignBinding(object dataSource, string dataMember) { this.dataSource = dataSource; this.dataMember = dataMember; } public bool IsNull { get { return (dataSource == null); } } public object DataSource { get { return dataSource; } } public string DataMember { get { return dataMember; } } public string DataField { get { if (String.IsNullOrEmpty(dataMember)) { return String.Empty; } int lastDot = dataMember.LastIndexOf("."); if (lastDot == -1) { return dataMember; } else { return dataMember.Substring(lastDot+1); } } } public bool Equals(object dataSource, string dataMember) { return (dataSource == this.dataSource && String.Equals(dataMember, this.dataMember, StringComparison.OrdinalIgnoreCase)); } } } // 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
- TypedRowGenerator.cs
- LayoutEditorPart.cs
- Border.cs
- WebAdminConfigurationHelper.cs
- DataGridColumn.cs
- _Events.cs
- TreeViewImageKeyConverter.cs
- CharAnimationUsingKeyFrames.cs
- SharedPerformanceCounter.cs
- SamlAttributeStatement.cs
- Random.cs
- _AcceptOverlappedAsyncResult.cs
- ReflectionHelper.cs
- CurrencyManager.cs
- SmiEventSink.cs
- DataGridViewRowsAddedEventArgs.cs
- ThreadStateException.cs
- SR.cs
- ConfigurationLoader.cs
- EndpointDiscoveryBehavior.cs
- DataSvcMapFile.cs
- GraphicsPath.cs
- EndpointNameMessageFilter.cs
- EditorBrowsableAttribute.cs
- FindSimilarActivitiesVerb.cs
- BitmapFrameDecode.cs
- MetadataProperty.cs
- BufferedStream.cs
- CodeArrayIndexerExpression.cs
- ItemContainerGenerator.cs
- DataGridHelper.cs
- NamespaceInfo.cs
- InputLangChangeEvent.cs
- XmlEventCache.cs
- SoapAttributes.cs
- ProxyWebPartManagerDesigner.cs
- TreeIterators.cs
- ReadOnlyMetadataCollection.cs
- DropShadowEffect.cs
- ViewRendering.cs
- HttpVersion.cs
- Point.cs
- DataGridViewRowConverter.cs
- PropertyInformationCollection.cs
- ResourceContainer.cs
- Content.cs
- FileAuthorizationModule.cs
- TableLayoutSettings.cs
- AutomationElementCollection.cs
- TraceLog.cs
- Transactions.cs
- ExpressionValueEditor.cs
- TemplateControlBuildProvider.cs
- SchemaExporter.cs
- MarshalByRefObject.cs
- ProfileService.cs
- MatrixAnimationUsingPath.cs
- DataGridTable.cs
- XmlArrayItemAttributes.cs
- XmlSequenceWriter.cs
- LayoutUtils.cs
- PropertyTabAttribute.cs
- InstancePersistence.cs
- OperandQuery.cs
- SigningCredentials.cs
- XmlAtomicValue.cs
- BufferedResponseStream.cs
- PopupRoot.cs
- CollectionViewProxy.cs
- RegexWorker.cs
- AssemblyResourceLoader.cs
- FileDialogPermission.cs
- RtType.cs
- DesignTimeTemplateParser.cs
- CornerRadiusConverter.cs
- HTMLTagNameToTypeMapper.cs
- FixedSOMPageConstructor.cs
- OdbcCommandBuilder.cs
- TableLayoutStyle.cs
- ReceiveReply.cs
- HttpAsyncResult.cs
- Enlistment.cs
- MainMenu.cs
- FontFamily.cs
- SoapElementAttribute.cs
- WebSysDisplayNameAttribute.cs
- CharStorage.cs
- Util.cs
- DrawListViewItemEventArgs.cs
- LocalIdKeyIdentifierClause.cs
- BStrWrapper.cs
- MessageFault.cs
- ServiceModelSecurityTokenTypes.cs
- WorkflowViewService.cs
- ThemeDirectoryCompiler.cs
- ObjectCacheSettings.cs
- ButtonBase.cs
- EventLogEntry.cs
- DesignerVerb.cs
- RichTextBoxDesigner.cs