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
- WsdlBuildProvider.cs
- AmbientProperties.cs
- DataGridViewSortCompareEventArgs.cs
- SiteMapDataSource.cs
- LazyTextWriterCreator.cs
- BindingExpressionUncommonField.cs
- BackgroundWorker.cs
- CompressionTransform.cs
- CultureInfoConverter.cs
- TextTrailingWordEllipsis.cs
- CodeCompiler.cs
- MappableObjectManager.cs
- DomainLiteralReader.cs
- WpfPayload.cs
- FormConverter.cs
- DiscoveryVersion.cs
- SchemaType.cs
- SecurityKeyType.cs
- CommonObjectSecurity.cs
- UriScheme.cs
- BitmapEffectInput.cs
- documentsequencetextcontainer.cs
- HttpApplicationFactory.cs
- SqlNodeAnnotation.cs
- SqlServer2KCompatibilityCheck.cs
- Descriptor.cs
- ProviderUtil.cs
- ItemCheckedEvent.cs
- AnnotationResourceCollection.cs
- TextProviderWrapper.cs
- UserControlCodeDomTreeGenerator.cs
- DoneReceivingAsyncResult.cs
- CompilationUtil.cs
- MobileSysDescriptionAttribute.cs
- ReachPageContentCollectionSerializer.cs
- Regex.cs
- TypeElement.cs
- DictionaryTraceRecord.cs
- _NtlmClient.cs
- ArraySegment.cs
- RequiredAttributeAttribute.cs
- TwoPhaseCommit.cs
- AsyncOperation.cs
- MenuCommands.cs
- ExtensibleClassFactory.cs
- XmlDigitalSignatureProcessor.cs
- ComponentRenameEvent.cs
- SapiRecognizer.cs
- RoleManagerSection.cs
- ErrorRuntimeConfig.cs
- PathGradientBrush.cs
- HwndSourceKeyboardInputSite.cs
- SiteMapPath.cs
- TypeReference.cs
- Stacktrace.cs
- SessionSwitchEventArgs.cs
- ImageCodecInfo.cs
- WindowsToolbarItemAsMenuItem.cs
- StateBag.cs
- TypeNameParser.cs
- SemanticResultKey.cs
- SessionEndingEventArgs.cs
- DataGridParentRows.cs
- UpdateTranslator.cs
- TransformDescriptor.cs
- ScopelessEnumAttribute.cs
- AncestorChangedEventArgs.cs
- UriTemplateTableMatchCandidate.cs
- ArraySortHelper.cs
- ParameterDataSourceExpression.cs
- ContextTokenTypeConverter.cs
- SqlLiftWhereClauses.cs
- Memoizer.cs
- MediaScriptCommandRoutedEventArgs.cs
- ValidationPropertyAttribute.cs
- TransformerTypeCollection.cs
- RIPEMD160.cs
- TransformGroup.cs
- MetabaseSettings.cs
- FixedPageAutomationPeer.cs
- ConvertersCollection.cs
- FamilyTypeface.cs
- HMACSHA256.cs
- WebPartCollection.cs
- ErrorsHelper.cs
- XmlMessageFormatter.cs
- UniqueTransportManagerRegistration.cs
- OpCopier.cs
- WebPartDeleteVerb.cs
- Overlapped.cs
- BinaryFormatterWriter.cs
- LinqDataSourceInsertEventArgs.cs
- CodeMethodReturnStatement.cs
- StylusSystemGestureEventArgs.cs
- SQLInt64.cs
- Page.cs
- Attribute.cs
- CodeMethodInvokeExpression.cs
- CompilerScopeManager.cs
- XmlElementCollection.cs