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
- SynchronizedInputProviderWrapper.cs
- InternalConfigHost.cs
- SimpleNameService.cs
- WebSysDescriptionAttribute.cs
- Compiler.cs
- GCHandleCookieTable.cs
- ResXResourceSet.cs
- SqlClientWrapperSmiStream.cs
- Native.cs
- EditCommandColumn.cs
- IWorkflowDebuggerService.cs
- CreatingCookieEventArgs.cs
- HttpRuntime.cs
- ServiceModelActivationSectionGroup.cs
- SchemaEntity.cs
- ViewDesigner.cs
- AppSettingsExpressionBuilder.cs
- BasicHttpBindingElement.cs
- EventData.cs
- DbDataAdapter.cs
- QilSortKey.cs
- TracedNativeMethods.cs
- Enum.cs
- EventListener.cs
- WindowsFont.cs
- ProviderConnectionPointCollection.cs
- RijndaelManagedTransform.cs
- CodeBlockBuilder.cs
- HtmlHistory.cs
- CharEnumerator.cs
- NaturalLanguageHyphenator.cs
- BamlResourceSerializer.cs
- DoubleConverter.cs
- ContentElement.cs
- ValueUnavailableException.cs
- MruCache.cs
- BoundColumn.cs
- SecurityElement.cs
- EntityProxyFactory.cs
- CallSiteBinder.cs
- XsltArgumentList.cs
- HtmlHead.cs
- ObjectListDesigner.cs
- BasicCellRelation.cs
- ServiceProviders.cs
- TypeGeneratedEventArgs.cs
- _ConnectOverlappedAsyncResult.cs
- Brush.cs
- TreeNode.cs
- ClaimTypes.cs
- AppSettingsExpressionBuilder.cs
- TopClause.cs
- AdRotatorDesigner.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SlipBehavior.cs
- SignatureToken.cs
- MetadataExporter.cs
- PluralizationService.cs
- DesignerTransactionCloseEvent.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- StaticContext.cs
- DataPagerCommandEventArgs.cs
- LexicalChunk.cs
- ControlValuePropertyAttribute.cs
- AdjustableArrowCap.cs
- DataControlPagerLinkButton.cs
- RangeBaseAutomationPeer.cs
- Journaling.cs
- DetailsViewRow.cs
- Registry.cs
- FixedSOMTextRun.cs
- TextElementCollectionHelper.cs
- ToolBar.cs
- SqlNode.cs
- ImageAttributes.cs
- WsdlBuildProvider.cs
- TimersDescriptionAttribute.cs
- xdrvalidator.cs
- ScriptResourceInfo.cs
- WarningException.cs
- DataGridViewAutoSizeModeEventArgs.cs
- StyleSelector.cs
- ConnectionManagementElementCollection.cs
- OleDbParameterCollection.cs
- TimeStampChecker.cs
- WebPartConnection.cs
- DependencySource.cs
- UpdateInfo.cs
- LifetimeServices.cs
- CorePropertiesFilter.cs
- ObjectTag.cs
- CodeIterationStatement.cs
- CssClassPropertyAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- SessionState.cs
- DataFormats.cs
- ConsumerConnectionPointCollection.cs
- DeferredSelectedIndexReference.cs
- Directory.cs
- _IPv6Address.cs