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
- GenericXmlSecurityToken.cs
- Random.cs
- ZipIOLocalFileDataDescriptor.cs
- CqlBlock.cs
- UdpTransportSettings.cs
- CacheDependency.cs
- EventHandlerList.cs
- PageRequestManager.cs
- ActivityWithResultValueSerializer.cs
- XPathDocumentNavigator.cs
- ResolveCriteriaCD1.cs
- DataGridItem.cs
- TextAdaptor.cs
- DataServiceProviderMethods.cs
- ExpandSegmentCollection.cs
- SystemWebCachingSectionGroup.cs
- Dictionary.cs
- BinaryObjectWriter.cs
- AtomMaterializer.cs
- BindingsSection.cs
- TimeoutHelper.cs
- UpnEndpointIdentity.cs
- Ipv6Element.cs
- InstallerTypeAttribute.cs
- ConnectionModeReader.cs
- PropertyValueChangedEvent.cs
- CharConverter.cs
- CheckBox.cs
- ColorConverter.cs
- LineServices.cs
- EventHandlerList.cs
- PageThemeBuildProvider.cs
- SyndicationFeedFormatter.cs
- PerfService.cs
- RuntimeArgument.cs
- FreezableCollection.cs
- GeometryCollection.cs
- ApplicationServiceManager.cs
- ActivityScheduledQuery.cs
- DoubleAnimation.cs
- SqlServer2KCompatibilityCheck.cs
- MediaCommands.cs
- AnyReturnReader.cs
- ContentPresenter.cs
- OdbcHandle.cs
- ImagingCache.cs
- ValidatingReaderNodeData.cs
- IRCollection.cs
- XXXOnTypeBuilderInstantiation.cs
- Block.cs
- ShapingWorkspace.cs
- XXXInfos.cs
- MetadataArtifactLoaderFile.cs
- StorageInfo.cs
- InternalConfigEventArgs.cs
- PrintPreviewControl.cs
- WebBrowserBase.cs
- Region.cs
- Html32TextWriter.cs
- InheritanceService.cs
- Paragraph.cs
- AtomParser.cs
- ICspAsymmetricAlgorithm.cs
- AutomationEvent.cs
- StateWorkerRequest.cs
- DoWorkEventArgs.cs
- RootBuilder.cs
- ThousandthOfEmRealDoubles.cs
- SortDescriptionCollection.cs
- ExpandSegment.cs
- PointCollectionConverter.cs
- ConnectionStringsSection.cs
- ScaleTransform.cs
- WebPart.cs
- MarkedHighlightComponent.cs
- PromptEventArgs.cs
- Visual3D.cs
- ButtonDesigner.cs
- MenuAdapter.cs
- BitmapSourceSafeMILHandle.cs
- Wizard.cs
- ParameterReplacerVisitor.cs
- PtsPage.cs
- UIElementPropertyUndoUnit.cs
- TextFormatterHost.cs
- ThreadPool.cs
- FileInfo.cs
- AdRotatorDesigner.cs
- DataGridTablesFactory.cs
- ConcurrentStack.cs
- LinearGradientBrush.cs
- HyperLinkColumn.cs
- HttpClientCredentialType.cs
- OleStrCAMarshaler.cs
- QilLiteral.cs
- TextBox.cs
- StaticExtension.cs
- DictionaryBase.cs
- ApplicationTrust.cs
- SafeArrayTypeMismatchException.cs