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
- TypedReference.cs
- DataColumnChangeEvent.cs
- CompilerGlobalScopeAttribute.cs
- Camera.cs
- CopyAction.cs
- Block.cs
- TypedReference.cs
- SerializableAttribute.cs
- Serializer.cs
- SettingsBase.cs
- controlskin.cs
- XmlSchemas.cs
- WindowsRichEditRange.cs
- AxImporter.cs
- TextParentUndoUnit.cs
- DataGridViewRowPostPaintEventArgs.cs
- IsolatedStoragePermission.cs
- Activator.cs
- AgileSafeNativeMemoryHandle.cs
- ErrorProvider.cs
- DispatcherHookEventArgs.cs
- EmptyControlCollection.cs
- NamespaceQuery.cs
- ModelToObjectValueConverter.cs
- JoinElimination.cs
- CodeThrowExceptionStatement.cs
- ToolStripMenuItem.cs
- TextRangeAdaptor.cs
- HtmlShim.cs
- X509CertificateValidationMode.cs
- BitArray.cs
- BrushConverter.cs
- GridItem.cs
- ReferencedType.cs
- ErrorHandler.cs
- Mouse.cs
- ListViewCancelEventArgs.cs
- LinqDataSourceContextData.cs
- KnownBoxes.cs
- MessageQueueInstaller.cs
- ContextProperty.cs
- ApplyTemplatesAction.cs
- Label.cs
- ApplyTemplatesAction.cs
- StreamSecurityUpgradeInitiatorBase.cs
- EntityDataSourceWrapperCollection.cs
- XamlGridLengthSerializer.cs
- Crc32Helper.cs
- PerformanceCounterLib.cs
- ProxySimple.cs
- XPathAncestorQuery.cs
- TypeExtensionConverter.cs
- regiisutil.cs
- FormViewInsertEventArgs.cs
- BinaryEditor.cs
- ResourceExpressionBuilder.cs
- ToolStripPanelRow.cs
- BuildProvider.cs
- ProgressBarHighlightConverter.cs
- HelloMessageCD1.cs
- _AcceptOverlappedAsyncResult.cs
- Attributes.cs
- IndexedSelectQueryOperator.cs
- MasterPage.cs
- BatchStream.cs
- EdmComplexPropertyAttribute.cs
- PolicyUnit.cs
- HttpWebResponse.cs
- HMACSHA384.cs
- ipaddressinformationcollection.cs
- InkPresenter.cs
- RequestCacheManager.cs
- ColumnMapVisitor.cs
- SkinBuilder.cs
- ManualResetEventSlim.cs
- ValidatingReaderNodeData.cs
- Int64Converter.cs
- SecurityException.cs
- ServicePrincipalNameElement.cs
- Tokenizer.cs
- TypeDependencyAttribute.cs
- StylusEventArgs.cs
- DbDataSourceEnumerator.cs
- ParameterCollection.cs
- WindowsGraphics2.cs
- bindurihelper.cs
- AnnotationAuthorChangedEventArgs.cs
- XmlCodeExporter.cs
- LineInfo.cs
- SslStream.cs
- NavigationFailedEventArgs.cs
- CodeExpressionCollection.cs
- CopyNamespacesAction.cs
- TraceSection.cs
- AsyncPostBackErrorEventArgs.cs
- base64Transforms.cs
- QuaternionAnimation.cs
- CircleHotSpot.cs
- GenericPrincipal.cs
- QueryRewriter.cs