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
- SymmetricCryptoHandle.cs
- WebPageTraceListener.cs
- ExternalException.cs
- TakeQueryOptionExpression.cs
- OleDbPropertySetGuid.cs
- NullableIntAverageAggregationOperator.cs
- ISO2022Encoding.cs
- ServiceHostingEnvironment.cs
- CqlParser.cs
- SerTrace.cs
- OraclePermissionAttribute.cs
- ErrorLog.cs
- Annotation.cs
- XPathDocument.cs
- Section.cs
- DATA_BLOB.cs
- ListViewItem.cs
- input.cs
- ListManagerBindingsCollection.cs
- XmlElementAttributes.cs
- StateManagedCollection.cs
- GlyphTypeface.cs
- HostedTransportConfigurationManager.cs
- DrawingGroup.cs
- WebPartsPersonalization.cs
- DiagnosticTraceSource.cs
- RouteParser.cs
- SecurityTokenSerializer.cs
- ConditionalBranch.cs
- PathStreamGeometryContext.cs
- StandardOleMarshalObject.cs
- CriticalHandle.cs
- GroupLabel.cs
- SimpleWebHandlerParser.cs
- DragCompletedEventArgs.cs
- DataRowCollection.cs
- CompiledQuery.cs
- ObservableCollectionDefaultValueFactory.cs
- DrawingCollection.cs
- WindowVisualStateTracker.cs
- EditorPartCollection.cs
- TableLayoutPanelBehavior.cs
- File.cs
- View.cs
- ExpressionNode.cs
- InternalConfigEventArgs.cs
- Terminate.cs
- DataGridViewToolTip.cs
- InternalCache.cs
- DataGridViewCell.cs
- OutOfMemoryException.cs
- DataGridrowEditEndingEventArgs.cs
- RedirectionProxy.cs
- CultureTableRecord.cs
- CommandDesigner.cs
- FontUnitConverter.cs
- ModuleConfigurationInfo.cs
- XmlDataProvider.cs
- PageCache.cs
- LogExtentCollection.cs
- ImportCatalogPart.cs
- SolidColorBrush.cs
- WebPartZone.cs
- Vector3D.cs
- StrokeNodeOperations2.cs
- Evidence.cs
- FeatureManager.cs
- SubpageParagraph.cs
- XPathScanner.cs
- SQLBinary.cs
- AutoResetEvent.cs
- OpCodes.cs
- ImageSourceValueSerializer.cs
- FileRecordSequence.cs
- PrintingPermission.cs
- DataGridHeaderBorder.cs
- ServiceNameElement.cs
- CounterSetInstanceCounterDataSet.cs
- ListViewInsertEventArgs.cs
- localization.cs
- DataBoundControlAdapter.cs
- DodSequenceMerge.cs
- LayoutEvent.cs
- PageContentCollection.cs
- BinaryMethodMessage.cs
- Range.cs
- WebPartMenuStyle.cs
- DrawingVisual.cs
- ZipFileInfo.cs
- XamlBrushSerializer.cs
- ToolboxDataAttribute.cs
- DbConnectionPoolCounters.cs
- XmlSchemaType.cs
- EnumValAlphaComparer.cs
- BadImageFormatException.cs
- ItemChangedEventArgs.cs
- DockEditor.cs
- Object.cs
- OdbcConnection.cs
- AlternationConverter.cs