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
- ConnectionInterfaceCollection.cs
- DropShadowBitmapEffect.cs
- bidPrivateBase.cs
- ByteRangeDownloader.cs
- ApplicationDirectory.cs
- PrimaryKeyTypeConverter.cs
- DelegateSerializationHolder.cs
- TemplateControl.cs
- SkipStoryboardToFill.cs
- JsonDataContract.cs
- CompiledQuery.cs
- TemplateControlBuildProvider.cs
- Baml6ConstructorInfo.cs
- RegisteredScript.cs
- StateBag.cs
- _DigestClient.cs
- XmlChildEnumerator.cs
- TextBox.cs
- DataDesignUtil.cs
- VectorAnimation.cs
- ConfigurationFileMap.cs
- DetailsViewPagerRow.cs
- NotFiniteNumberException.cs
- TrackBar.cs
- LinkedList.cs
- XPathScanner.cs
- ThreadExceptionDialog.cs
- InstallerTypeAttribute.cs
- BasicExpandProvider.cs
- IItemContainerGenerator.cs
- EmptyImpersonationContext.cs
- SerializationInfo.cs
- ObjectHelper.cs
- XhtmlBasicLinkAdapter.cs
- StatusBar.cs
- PenThread.cs
- DetailsViewUpdateEventArgs.cs
- XsltArgumentList.cs
- ObjectSpanRewriter.cs
- DeviceContext.cs
- WasHttpModulesInstallComponent.cs
- ColorConverter.cs
- KeyboardEventArgs.cs
- NullPackagingPolicy.cs
- SqlNotificationEventArgs.cs
- xmlformatgeneratorstatics.cs
- DBDataPermission.cs
- DesignParameter.cs
- HttpProfileGroupBase.cs
- ServiceOperationDetailViewControl.cs
- XmlSchemaParticle.cs
- ContentElement.cs
- AffineTransform3D.cs
- RbTree.cs
- State.cs
- ListBoxItemWrapperAutomationPeer.cs
- StickyNoteContentControl.cs
- OdbcInfoMessageEvent.cs
- AssemblyFilter.cs
- LinqDataSourceContextEventArgs.cs
- ViewManager.cs
- AssemblyBuilder.cs
- CollectionConverter.cs
- Window.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SqlAliasesReferenced.cs
- ManipulationVelocities.cs
- XDRSchema.cs
- DbProviderFactory.cs
- OleDbDataReader.cs
- ObjectHelper.cs
- MenuItem.cs
- Serializer.cs
- AddInSegmentDirectoryNotFoundException.cs
- ErrorWebPart.cs
- AnchoredBlock.cs
- EpmContentSerializer.cs
- XmlNamespaceMappingCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- SspiNegotiationTokenProvider.cs
- SettingsBase.cs
- AVElementHelper.cs
- ListViewEditEventArgs.cs
- BitmapScalingModeValidation.cs
- UrlAuthorizationModule.cs
- PathSegment.cs
- DataViewManager.cs
- BindingGraph.cs
- Wrapper.cs
- ReferencedCollectionType.cs
- ProxyFragment.cs
- Accessors.cs
- BufferedGraphicsManager.cs
- Window.cs
- TypeSystemHelpers.cs
- Rule.cs
- ObjectTag.cs
- DbgUtil.cs
- DoubleLinkListEnumerator.cs
- SpeakInfo.cs