Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / RTLAwareMessageBox.cs / 1 / RTLAwareMessageBox.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms {
using System;
using System.Windows.Forms;
///
///
///
/// The Show method displays a message box that can contain text, buttons, and symbols that
/// inform and instruct the user. This MessageBox will be RTL, if the resources
/// for this dll have been localized to a RTL language.
///
///
internal sealed class RTLAwareMessageBox {
///
///
///
/// Displays a message box with specified text, caption, and style.
/// Makes the dialog RTL if the resources for this dll have been localized to a RTL language.
///
///
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton, MessageBoxOptions options) {
if (RTLAwareMessageBox.IsRTLResources) {
options |= (MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading);
}
return MessageBox.Show(owner, text, caption, buttons, icon, defaultButton, options);
}
///
/// Tells whether the current resources for this dll have been
/// localized for a RTL language.
///
public static bool IsRTLResources {
get {
return SR.GetString(SR.RTL) != "RTL_False";
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CreationContext.cs
- PopOutPanel.cs
- RelativeSource.cs
- UntypedNullExpression.cs
- ZipIOLocalFileDataDescriptor.cs
- ProfileGroupSettingsCollection.cs
- Pair.cs
- ExpressionParser.cs
- ApplicationFileCodeDomTreeGenerator.cs
- BitmapEffectvisualstate.cs
- SingleStorage.cs
- XhtmlBasicCommandAdapter.cs
- FormatSettings.cs
- CommunicationObject.cs
- Int16AnimationUsingKeyFrames.cs
- _HeaderInfoTable.cs
- SID.cs
- TextSelectionProcessor.cs
- TransportationConfigurationTypeInstallComponent.cs
- ExpiredSecurityTokenException.cs
- LineSegment.cs
- Symbol.cs
- _DisconnectOverlappedAsyncResult.cs
- DesigntimeLicenseContext.cs
- HatchBrush.cs
- Evidence.cs
- TableLayoutSettings.cs
- EncodingDataItem.cs
- AnimationStorage.cs
- Annotation.cs
- DesignerSerializationVisibilityAttribute.cs
- VerificationAttribute.cs
- PropertyTabAttribute.cs
- WebPartChrome.cs
- RootBrowserWindowAutomationPeer.cs
- HtmlMeta.cs
- MasterPage.cs
- PagesSection.cs
- EnumUnknown.cs
- SQLSingleStorage.cs
- TemplateNodeContextMenu.cs
- NameNode.cs
- UriTemplateMatch.cs
- ApplicationTrust.cs
- Vector3D.cs
- OperandQuery.cs
- Bitmap.cs
- ProcessHostConfigUtils.cs
- ObfuscationAttribute.cs
- RepeaterCommandEventArgs.cs
- Stack.cs
- ChangeProcessor.cs
- FormatException.cs
- AnimatedTypeHelpers.cs
- PageClientProxyGenerator.cs
- RoutedUICommand.cs
- CompilationUtil.cs
- ParameterCollectionEditorForm.cs
- WorkItem.cs
- PathData.cs
- AssemblyCollection.cs
- OutOfMemoryException.cs
- BuildDependencySet.cs
- DataSourceComponent.cs
- WindowsContainer.cs
- GridViewCancelEditEventArgs.cs
- DataList.cs
- OdbcErrorCollection.cs
- PartialArray.cs
- XsdCachingReader.cs
- XmlSchemaCompilationSettings.cs
- SqlFacetAttribute.cs
- UnicodeEncoding.cs
- LinearGradientBrush.cs
- XmlSerializerNamespaces.cs
- ConnectionPoint.cs
- ComplexObject.cs
- SizeAnimationClockResource.cs
- SparseMemoryStream.cs
- CompatibleComparer.cs
- ExpandedWrapper.cs
- Merger.cs
- Point.cs
- LogEntryDeserializer.cs
- VectorAnimationBase.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- ExtractorMetadata.cs
- IPGlobalProperties.cs
- SerialPinChanges.cs
- WpfMemberInvoker.cs
- RelationshipType.cs
- XslVisitor.cs
- TranslateTransform3D.cs
- Control.cs
- InputLanguageManager.cs
- TextFormatterHost.cs
- DrawingImage.cs
- WindowsSecurityTokenAuthenticator.cs
- LoginNameDesigner.cs
- WeakEventManager.cs