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
- BitmapSourceSafeMILHandle.cs
- BaseProcessor.cs
- SplineKeyFrames.cs
- DocumentViewer.cs
- RepeaterItemEventArgs.cs
- WebPartActionVerb.cs
- EntityDataSourceView.cs
- OracleCommand.cs
- EncodingInfo.cs
- XmlElementAttributes.cs
- InnerItemCollectionView.cs
- NumberSubstitution.cs
- Html32TextWriter.cs
- Brush.cs
- DetailsViewUpdatedEventArgs.cs
- ParserExtension.cs
- Oid.cs
- SqlRetyper.cs
- CodeTypeDeclaration.cs
- RotateTransform.cs
- ImmutableObjectAttribute.cs
- TextBox.cs
- SourceFileBuildProvider.cs
- EmptyCollection.cs
- DetailsViewDeleteEventArgs.cs
- Coordinator.cs
- ContentIterators.cs
- OperationFormatter.cs
- SqlFunctionAttribute.cs
- ColumnMapTranslator.cs
- UIElement3DAutomationPeer.cs
- FormsAuthenticationEventArgs.cs
- SiteMapHierarchicalDataSourceView.cs
- MarkupCompilePass1.cs
- MessageDispatch.cs
- ConfigurationPermission.cs
- Repeater.cs
- SafeNativeMethodsOther.cs
- Substitution.cs
- FontFamilyIdentifier.cs
- GestureRecognitionResult.cs
- HttpConfigurationContext.cs
- PartialClassGenerationTask.cs
- ActivityContext.cs
- DockPanel.cs
- WebPartHelpVerb.cs
- BrowserCapabilitiesCompiler.cs
- MutexSecurity.cs
- WindowsRebar.cs
- TextHidden.cs
- MetadataArtifactLoaderCompositeFile.cs
- XamlStyleSerializer.cs
- NavigationWindow.cs
- SqlStream.cs
- AdornerHitTestResult.cs
- FixedHighlight.cs
- WpfKnownType.cs
- ObjectStateFormatter.cs
- TimeZone.cs
- FormViewInsertedEventArgs.cs
- ProtocolsConfiguration.cs
- UnescapedXmlDiagnosticData.cs
- UriTemplateMatch.cs
- EndEvent.cs
- MarkedHighlightComponent.cs
- LocatorManager.cs
- DataSourceProvider.cs
- Encoder.cs
- State.cs
- SelectionListDesigner.cs
- CachedPathData.cs
- AssertHelper.cs
- TableAutomationPeer.cs
- DrawingBrush.cs
- DesignerSerializationVisibilityAttribute.cs
- IdentityReference.cs
- DbConnectionPool.cs
- dbdatarecord.cs
- ItemCollection.cs
- ObjectNavigationPropertyMapping.cs
- EllipseGeometry.cs
- NavigatingCancelEventArgs.cs
- MarkupCompilePass1.cs
- MeshGeometry3D.cs
- RadioButton.cs
- FunctionImportMapping.cs
- CountAggregationOperator.cs
- DiagnosticTrace.cs
- DataControlImageButton.cs
- LineSegment.cs
- CompiledELinqQueryState.cs
- OdbcTransaction.cs
- ZipIOBlockManager.cs
- ObjectStateFormatter.cs
- ModelService.cs
- WindowsTokenRoleProvider.cs
- AssemblyBuilder.cs
- Compiler.cs
- ItemDragEvent.cs
- InfoCardUIAgent.cs