Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XsltQilFactory.cs
- Utils.cs
- RayMeshGeometry3DHitTestResult.cs
- ServicePoint.cs
- AnnotationAuthorChangedEventArgs.cs
- MetadataSource.cs
- DbBuffer.cs
- TextEndOfParagraph.cs
- AutomationPeer.cs
- CompositionDesigner.cs
- SimpleTextLine.cs
- SafeArrayRankMismatchException.cs
- MeshGeometry3D.cs
- ValidationErrorCollection.cs
- FlowNode.cs
- OrderedDictionary.cs
- TemplateInstanceAttribute.cs
- JapaneseLunisolarCalendar.cs
- SqlClientMetaDataCollectionNames.cs
- BuildProviderAppliesToAttribute.cs
- XmlDataSourceView.cs
- SmiConnection.cs
- DataContract.cs
- KeyValueInternalCollection.cs
- VScrollProperties.cs
- FileRecordSequence.cs
- SqlFlattener.cs
- TimersDescriptionAttribute.cs
- ProcessModelSection.cs
- Util.cs
- ClientProxyGenerator.cs
- MemberJoinTreeNode.cs
- ConfigurationStrings.cs
- TimeSpanParse.cs
- MessageBox.cs
- EventSetter.cs
- ProtocolsInstallComponent.cs
- CompoundFileReference.cs
- Mappings.cs
- CqlParserHelpers.cs
- ObjectConverter.cs
- BlurEffect.cs
- RegexWorker.cs
- ClientTargetSection.cs
- AppDomainCompilerProxy.cs
- StsCommunicationException.cs
- SectionInformation.cs
- ErrorView.xaml.cs
- InputMethod.cs
- DataKeyArray.cs
- SessionStateContainer.cs
- ObjectQuery_EntitySqlExtensions.cs
- WebPartAddingEventArgs.cs
- XmlQueryType.cs
- DataGridViewAddColumnDialog.cs
- GenericRootAutomationPeer.cs
- InvalidCommandTreeException.cs
- EntitySetDataBindingList.cs
- XmlSortKeyAccumulator.cs
- CacheSection.cs
- ActivationArguments.cs
- DataGridViewDataConnection.cs
- MdiWindowListItemConverter.cs
- HTMLTextWriter.cs
- TdsParserSafeHandles.cs
- TransportElement.cs
- DataGridViewHeaderCell.cs
- StringConcat.cs
- CommentAction.cs
- SoapHeaderAttribute.cs
- DirtyTextRange.cs
- RowUpdatedEventArgs.cs
- ListViewSortEventArgs.cs
- OutArgument.cs
- OracleConnectionStringBuilder.cs
- ChooseAction.cs
- LoadMessageLogger.cs
- AnalyzedTree.cs
- DesignerLoader.cs
- formatter.cs
- ZipFileInfoCollection.cs
- TextProperties.cs
- FontFamily.cs
- ViewStateModeByIdAttribute.cs
- Int16.cs
- RuleProcessor.cs
- RelationshipType.cs
- ContractMapping.cs
- UpdateException.cs
- Win32Native.cs
- TileModeValidation.cs
- FormView.cs
- LinqDataSource.cs
- WmlPageAdapter.cs
- RepeaterItemEventArgs.cs
- SiteOfOriginContainer.cs
- ValueUnavailableException.cs
- KeyboardDevice.cs
- StringUtil.cs
- Point3DCollection.cs