Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- UInt16Storage.cs
- XmlNotation.cs
- ThreadStartException.cs
- sqlmetadatafactory.cs
- LineVisual.cs
- ImageAnimator.cs
- WindowsToolbarAsMenu.cs
- EncoderBestFitFallback.cs
- XhtmlBasicValidationSummaryAdapter.cs
- XmlLangPropertyAttribute.cs
- SqlCharStream.cs
- DuplexChannel.cs
- GetPolicyDetailsRequest.cs
- ContractsBCL.cs
- ObfuscateAssemblyAttribute.cs
- DynamicEndpoint.cs
- VectorConverter.cs
- FileDialog.cs
- QuaternionIndependentAnimationStorage.cs
- JsonByteArrayDataContract.cs
- Point4D.cs
- HtmlElementEventArgs.cs
- TypeConverterHelper.cs
- BaseCollection.cs
- HtmlHistory.cs
- LineBreakRecord.cs
- ContentPresenter.cs
- XPathNavigator.cs
- FrameworkContentElement.cs
- TransformValueSerializer.cs
- FtpCachePolicyElement.cs
- login.cs
- SQLBoolean.cs
- NonDualMessageSecurityOverHttpElement.cs
- ComponentRenameEvent.cs
- ConfigurationValue.cs
- Exceptions.cs
- DragDropHelper.cs
- CompilerState.cs
- EpmSourcePathSegment.cs
- CultureSpecificStringDictionary.cs
- GridViewRowCollection.cs
- XmlBaseWriter.cs
- ScrollBarAutomationPeer.cs
- SHA512.cs
- CleanUpVirtualizedItemEventArgs.cs
- AssemblyBuilderData.cs
- BuildDependencySet.cs
- SelectorItemAutomationPeer.cs
- PathFigure.cs
- Switch.cs
- ISAPIWorkerRequest.cs
- DeclaredTypeValidatorAttribute.cs
- PackageProperties.cs
- AppDomainFactory.cs
- BitmapMetadataEnumerator.cs
- MetaChildrenColumn.cs
- OleDbRowUpdatedEvent.cs
- DataBoundControlAdapter.cs
- SiteMapDataSource.cs
- EncryptedKeyHashIdentifierClause.cs
- ConfigurationErrorsException.cs
- Label.cs
- SimpleWorkerRequest.cs
- FileRecordSequence.cs
- HtmlElement.cs
- LocalFileSettingsProvider.cs
- MachineKeyConverter.cs
- Geometry.cs
- HttpListenerResponse.cs
- EditorAttribute.cs
- TimeZoneNotFoundException.cs
- SafeEventLogReadHandle.cs
- CodeDelegateInvokeExpression.cs
- AttributeSetAction.cs
- WindowsTitleBar.cs
- BindingListCollectionView.cs
- ObjectItemAttributeAssemblyLoader.cs
- Section.cs
- WmfPlaceableFileHeader.cs
- AttributeQuery.cs
- MembershipSection.cs
- OverflowException.cs
- Cursor.cs
- CodeTypeReferenceCollection.cs
- QilList.cs
- HttpCookiesSection.cs
- HtmlInputFile.cs
- ResourcePermissionBaseEntry.cs
- PublishLicense.cs
- XmlSerializerSection.cs
- PanelStyle.cs
- Zone.cs
- XmlnsPrefixAttribute.cs
- AspNetHostingPermission.cs
- SafeBitVector32.cs
- GlyphingCache.cs
- DataSetMappper.cs
- BrowserCapabilitiesFactory.cs
- ResourceExpressionBuilder.cs