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 / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KeyboardNavigation.cs
- ListMarkerSourceInfo.cs
- ObjectStateManagerMetadata.cs
- OracleException.cs
- QueryCacheManager.cs
- PasswordBox.cs
- DockAndAnchorLayout.cs
- ListDictionaryInternal.cs
- SoapExtensionReflector.cs
- GetMemberBinder.cs
- CompiledQueryCacheKey.cs
- ResourceExpressionBuilder.cs
- XslAst.cs
- DataGridViewRowStateChangedEventArgs.cs
- MachineSettingsSection.cs
- RepeaterItem.cs
- SplitContainer.cs
- MachineKeySection.cs
- TextRunProperties.cs
- FixedBufferAttribute.cs
- RequestCache.cs
- ProjectionPlanCompiler.cs
- CollectionViewProxy.cs
- ExpressionConverter.cs
- SmiEventSink_Default.cs
- PrimaryKeyTypeConverter.cs
- TdsParser.cs
- ChildTable.cs
- CurrentTimeZone.cs
- BaseParaClient.cs
- NameTable.cs
- XmlChildNodes.cs
- Assembly.cs
- DateTimeFormatInfoScanner.cs
- EasingFunctionBase.cs
- ToolTipAutomationPeer.cs
- MediaContext.cs
- ReferenceTypeElement.cs
- SerializationSectionGroup.cs
- UriTemplateTableMatchCandidate.cs
- Identity.cs
- DesignerCategoryAttribute.cs
- XmlDocumentFieldSchema.cs
- WorkItem.cs
- BaseTemplateBuildProvider.cs
- UshortList2.cs
- keycontainerpermission.cs
- MLangCodePageEncoding.cs
- ShaderRenderModeValidation.cs
- MessageBox.cs
- SubMenuStyle.cs
- EventSetter.cs
- NumericUpDownAccelerationCollection.cs
- TextBlock.cs
- Timeline.cs
- TextSelectionHelper.cs
- QuaternionConverter.cs
- DataContractJsonSerializerOperationBehavior.cs
- CustomErrorsSectionWrapper.cs
- SiteMapPath.cs
- CoreSwitches.cs
- EntryPointNotFoundException.cs
- QueryCacheManager.cs
- WindowsEditBoxRange.cs
- EventRoute.cs
- _AutoWebProxyScriptHelper.cs
- Quad.cs
- StateFinalizationActivity.cs
- LambdaCompiler.Expressions.cs
- InstanceStoreQueryResult.cs
- GeometryGroup.cs
- SqlDelegatedTransaction.cs
- BigInt.cs
- BitmapDecoder.cs
- ToolTipService.cs
- _BasicClient.cs
- BackStopAuthenticationModule.cs
- AssemblyUtil.cs
- ButtonColumn.cs
- BindingCompleteEventArgs.cs
- CodeArrayIndexerExpression.cs
- MessageEncoder.cs
- SoundPlayerAction.cs
- streamingZipPartStream.cs
- ToolboxItemFilterAttribute.cs
- BitmapEffectInput.cs
- DrawingContextWalker.cs
- MexHttpBindingCollectionElement.cs
- HtmlEmptyTagControlBuilder.cs
- xsdvalidator.cs
- CacheDependency.cs
- BitmapInitialize.cs
- CodeIterationStatement.cs
- FilteredAttributeCollection.cs
- UnsupportedPolicyOptionsException.cs
- PolicyChain.cs
- CompilerScopeManager.cs
- EnumValidator.cs
- XmlSchemaImport.cs
- WebControlsSection.cs