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 / WinCategoryAttribute.cs / 1 / WinCategoryAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms { using System; using System.ComponentModel; using System.Diagnostics; ////// /// /// [AttributeUsage(AttributeTargets.All)] internal sealed class WinCategoryAttribute : CategoryAttribute { ////// CategoryAttribute that can access WinForms localized strings. /// ////// /// public WinCategoryAttribute(string category) : base(category) { } ////// Initializes a new instance of the ///class. /// /// /// This method is called the first time the category property /// is accessed. It provides a way to lookup a localized string for /// the given category. Classes may override this to add their /// own localized names to categories. If a localized string is /// available for the given value, the method should return it. /// Otherwise, it should return null. /// protected override string GetLocalizedString(string value) { string localizedValue = base.GetLocalizedString(value); if (localizedValue == null) { localizedValue = (string)SR.GetObject("WinFormsCategory" + value); } // This attribute is internal, and we should never have a missing resource string. // Debug.Assert(localizedValue != null, "All Windows Forms category attributes should have localized strings. Category '" + value + "' not found."); return localizedValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms { using System; using System.ComponentModel; using System.Diagnostics; ////// /// /// [AttributeUsage(AttributeTargets.All)] internal sealed class WinCategoryAttribute : CategoryAttribute { ////// CategoryAttribute that can access WinForms localized strings. /// ////// /// public WinCategoryAttribute(string category) : base(category) { } ////// Initializes a new instance of the ///class. /// /// /// This method is called the first time the category property /// is accessed. It provides a way to lookup a localized string for /// the given category. Classes may override this to add their /// own localized names to categories. If a localized string is /// available for the given value, the method should return it. /// Otherwise, it should return null. /// protected override string GetLocalizedString(string value) { string localizedValue = base.GetLocalizedString(value); if (localizedValue == null) { localizedValue = (string)SR.GetObject("WinFormsCategory" + value); } // This attribute is internal, and we should never have a missing resource string. // Debug.Assert(localizedValue != null, "All Windows Forms category attributes should have localized strings. Category '" + value + "' not found."); return localizedValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- sapiproxy.cs
- SystemIcons.cs
- ColumnMapProcessor.cs
- ExpressionPrefixAttribute.cs
- Listen.cs
- TransformationRules.cs
- CurrentChangingEventArgs.cs
- Timer.cs
- CodeDirectionExpression.cs
- XmlSchemaAnnotation.cs
- Location.cs
- ItemDragEvent.cs
- EventNotify.cs
- DataGridCaption.cs
- ReadOnlyAttribute.cs
- Vector.cs
- DbConnectionFactory.cs
- MediaTimeline.cs
- SignalGate.cs
- StringFreezingAttribute.cs
- ProjectionPlan.cs
- EventHandlerList.cs
- SubqueryRules.cs
- FixedSOMTableCell.cs
- TabPage.cs
- PackageProperties.cs
- LogSwitch.cs
- FileLevelControlBuilderAttribute.cs
- TextElement.cs
- PersistenceProviderBehavior.cs
- FormCollection.cs
- sapiproxy.cs
- ConnectionProviderAttribute.cs
- RIPEMD160Managed.cs
- RolePrincipal.cs
- MailDefinition.cs
- WinEventTracker.cs
- EditorPartChrome.cs
- LayoutTable.cs
- Style.cs
- ColorConvertedBitmapExtension.cs
- MimeBasePart.cs
- Comparer.cs
- ManualResetEvent.cs
- DataColumnPropertyDescriptor.cs
- EncryptedData.cs
- ContentFilePart.cs
- updateconfighost.cs
- ContainsRowNumberChecker.cs
- counter.cs
- TextRangeSerialization.cs
- TypeConstant.cs
- DataGridViewCellValueEventArgs.cs
- AssemblyCacheEntry.cs
- TemplateLookupAction.cs
- TextEditorParagraphs.cs
- StreamReader.cs
- basecomparevalidator.cs
- DocumentViewerConstants.cs
- OrderByQueryOptionExpression.cs
- X500Name.cs
- VisualStateChangedEventArgs.cs
- PrintEvent.cs
- DataSourceControlBuilder.cs
- ThousandthOfEmRealDoubles.cs
- AdapterUtil.cs
- PropertySegmentSerializer.cs
- PngBitmapEncoder.cs
- SchemaImporterExtensionElementCollection.cs
- Constraint.cs
- DES.cs
- ExpressionBindings.cs
- TextMessageEncodingElement.cs
- MenuItemCollection.cs
- CapabilitiesUse.cs
- NativeObjectSecurity.cs
- XmlRootAttribute.cs
- IBuiltInEvidence.cs
- SqlConnectionStringBuilder.cs
- CorePropertiesFilter.cs
- XpsDigitalSignature.cs
- XsltException.cs
- Point.cs
- WebConfigurationHost.cs
- HttpModulesSection.cs
- VerticalAlignConverter.cs
- SplineKeyFrames.cs
- FocusChangedEventArgs.cs
- FormatPage.cs
- TcpClientSocketManager.cs
- RolePrincipal.cs
- LocatorBase.cs
- TaskFormBase.cs
- FormViewUpdateEventArgs.cs
- PaintValueEventArgs.cs
- TouchDevice.cs
- ToolBarOverflowPanel.cs
- DeploymentSectionCache.cs
- SQLInt16.cs
- WindowsToolbarAsMenu.cs