Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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; ////// /// internal sealed class RTLAwareMessageBox { ////// 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. /// ////// /// 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); } ////// 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. /// ////// 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; ////// /// internal sealed class RTLAwareMessageBox { ////// 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. /// ////// /// 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); } ////// 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. /// ////// 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
- ObjRef.cs
- UrlPropertyAttribute.cs
- AutomationElementCollection.cs
- ActiveXSerializer.cs
- MemberExpression.cs
- StyleBamlRecordReader.cs
- DataQuery.cs
- SoapAttributes.cs
- SoapConverter.cs
- NativeMethods.cs
- SvcMapFileSerializer.cs
- UserControlAutomationPeer.cs
- TableLayoutRowStyleCollection.cs
- XmlMtomWriter.cs
- DataServiceQueryException.cs
- ButtonDesigner.cs
- DataServiceContext.cs
- ImageListImageEditor.cs
- AttachedPropertyMethodSelector.cs
- DnsPermission.cs
- CombinedGeometry.cs
- OdbcRowUpdatingEvent.cs
- HScrollBar.cs
- TextRangeSerialization.cs
- HttpMethodAttribute.cs
- SharedStatics.cs
- EastAsianLunisolarCalendar.cs
- SynchronizationValidator.cs
- MetadataCollection.cs
- ViewBase.cs
- HttpResponse.cs
- Registry.cs
- PeerObject.cs
- _NativeSSPI.cs
- ZoomPercentageConverter.cs
- ManifestResourceInfo.cs
- Identity.cs
- Image.cs
- AssemblyInfo.cs
- ContactManager.cs
- Transform.cs
- WsdlBuildProvider.cs
- PrinterUnitConvert.cs
- ItemContainerGenerator.cs
- infer.cs
- TreeViewCancelEvent.cs
- WindowProviderWrapper.cs
- XmlTypeMapping.cs
- FrameworkElement.cs
- CharacterBufferReference.cs
- PropertyBuilder.cs
- Privilege.cs
- NativeMethodsCLR.cs
- ComplusTypeValidator.cs
- ClientUrlResolverWrapper.cs
- WindowProviderWrapper.cs
- XdrBuilder.cs
- PriorityRange.cs
- PathSegment.cs
- XsltException.cs
- FilteredAttributeCollection.cs
- _SecureChannel.cs
- XmlUrlResolver.cs
- PerSessionInstanceContextProvider.cs
- WindowsEditBox.cs
- DataServiceConfiguration.cs
- FlowDocumentReader.cs
- XmlObjectSerializerReadContext.cs
- ProcessModelInfo.cs
- Tag.cs
- DrawingVisual.cs
- SharedPerformanceCounter.cs
- Point3DCollection.cs
- ModifiableIteratorCollection.cs
- EngineSiteSapi.cs
- XmlSchemaAll.cs
- MemoryRecordBuffer.cs
- IDispatchConstantAttribute.cs
- ThreadInterruptedException.cs
- httpserverutility.cs
- HttpListenerRequest.cs
- SQlBooleanStorage.cs
- RepeatButton.cs
- PropertyPushdownHelper.cs
- HttpCookieCollection.cs
- SqlEnums.cs
- ReadWriteObjectLock.cs
- AspNetHostingPermission.cs
- RadialGradientBrush.cs
- XmlAttribute.cs
- FilterUserControlBase.cs
- RegexCaptureCollection.cs
- DeliveryStrategy.cs
- WindowsSpinner.cs
- CompositeFontInfo.cs
- TimeoutException.cs
- TdsParameterSetter.cs
- NativeMethods.cs
- Select.cs
- DataGridViewCellStyleContentChangedEventArgs.cs