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
- relpropertyhelper.cs
- RowSpanVector.cs
- DataGridViewCellValidatingEventArgs.cs
- SecurityContext.cs
- XmlSchemaElement.cs
- ChannelServices.cs
- XmlWellformedWriter.cs
- DataObject.cs
- StringInfo.cs
- RuntimeArgumentHandle.cs
- DataGridItemCollection.cs
- WindowsListView.cs
- CreateInstanceBinder.cs
- BindingCollectionElement.cs
- TypefaceMetricsCache.cs
- ListViewEditEventArgs.cs
- JournalEntryListConverter.cs
- KeyNotFoundException.cs
- TypeEnumerableViewSchema.cs
- EntityObject.cs
- XamlSerializerUtil.cs
- DescendantOverDescendantQuery.cs
- Metafile.cs
- OdbcParameterCollection.cs
- CollectionTraceRecord.cs
- DocumentsTrace.cs
- EventLogTraceListener.cs
- LoggedException.cs
- CodeGenerator.cs
- ToolboxControl.cs
- PopupControlService.cs
- GroupBoxAutomationPeer.cs
- LeafCellTreeNode.cs
- NativeActivityContext.cs
- WebPartConnection.cs
- TrackingCondition.cs
- SRef.cs
- MouseActionConverter.cs
- DynamicDataResources.Designer.cs
- WebPartVerbsEventArgs.cs
- ExpandedWrapper.cs
- SortDescriptionCollection.cs
- infer.cs
- codemethodreferenceexpression.cs
- SafeNativeMethodsCLR.cs
- ZipIOLocalFileDataDescriptor.cs
- ProfileEventArgs.cs
- SessionStateUtil.cs
- ParseNumbers.cs
- OrderToken.cs
- WCFBuildProvider.cs
- PopupEventArgs.cs
- ToolStripArrowRenderEventArgs.cs
- EventLogPermissionEntry.cs
- WindowsToolbarAsMenu.cs
- SrgsElementList.cs
- webbrowsersite.cs
- ObfuscateAssemblyAttribute.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- ToolStripInSituService.cs
- FileRecordSequence.cs
- SafeProcessHandle.cs
- RepeaterItem.cs
- StylusPlugInCollection.cs
- TypeDelegator.cs
- DispatcherFrame.cs
- FontCacheLogic.cs
- XamlInterfaces.cs
- MultiTargetingUtil.cs
- UDPClient.cs
- SrgsDocument.cs
- indexingfiltermarshaler.cs
- XDeferredAxisSource.cs
- DataProviderNameConverter.cs
- ItemChangedEventArgs.cs
- ColumnMapProcessor.cs
- SecurityUtils.cs
- QuaternionValueSerializer.cs
- LateBoundBitmapDecoder.cs
- ClientTarget.cs
- BeginEvent.cs
- HtmlTernaryTree.cs
- DescendantBaseQuery.cs
- StructuralCache.cs
- TypeNameConverter.cs
- _LocalDataStore.cs
- WindowsListViewSubItem.cs
- RtfControlWordInfo.cs
- TraversalRequest.cs
- SinglePageViewer.cs
- TargetControlTypeCache.cs
- SpeechEvent.cs
- Screen.cs
- RenamedEventArgs.cs
- OleDbPermission.cs
- TableDetailsCollection.cs
- StrokeFIndices.cs
- UnknownBitmapEncoder.cs
- MessageBox.cs
- RSAPKCS1SignatureDeformatter.cs