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
- BorderSidesEditor.cs
- DocComment.cs
- MetaTableHelper.cs
- ControlValuePropertyAttribute.cs
- EventSinkHelperWriter.cs
- TypeUnloadedException.cs
- SecurityContext.cs
- WebServiceReceive.cs
- SettingsContext.cs
- CheckBoxPopupAdapter.cs
- XsltArgumentList.cs
- Exception.cs
- CodeSubDirectory.cs
- StringExpressionSet.cs
- FeatureAttribute.cs
- NativeMethods.cs
- XmlNamespaceManager.cs
- DBConnectionString.cs
- BoundPropertyEntry.cs
- ContentType.cs
- ECDiffieHellmanPublicKey.cs
- EntityViewGenerationConstants.cs
- Itemizer.cs
- assertwrapper.cs
- PkcsUtils.cs
- MultipleViewProviderWrapper.cs
- NamespaceTable.cs
- InsufficientMemoryException.cs
- FlowSwitch.cs
- SiteMap.cs
- Style.cs
- CookieHandler.cs
- WindowInteractionStateTracker.cs
- UIElementParaClient.cs
- ConversionContext.cs
- AutomationEvent.cs
- GlobalizationAssembly.cs
- CqlQuery.cs
- WebPartsPersonalization.cs
- Decoder.cs
- SQLDouble.cs
- DtdParser.cs
- DialogWindow.cs
- Int32Rect.cs
- SizeLimitedCache.cs
- DtdParser.cs
- WrappedIUnknown.cs
- GenericTypeParameterBuilder.cs
- Composition.cs
- SHA1CryptoServiceProvider.cs
- SourceElementsCollection.cs
- WebServiceReceive.cs
- Figure.cs
- ChangePassword.cs
- QueryRewriter.cs
- ScalarConstant.cs
- assertwrapper.cs
- DataSetUtil.cs
- UnSafeCharBuffer.cs
- CheckBoxList.cs
- RepeatButtonAutomationPeer.cs
- XmlSchemaSet.cs
- GetResponse.cs
- RelationshipConverter.cs
- HandlerWithFactory.cs
- ValueUtilsSmi.cs
- CompoundFileIOPermission.cs
- PageRequestManager.cs
- WebBrowserProgressChangedEventHandler.cs
- TouchDevice.cs
- PartialList.cs
- XmlSerializerVersionAttribute.cs
- WebPartZone.cs
- FixedSOMPageElement.cs
- CssClassPropertyAttribute.cs
- DrawingBrush.cs
- ZoneMembershipCondition.cs
- XmlQueryOutput.cs
- HebrewNumber.cs
- TransactedReceiveData.cs
- RegistrySecurity.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- VariableValue.cs
- DbConnectionPoolIdentity.cs
- WebEventCodes.cs
- UnsettableComboBox.cs
- EventWaitHandleSecurity.cs
- WebServiceResponseDesigner.cs
- XamlDesignerSerializationManager.cs
- CalendarDateRangeChangingEventArgs.cs
- Scripts.cs
- OracleDataAdapter.cs
- ObjectList.cs
- CreateUserErrorEventArgs.cs
- WebPartConnectionsCancelVerb.cs
- ConfigXmlCDataSection.cs
- ExpressionParser.cs
- XmlSchemaType.cs
- ClaimTypeElementCollection.cs
- DetailsViewActionList.cs