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
- Console.cs
- RoleExceptions.cs
- XPathDocumentIterator.cs
- ToolStripContentPanel.cs
- ColorKeyFrameCollection.cs
- StringAttributeCollection.cs
- MailAddressCollection.cs
- SimpleHandlerBuildProvider.cs
- ApplicationServiceHelper.cs
- TemplateBuilder.cs
- CodeMemberProperty.cs
- MeasurementDCInfo.cs
- DependentList.cs
- Overlapped.cs
- SimpleBitVector32.cs
- NumberFunctions.cs
- Sql8ExpressionRewriter.cs
- IPipelineRuntime.cs
- ConfigDefinitionUpdates.cs
- DependencyObjectProvider.cs
- Descriptor.cs
- TraceHelpers.cs
- SchemaHelper.cs
- EndpointBehaviorElementCollection.cs
- SecurityTokenResolver.cs
- TextTreeText.cs
- WebConfigurationManager.cs
- SingleKeyFrameCollection.cs
- Scanner.cs
- SafeRightsManagementQueryHandle.cs
- QilXmlWriter.cs
- glyphs.cs
- NodeInfo.cs
- DocumentationServerProtocol.cs
- RowToParametersTransformer.cs
- Options.cs
- WebResourceAttribute.cs
- WinFormsSecurity.cs
- ConfigurationManagerHelper.cs
- WebRequest.cs
- DefaultValueTypeConverter.cs
- counter.cs
- WebServiceTypeData.cs
- LassoSelectionBehavior.cs
- ProtocolsSection.cs
- BasicCellRelation.cs
- PrtCap_Builder.cs
- OraclePermission.cs
- ChangePasswordDesigner.cs
- ActivityCollectionMarkupSerializer.cs
- DirectionalLight.cs
- ProcessThreadCollection.cs
- EventLogPermission.cs
- Variant.cs
- Context.cs
- InternalConfigEventArgs.cs
- ObjectCache.cs
- ContextMenuStripGroup.cs
- HtmlWindow.cs
- RegionIterator.cs
- DbExpressionRules.cs
- HttpProtocolImporter.cs
- PermissionToken.cs
- NamespaceList.cs
- XmlSchemaComplexContentRestriction.cs
- SafeLibraryHandle.cs
- SqlSelectStatement.cs
- Options.cs
- SessionConnectionReader.cs
- HttpValueCollection.cs
- QilDataSource.cs
- RouteValueDictionary.cs
- OrderedDictionaryStateHelper.cs
- HttpWebResponse.cs
- Msec.cs
- SqlNodeTypeOperators.cs
- ColumnWidthChangedEvent.cs
- ScriptControlManager.cs
- MemoryRecordBuffer.cs
- UnsafeNativeMethods.cs
- ListItemCollection.cs
- SecurityMessageProperty.cs
- MulticastNotSupportedException.cs
- ProfileInfo.cs
- SessionEndedEventArgs.cs
- WindowsServiceElement.cs
- PenThread.cs
- Util.cs
- OrthographicCamera.cs
- HwndSource.cs
- SendAgentStatusRequest.cs
- ProfileParameter.cs
- SoapObjectInfo.cs
- ScriptManagerProxy.cs
- SynchronizedChannelCollection.cs
- RegexCode.cs
- ActivityInterfaces.cs
- ModifierKeysValueSerializer.cs
- QueueSurrogate.cs
- AudienceUriMode.cs