Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PersonalizableAttribute.cs
- SystemWebCachingSectionGroup.cs
- SchemaConstraints.cs
- DeclarationUpdate.cs
- InputScopeConverter.cs
- updateconfighost.cs
- PopupEventArgs.cs
- UIElementPropertyUndoUnit.cs
- PreviewPageInfo.cs
- SafeThreadHandle.cs
- SvcMapFileLoader.cs
- HandlerFactoryWrapper.cs
- PropertyDescriptorCollection.cs
- KeyValueInternalCollection.cs
- VSDExceptions.cs
- SuppressedPackageProperties.cs
- SqlDataSourceDesigner.cs
- DelegatingTypeDescriptionProvider.cs
- fixedPageContentExtractor.cs
- SHA384Managed.cs
- RoutingSection.cs
- TraceHandlerErrorFormatter.cs
- TableRowCollection.cs
- WebPartConnectVerb.cs
- SqlLiftWhereClauses.cs
- InvokePatternIdentifiers.cs
- SystemTcpStatistics.cs
- CreateUserErrorEventArgs.cs
- ThreadStartException.cs
- DBCommandBuilder.cs
- ColorIndependentAnimationStorage.cs
- Soap12FormatExtensions.cs
- AppearanceEditorPart.cs
- WindowsUpDown.cs
- AppDomainShutdownMonitor.cs
- GenericIdentity.cs
- EventLogWatcher.cs
- Rect3DConverter.cs
- GridSplitterAutomationPeer.cs
- DateTime.cs
- Span.cs
- HandlerWithFactory.cs
- ServiceDescriptionContext.cs
- XmlILModule.cs
- ListenerSingletonConnectionReader.cs
- DataColumn.cs
- SeekStoryboard.cs
- RefExpr.cs
- UiaCoreApi.cs
- HttpCapabilitiesEvaluator.cs
- TypeDelegator.cs
- MouseActionValueSerializer.cs
- LocationInfo.cs
- latinshape.cs
- MiniCustomAttributeInfo.cs
- xmlformatgeneratorstatics.cs
- ControlValuePropertyAttribute.cs
- ScrollEvent.cs
- ScrollEvent.cs
- OleDbReferenceCollection.cs
- sqlstateclientmanager.cs
- XmlSchemaSimpleTypeRestriction.cs
- XmlSchemaFacet.cs
- AssemblyName.cs
- Pen.cs
- MessageFilterException.cs
- SmiContext.cs
- TextServicesProperty.cs
- SqlDataAdapter.cs
- DispatcherSynchronizationContext.cs
- IChannel.cs
- TextInfo.cs
- OracleBinary.cs
- ItemCollectionEditor.cs
- DynamicDataRoute.cs
- BindableAttribute.cs
- BuildResultCache.cs
- KeyFrames.cs
- XmlNamespaceManager.cs
- TypeForwardedToAttribute.cs
- CultureSpecificStringDictionary.cs
- ProtocolsConfigurationHandler.cs
- BitmapInitialize.cs
- DrawingGroup.cs
- PackWebRequest.cs
- ExpressionBindingCollection.cs
- FacetEnabledSchemaElement.cs
- TextElementAutomationPeer.cs
- XmlSerializerNamespaces.cs
- TextElementAutomationPeer.cs
- SmiRecordBuffer.cs
- BaseTemplateBuildProvider.cs
- RemoveStoryboard.cs
- OdbcConnectionPoolProviderInfo.cs
- ThreadStartException.cs
- FtpRequestCacheValidator.cs
- DrawingAttributeSerializer.cs
- CompiledRegexRunnerFactory.cs
- AppDomain.cs
- X509CertificateTokenFactoryCredential.cs