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
- validationstate.cs
- XmlWrappingReader.cs
- FaultHandlingFilter.cs
- OdbcUtils.cs
- TypeToken.cs
- ComPlusTraceRecord.cs
- SponsorHelper.cs
- SurrogateSelector.cs
- PriorityChain.cs
- WhiteSpaceTrimStringConverter.cs
- DesignerLoader.cs
- DBBindings.cs
- DynamicDocumentPaginator.cs
- DynamicDiscoveryDocument.cs
- DesignerValidatorAdapter.cs
- basecomparevalidator.cs
- User.cs
- ParallelTimeline.cs
- RawKeyboardInputReport.cs
- CompilationUtil.cs
- MatrixCamera.cs
- LinqDataSourceContextData.cs
- ListViewTableRow.cs
- PathFigureCollectionValueSerializer.cs
- DbTransaction.cs
- RegexReplacement.cs
- SpeechAudioFormatInfo.cs
- TextElementEditingBehaviorAttribute.cs
- SqlSelectStatement.cs
- CommonDialog.cs
- StylusOverProperty.cs
- ObjectComplexPropertyMapping.cs
- CreateDataSourceDialog.cs
- SoapTypeAttribute.cs
- BrowserDefinition.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- WebPartHeaderCloseVerb.cs
- FastEncoderWindow.cs
- TabletDeviceInfo.cs
- MultipartIdentifier.cs
- SqlTransaction.cs
- BitmapImage.cs
- ExcludePathInfo.cs
- ToolStripArrowRenderEventArgs.cs
- MultipartContentParser.cs
- URLIdentityPermission.cs
- TimelineGroup.cs
- OutputCacheSettingsSection.cs
- DisplayInformation.cs
- LinearGradientBrush.cs
- MarkupObject.cs
- DataBoundLiteralControl.cs
- ObjectParameter.cs
- codemethodreferenceexpression.cs
- HostProtectionPermission.cs
- _SslSessionsCache.cs
- AliasedSlot.cs
- DBCSCodePageEncoding.cs
- CacheDependency.cs
- SequenceQuery.cs
- SmiContext.cs
- ExecutionEngineException.cs
- _PooledStream.cs
- Query.cs
- _StreamFramer.cs
- DispatcherFrame.cs
- QuinticEase.cs
- TextTreePropertyUndoUnit.cs
- CommandEventArgs.cs
- DependencyObjectProvider.cs
- DropDownList.cs
- KnownTypeDataContractResolver.cs
- DataGridViewIntLinkedList.cs
- IERequestCache.cs
- IOException.cs
- Menu.cs
- WeakEventManager.cs
- ISFClipboardData.cs
- HitTestWithPointDrawingContextWalker.cs
- MsmqBindingFilter.cs
- UserValidatedEventArgs.cs
- XmlSchemaImporter.cs
- StreamUpdate.cs
- RichTextBox.cs
- behaviorssection.cs
- BinaryConverter.cs
- ToolStripPanelRow.cs
- OracleDateTime.cs
- NegatedConstant.cs
- StylusDevice.cs
- ScriptingProfileServiceSection.cs
- ModifierKeysConverter.cs
- GeneralTransform.cs
- SQLDateTime.cs
- QilPatternFactory.cs
- CalendarDay.cs
- _IPv4Address.cs
- XmlQuerySequence.cs
- AstTree.cs
- TextEditorLists.cs