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
- HttpHandlersSection.cs
- ColorConverter.cs
- DataMemberFieldConverter.cs
- WebAdminConfigurationHelper.cs
- EncoderFallback.cs
- ToolBar.cs
- DynamicQueryableWrapper.cs
- PasswordDeriveBytes.cs
- DataControlButton.cs
- ServiceContractAttribute.cs
- ToolStripDropDownClosedEventArgs.cs
- PassportAuthenticationModule.cs
- ImplicitInputBrush.cs
- AlphaSortedEnumConverter.cs
- ProfileWorkflowElement.cs
- UserControl.cs
- HitTestWithPointDrawingContextWalker.cs
- ExtenderProvidedPropertyAttribute.cs
- WsdlBuildProvider.cs
- Vector3DConverter.cs
- DeflateStream.cs
- FontDialog.cs
- webclient.cs
- XpsSerializationException.cs
- WmfPlaceableFileHeader.cs
- TailPinnedEventArgs.cs
- CompleteWizardStep.cs
- DurableInstanceProvider.cs
- StickyNoteContentControl.cs
- ContractListAdapter.cs
- DirectoryObjectSecurity.cs
- BaseParagraph.cs
- ConfigXmlComment.cs
- HttpUnhandledOperationInvoker.cs
- X509Certificate2.cs
- WebServicesDescriptionAttribute.cs
- HwndStylusInputProvider.cs
- AttributeInfo.cs
- QuarticEase.cs
- FontFamilyIdentifier.cs
- _DisconnectOverlappedAsyncResult.cs
- AdornerPresentationContext.cs
- ProfilePropertyMetadata.cs
- CursorConverter.cs
- Parser.cs
- ContextMenuStrip.cs
- PropertyOrder.cs
- OpenTypeLayoutCache.cs
- DetailsViewDeletedEventArgs.cs
- _BasicClient.cs
- WhitespaceRuleLookup.cs
- CanExecuteRoutedEventArgs.cs
- TablePatternIdentifiers.cs
- CurrencyWrapper.cs
- SetIterators.cs
- CacheVirtualItemsEvent.cs
- XmlSchemaRedefine.cs
- ListItemCollection.cs
- Point3D.cs
- JulianCalendar.cs
- DependencyPropertyKind.cs
- FactoryMaker.cs
- FatalException.cs
- BamlRecordReader.cs
- UntypedNullExpression.cs
- DateBoldEvent.cs
- ADConnectionHelper.cs
- WebEventCodes.cs
- TypeElementCollection.cs
- GeneratedView.cs
- SqlStream.cs
- RelatedCurrencyManager.cs
- CommandBindingCollection.cs
- CFStream.cs
- ActiveDocumentEvent.cs
- SourceElementsCollection.cs
- WebPartConnectionsCancelEventArgs.cs
- PlaceHolder.cs
- XmlElementAttribute.cs
- ParameterElementCollection.cs
- StatusBarDrawItemEvent.cs
- MarshalByValueComponent.cs
- PartBasedPackageProperties.cs
- QueryPageSettingsEventArgs.cs
- HtmlTable.cs
- DesignerAttribute.cs
- ProfileBuildProvider.cs
- ChooseAction.cs
- EventRoute.cs
- TreeSet.cs
- VScrollProperties.cs
- XPathNavigatorKeyComparer.cs
- NameSpaceExtractor.cs
- OutOfMemoryException.cs
- ReadContentAsBinaryHelper.cs
- ListControlDataBindingHandler.cs
- ObjectQueryProvider.cs
- EmptyImpersonationContext.cs
- KeyConstraint.cs
- HtmlInputPassword.cs