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
- WebServicesDescriptionAttribute.cs
- ReferencedType.cs
- TimelineGroup.cs
- UInt16Storage.cs
- DataGridViewDataErrorEventArgs.cs
- LogicalExpr.cs
- ExpressionEditor.cs
- ToolStripContextMenu.cs
- DisplayNameAttribute.cs
- StaticSiteMapProvider.cs
- DbConnectionPool.cs
- ComboBox.cs
- FontEmbeddingManager.cs
- OleDragDropHandler.cs
- AssociationTypeEmitter.cs
- TraceListeners.cs
- AsyncStreamReader.cs
- MetadataItemSerializer.cs
- JumpPath.cs
- ToolStripItem.cs
- SqlParameter.cs
- SiteMapDataSourceView.cs
- ClaimComparer.cs
- WsatServiceCertificate.cs
- SqlDataSourceConnectionPanel.cs
- FormViewCommandEventArgs.cs
- ChtmlLinkAdapter.cs
- SqlFunctionAttribute.cs
- JsonEncodingStreamWrapper.cs
- LockCookie.cs
- XmlAnyElementAttributes.cs
- XmlCodeExporter.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- XPathNodeInfoAtom.cs
- IIS7UserPrincipal.cs
- SizeAnimation.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- QueryCacheKey.cs
- TableProvider.cs
- XmlAutoDetectWriter.cs
- BufferAllocator.cs
- WebBrowserEvent.cs
- BindingListCollectionView.cs
- _OverlappedAsyncResult.cs
- StringUtil.cs
- DetailsViewPageEventArgs.cs
- MasterPageParser.cs
- FlowDocumentFormatter.cs
- XmlSchemaAnnotation.cs
- SchemaManager.cs
- Pointer.cs
- Matrix3D.cs
- ProofTokenCryptoHandle.cs
- SqlProcedureAttribute.cs
- AtlasWeb.Designer.cs
- COM2FontConverter.cs
- FigureParaClient.cs
- AutoResetEvent.cs
- RequestQueue.cs
- BamlBinaryWriter.cs
- TextFragmentEngine.cs
- ReflectTypeDescriptionProvider.cs
- ThicknessAnimationBase.cs
- Paragraph.cs
- Floater.cs
- SqlStatistics.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlBufferReader.cs
- GridItemPatternIdentifiers.cs
- MatcherBuilder.cs
- WorkflowViewManager.cs
- ZipIOExtraFieldElement.cs
- TextChangedEventArgs.cs
- AccessKeyManager.cs
- ToolStripArrowRenderEventArgs.cs
- UpDownBase.cs
- ResolveNameEventArgs.cs
- ProcessModuleCollection.cs
- TargetControlTypeCache.cs
- PtsContext.cs
- MetadataArtifactLoaderCompositeFile.cs
- ImmComposition.cs
- Filter.cs
- NameValueFileSectionHandler.cs
- InfoCardListRequest.cs
- XPathSingletonIterator.cs
- VScrollBar.cs
- DataServiceQueryProvider.cs
- AuthenticationManager.cs
- FontStyle.cs
- BitConverter.cs
- ButtonPopupAdapter.cs
- EntityDataSourceSelectingEventArgs.cs
- RIPEMD160Managed.cs
- WhileDesigner.cs
- MonthChangedEventArgs.cs
- DependencyObjectType.cs
- PopupControlService.cs
- CommandExpr.cs
- Brushes.cs