Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / WinCategoryAttribute.cs / 1305376 / 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 [....] 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 [....] 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
- ViewKeyConstraint.cs
- TableLayoutColumnStyleCollection.cs
- EntityParameterCollection.cs
- CellConstant.cs
- VerbConverter.cs
- TabControlCancelEvent.cs
- TemplateField.cs
- CallbackHandler.cs
- OverloadGroupAttribute.cs
- StateValidator.cs
- MessageFilter.cs
- CodeDomSerializerBase.cs
- PolygonHotSpot.cs
- DataKey.cs
- DeleteIndexBinder.cs
- ImageMapEventArgs.cs
- SecureConversationVersion.cs
- UnionExpr.cs
- ReachUIElementCollectionSerializer.cs
- CmsUtils.cs
- EntryIndex.cs
- DefaultHttpHandler.cs
- SessionStateSection.cs
- MemberInfoSerializationHolder.cs
- TabItemAutomationPeer.cs
- ListViewTableCell.cs
- RIPEMD160.cs
- AnnotationStore.cs
- PartialTrustVisibleAssembly.cs
- WebResourceAttribute.cs
- Icon.cs
- ChannelTracker.cs
- ErrorWrapper.cs
- ToggleProviderWrapper.cs
- TemplatePartAttribute.cs
- SoapTransportImporter.cs
- XmlIlTypeHelper.cs
- XmlReflectionImporter.cs
- TrackingValidationObjectDictionary.cs
- QueueTransferProtocol.cs
- RegistryDataKey.cs
- Polygon.cs
- ProfileGroupSettings.cs
- connectionpool.cs
- DataGridColumnReorderingEventArgs.cs
- wpf-etw.cs
- EditorPart.cs
- TdsEnums.cs
- DocumentSchemaValidator.cs
- TextHintingModeValidation.cs
- QueryableDataSource.cs
- CompiledQueryCacheKey.cs
- AssertHelper.cs
- DispatcherOperation.cs
- UpdateCommandGenerator.cs
- ProfilePropertySettingsCollection.cs
- HttpProfileBase.cs
- HttpModuleCollection.cs
- UnsafeNativeMethods.cs
- UserNameSecurityToken.cs
- MultipartContentParser.cs
- PartialCachingControl.cs
- XmlElementAttribute.cs
- StateMachineWorkflow.cs
- COM2Properties.cs
- AuditLogLocation.cs
- TypeDelegator.cs
- InputLangChangeEvent.cs
- Model3DCollection.cs
- OracleConnectionString.cs
- TextLineResult.cs
- Exceptions.cs
- ApplicationId.cs
- KeyFrames.cs
- PrefixQName.cs
- XmlDesigner.cs
- DictionaryEditChange.cs
- ContentElement.cs
- __ConsoleStream.cs
- Int32KeyFrameCollection.cs
- StreamWriter.cs
- HttpPostProtocolReflector.cs
- WindowsAuthenticationModule.cs
- CodeGenerator.cs
- ChannelTerminatedException.cs
- GridViewSelectEventArgs.cs
- TableLayoutSettings.cs
- CodeMethodReturnStatement.cs
- CompareInfo.cs
- ActivityCollectionMarkupSerializer.cs
- TextProperties.cs
- EventBuilder.cs
- NonDualMessageSecurityOverHttpElement.cs
- CodeTypeDelegate.cs
- EntityDataSourceQueryBuilder.cs
- InkSerializer.cs
- CustomError.cs
- TypeDependencyAttribute.cs
- XmlWrappingReader.cs
- ImagingCache.cs