Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / PropertiesTab.cs / 1 / PropertiesTab.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.ComponentModel; using System.Windows.Forms.ComponentModel; using System.Windows.Forms.Design; using System.Collections; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class PropertiesTab : PropertyTab { ///[To be supplied.] ////// /// public override string TabName { get { return SR.GetString(SR.PBRSToolTipProperties); } } ///[To be supplied.] ////// /// public override string HelpKeyword { get { return "vs.properties"; // do not localize. } } ///[To be supplied.] ////// /// public override PropertyDescriptor GetDefaultProperty(object obj) { PropertyDescriptor def = base.GetDefaultProperty(obj); if (def == null) { PropertyDescriptorCollection props = GetProperties(obj); if (props != null) { for (int i = 0; i < props.Count; i++) { if ("Name".Equals(props[i].Name)) { def = props[i]; break; } } } } return def; } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes) { return GetProperties(null, component, attributes); } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { if (attributes == null) { attributes = new Attribute[]{BrowsableAttribute.Yes}; } if (context == null) { return TypeDescriptor.GetProperties(component, attributes); } else { TypeConverter tc = (context.PropertyDescriptor == null ? TypeDescriptor.GetConverter(component) : context.PropertyDescriptor.Converter); if (tc == null || !tc.GetPropertiesSupported(context)) { return TypeDescriptor.GetProperties(component, attributes); } else { return tc.GetProperties(context, component, attributes); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.ComponentModel; using System.Windows.Forms.ComponentModel; using System.Windows.Forms.Design; using System.Collections; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class PropertiesTab : PropertyTab { ///[To be supplied.] ////// /// public override string TabName { get { return SR.GetString(SR.PBRSToolTipProperties); } } ///[To be supplied.] ////// /// public override string HelpKeyword { get { return "vs.properties"; // do not localize. } } ///[To be supplied.] ////// /// public override PropertyDescriptor GetDefaultProperty(object obj) { PropertyDescriptor def = base.GetDefaultProperty(obj); if (def == null) { PropertyDescriptorCollection props = GetProperties(obj); if (props != null) { for (int i = 0; i < props.Count; i++) { if ("Name".Equals(props[i].Name)) { def = props[i]; break; } } } } return def; } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes) { return GetProperties(null, component, attributes); } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { if (attributes == null) { attributes = new Attribute[]{BrowsableAttribute.Yes}; } if (context == null) { return TypeDescriptor.GetProperties(component, attributes); } else { TypeConverter tc = (context.PropertyDescriptor == null ? TypeDescriptor.GetConverter(component) : context.PropertyDescriptor.Converter); if (tc == null || !tc.GetPropertiesSupported(context)) { return TypeDescriptor.GetProperties(component, attributes); } else { return tc.GetProperties(context, component, attributes); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QualifiedCellIdBoolean.cs
- SoapSchemaMember.cs
- SqlUserDefinedAggregateAttribute.cs
- ExpressionVisitorHelpers.cs
- StreamWithDictionary.cs
- CaretElement.cs
- SendParametersContent.cs
- TypeSystemProvider.cs
- SqlFactory.cs
- ClientFormsIdentity.cs
- TextEffectResolver.cs
- SmtpReplyReader.cs
- ReferenceConverter.cs
- WebException.cs
- XmlEntityReference.cs
- AppSecurityManager.cs
- DataGridViewRowCollection.cs
- HeaderCollection.cs
- TripleDESCryptoServiceProvider.cs
- PeerInvitationResponse.cs
- TTSVoice.cs
- DataSourceProvider.cs
- DataTableClearEvent.cs
- TableMethodGenerator.cs
- UnsignedPublishLicense.cs
- VisualStyleInformation.cs
- SelectedGridItemChangedEvent.cs
- WindowInteropHelper.cs
- ProxyWebPart.cs
- StaticFileHandler.cs
- HttpHandlerActionCollection.cs
- ClientType.cs
- CorePropertiesFilter.cs
- Assembly.cs
- IPipelineRuntime.cs
- MultilineStringConverter.cs
- ISFTagAndGuidCache.cs
- XmlDataSourceNodeDescriptor.cs
- IsolatedStorageSecurityState.cs
- ReadOnlyDictionary.cs
- DiscreteKeyFrames.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- UnsafeNativeMethods.cs
- SmiEventStream.cs
- ComplexObject.cs
- CorrelationService.cs
- TerminatorSinks.cs
- TraceSection.cs
- RegexNode.cs
- ChangePasswordDesigner.cs
- Version.cs
- ManifestResourceInfo.cs
- ConfigurationPropertyAttribute.cs
- X509Certificate2Collection.cs
- MetadataArtifactLoaderResource.cs
- MailAddressParser.cs
- FirstQueryOperator.cs
- SchemaNames.cs
- NamespaceInfo.cs
- TextProperties.cs
- Translator.cs
- DispatchProxy.cs
- TextFormatterHost.cs
- UpWmlPageAdapter.cs
- Point.cs
- Util.cs
- FlowLayoutSettings.cs
- SqlDuplicator.cs
- SqlTrackingQuery.cs
- TrailingSpaceComparer.cs
- ObjectDataSourceStatusEventArgs.cs
- PropagatorResult.cs
- TextProperties.cs
- ApplyImportsAction.cs
- XmlSerializerOperationGenerator.cs
- Accessible.cs
- ToolStripButton.cs
- HotSpotCollection.cs
- QilDataSource.cs
- EventSinkHelperWriter.cs
- PropertyStore.cs
- EventMappingSettings.cs
- XmlDocumentType.cs
- DocumentViewer.cs
- SerialReceived.cs
- TextServicesPropertyRanges.cs
- FaultReason.cs
- PageFunction.cs
- DateTimeParse.cs
- TypeResolver.cs
- Drawing.cs
- Annotation.cs
- HwndPanningFeedback.cs
- TableCell.cs
- ExtensionQuery.cs
- CultureSpecificCharacterBufferRange.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- HttpException.cs
- DataGridViewTextBoxEditingControl.cs
- BuildManager.cs