Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ContentDesigner.cs
- NonParentingControl.cs
- CompoundFileDeflateTransform.cs
- Section.cs
- GPPOINTF.cs
- WriteableBitmap.cs
- HttpCachePolicy.cs
- ObjectQueryProvider.cs
- CreatingCookieEventArgs.cs
- ScrollBarRenderer.cs
- altserialization.cs
- Ref.cs
- ChangeNode.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DecimalConverter.cs
- TextSelectionHighlightLayer.cs
- Select.cs
- FigureParaClient.cs
- CharacterMetrics.cs
- RequestCachePolicyConverter.cs
- Screen.cs
- XmlNodeChangedEventArgs.cs
- StorageMappingFragment.cs
- TypeListConverter.cs
- MeasurementDCInfo.cs
- LabelLiteral.cs
- PartBasedPackageProperties.cs
- MsmqIntegrationBindingElement.cs
- TextServicesPropertyRanges.cs
- Inline.cs
- X509Extension.cs
- basecomparevalidator.cs
- PDBReader.cs
- securitycriticaldata.cs
- RC2.cs
- IteratorFilter.cs
- TextEndOfLine.cs
- OracleConnection.cs
- FormsAuthenticationEventArgs.cs
- ContravarianceAdapter.cs
- ContractsBCL.cs
- EntityCommandDefinition.cs
- SecurityHeaderTokenResolver.cs
- DesignerDataSchemaClass.cs
- ExecutionContext.cs
- DocumentViewerAutomationPeer.cs
- PipelineDeploymentState.cs
- HealthMonitoringSection.cs
- CacheDependency.cs
- TransformDescriptor.cs
- DSACryptoServiceProvider.cs
- Base64Decoder.cs
- EventLogInternal.cs
- objectresult_tresulttype.cs
- DesignerActionUIService.cs
- LocalizabilityAttribute.cs
- ParallelTimeline.cs
- SymbolPair.cs
- SqlConnectionPoolGroupProviderInfo.cs
- TypeConverterHelper.cs
- HttpResponseHeader.cs
- DataGridViewImageCell.cs
- StatusBarPanelClickEvent.cs
- Int32Storage.cs
- SimpleType.cs
- SplashScreen.cs
- PriorityQueue.cs
- ExtenderProvidedPropertyAttribute.cs
- Script.cs
- ListMarkerSourceInfo.cs
- ButtonField.cs
- WebPartCloseVerb.cs
- XmlnsDictionary.cs
- HtmlLinkAdapter.cs
- LineInfo.cs
- SplineKeyFrames.cs
- MetaModel.cs
- GridItemPattern.cs
- AppDomainAttributes.cs
- TaskFileService.cs
- NetSectionGroup.cs
- ProtocolState.cs
- OleDbPropertySetGuid.cs
- AggregateNode.cs
- ApplicationBuildProvider.cs
- ButtonField.cs
- VisualCollection.cs
- ConfigurationElementProperty.cs
- ScriptingRoleServiceSection.cs
- StaticResourceExtension.cs
- TagMapCollection.cs
- XDeferredAxisSource.cs
- StickyNoteHelper.cs
- BinaryUtilClasses.cs
- ChineseLunisolarCalendar.cs
- DataRowView.cs
- UrlRoutingHandler.cs
- StateMachine.cs
- PropertyInfoSet.cs
- ParallelTimeline.cs