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
- StylusCaptureWithinProperty.cs
- MessageDecoder.cs
- MaskedTextBox.cs
- HtmlInputButton.cs
- GregorianCalendar.cs
- DescendantOverDescendantQuery.cs
- ListBoxChrome.cs
- GridViewCellAutomationPeer.cs
- ProcessHostServerConfig.cs
- ToolboxItemLoader.cs
- DocumentGridContextMenu.cs
- webeventbuffer.cs
- NetworkStream.cs
- DynamicActivityProperty.cs
- ScrollBarAutomationPeer.cs
- ListViewHitTestInfo.cs
- FileIOPermission.cs
- path.cs
- SystemException.cs
- ReadOnlyState.cs
- TdsParameterSetter.cs
- ElementUtil.cs
- SessionStateUtil.cs
- AvTraceDetails.cs
- XamlGridLengthSerializer.cs
- TableLayoutRowStyleCollection.cs
- GeneralTransform3DCollection.cs
- ObjectParameter.cs
- ReplacementText.cs
- Expander.cs
- Base64Stream.cs
- MetadataCache.cs
- EmbossBitmapEffect.cs
- SchemaMerger.cs
- RoutedEventConverter.cs
- AccessKeyManager.cs
- DataSet.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- RowCache.cs
- DeflateStream.cs
- FileSystemInfo.cs
- DataGridViewTextBoxEditingControl.cs
- CachedFontFamily.cs
- ColorKeyFrameCollection.cs
- FrameworkContentElement.cs
- Point3DValueSerializer.cs
- RegularExpressionValidator.cs
- SqlDependency.cs
- ConnectionStringsSection.cs
- HttpModulesInstallComponent.cs
- XmlQueryContext.cs
- XmlException.cs
- HostingPreferredMapPath.cs
- SQLBinaryStorage.cs
- SafeHandles.cs
- TracingConnection.cs
- XmlSchemaValidationException.cs
- followingsibling.cs
- sqlpipe.cs
- SiteMapDataSource.cs
- EntityUtil.cs
- BulletedListEventArgs.cs
- PageVisual.cs
- ToolStripArrowRenderEventArgs.cs
- MaskedTextProvider.cs
- DiagnosticTrace.cs
- LinearKeyFrames.cs
- ADMembershipProvider.cs
- DataTableExtensions.cs
- WebScriptMetadataMessage.cs
- UpdateTracker.cs
- XmlCDATASection.cs
- RuntimeIdentifierPropertyAttribute.cs
- AssemblyCache.cs
- GeneralTransform3DTo2DTo3D.cs
- regiisutil.cs
- HostSecurityManager.cs
- EndpointIdentityConverter.cs
- Win32SafeHandles.cs
- SvcMapFileLoader.cs
- cryptoapiTransform.cs
- DelegatingConfigHost.cs
- JournalEntry.cs
- DataGridViewCellStateChangedEventArgs.cs
- UnmanagedMarshal.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- xamlnodes.cs
- SessionEndingEventArgs.cs
- GridProviderWrapper.cs
- TextFormatter.cs
- OutputCacheProfileCollection.cs
- TranslateTransform.cs
- PageStatePersister.cs
- MulticastNotSupportedException.cs
- SynchronizedDispatch.cs
- DecoderExceptionFallback.cs
- path.cs
- ActiveXMessageFormatter.cs
- StorageFunctionMapping.cs
- TextTreeTextElementNode.cs