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
- LoaderAllocator.cs
- EntityDesignPluralizationHandler.cs
- CodeDirectoryCompiler.cs
- ToolStripArrowRenderEventArgs.cs
- PropertyMetadata.cs
- CombinedGeometry.cs
- XPathAxisIterator.cs
- Point3DCollectionConverter.cs
- DiagnosticEventProvider.cs
- UnsafeNativeMethods.cs
- XmlDesignerDataSourceView.cs
- DbDataReader.cs
- RepeatButton.cs
- RenderDataDrawingContext.cs
- DateRangeEvent.cs
- QuinticEase.cs
- BitConverter.cs
- DataGridToolTip.cs
- InsufficientMemoryException.cs
- MultipleViewPattern.cs
- X509CertificateStore.cs
- ParseElementCollection.cs
- ImportOptions.cs
- ApplicationTrust.cs
- MessageFault.cs
- PersistenceTypeAttribute.cs
- Button.cs
- SqlFunctionAttribute.cs
- XmlSchemaNotation.cs
- ExternalCalls.cs
- UniformGrid.cs
- ResourceExpressionBuilder.cs
- ControlUtil.cs
- PropertyGrid.cs
- AcceleratedTokenAuthenticator.cs
- SupportingTokenAuthenticatorSpecification.cs
- PolyLineSegmentFigureLogic.cs
- SoapRpcServiceAttribute.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- ModifierKeysConverter.cs
- XmlArrayItemAttribute.cs
- RankException.cs
- PreviewKeyDownEventArgs.cs
- HttpClientCertificate.cs
- CodeTypeReferenceExpression.cs
- Context.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Queue.cs
- TableDetailsCollection.cs
- ListControl.cs
- XmlRootAttribute.cs
- ContourSegment.cs
- MimeParameter.cs
- EdmValidator.cs
- DesignColumn.cs
- HttpModulesSection.cs
- FunctionDefinition.cs
- EntityClassGenerator.cs
- SafeNativeMethods.cs
- DesignerAttribute.cs
- CannotUnloadAppDomainException.cs
- FileClassifier.cs
- Main.cs
- WebPartMenuStyle.cs
- MouseButtonEventArgs.cs
- Timer.cs
- PointConverter.cs
- StringToken.cs
- HiddenFieldPageStatePersister.cs
- StringComparer.cs
- SendingRequestEventArgs.cs
- ListViewCancelEventArgs.cs
- MemberInfoSerializationHolder.cs
- XmlDictionaryReader.cs
- HMACSHA384.cs
- MouseWheelEventArgs.cs
- SpeechEvent.cs
- RelationshipConverter.cs
- ObjectKeyFrameCollection.cs
- SvcMapFile.cs
- ServiceModelExtensionElement.cs
- Trigger.cs
- Compiler.cs
- Table.cs
- SafeTimerHandle.cs
- ScrollItemProviderWrapper.cs
- PageThemeBuildProvider.cs
- StylesEditorDialog.cs
- MessageHeaderDescriptionCollection.cs
- ConnectionStringEditor.cs
- IChannel.cs
- DataRowChangeEvent.cs
- DBSqlParserTableCollection.cs
- WebHttpSecurityModeHelper.cs
- RecordManager.cs
- UIElementParaClient.cs
- MenuScrollingVisibilityConverter.cs
- BaseCollection.cs
- OLEDB_Util.cs
- DataReceivedEventArgs.cs