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
- TreeChangeInfo.cs
- ZipPackage.cs
- RadioButtonAutomationPeer.cs
- TextMarkerSource.cs
- DocumentXPathNavigator.cs
- AssemblyBuilder.cs
- RedistVersionInfo.cs
- AsyncCodeActivityContext.cs
- UIElementPropertyUndoUnit.cs
- DefaultDiscoveryService.cs
- SoapExtensionReflector.cs
- PageTheme.cs
- isolationinterop.cs
- DockProviderWrapper.cs
- UIntPtr.cs
- AnnotationStore.cs
- CollectionChangeEventArgs.cs
- ExpressionBuilderContext.cs
- AliasExpr.cs
- XmlCompatibilityReader.cs
- PrinterUnitConvert.cs
- MessageBodyMemberAttribute.cs
- JavaScriptString.cs
- UpDownBase.cs
- DataGridTextBoxColumn.cs
- TransformedBitmap.cs
- XmlSchemaExporter.cs
- HashSetEqualityComparer.cs
- BlurBitmapEffect.cs
- TaskFileService.cs
- XmlEnumAttribute.cs
- Predicate.cs
- GC.cs
- DocumentProperties.cs
- ManagedFilter.cs
- StringWriter.cs
- TextSelectionHighlightLayer.cs
- cookiecollection.cs
- ViewStateException.cs
- ComboBoxAutomationPeer.cs
- TerminatingOperationBehavior.cs
- MobileControlPersister.cs
- Debugger.cs
- ArraySubsetEnumerator.cs
- FrameAutomationPeer.cs
- Directory.cs
- DocumentViewerBaseAutomationPeer.cs
- CorrelationManager.cs
- ObjectListShowCommandsEventArgs.cs
- PersistChildrenAttribute.cs
- AtomContentProperty.cs
- ToolboxItemCollection.cs
- CodeVariableDeclarationStatement.cs
- ToolStripDesigner.cs
- RenamedEventArgs.cs
- XmlLanguageConverter.cs
- ListViewSelectEventArgs.cs
- ScrollChangedEventArgs.cs
- ProgressChangedEventArgs.cs
- XmlSortKey.cs
- CompositeCollection.cs
- XmlMembersMapping.cs
- Options.cs
- ServiceModelStringsVersion1.cs
- assertwrapper.cs
- PixelFormatConverter.cs
- Int64Storage.cs
- BatchWriter.cs
- Bezier.cs
- EmptyControlCollection.cs
- TypeHelpers.cs
- BindingEntityInfo.cs
- SafeHandles.cs
- ListItemDetailViewAttribute.cs
- ResourceDescriptionAttribute.cs
- CombinedGeometry.cs
- RootNamespaceAttribute.cs
- NTAccount.cs
- XPathException.cs
- SignedPkcs7.cs
- Events.cs
- CaseStatement.cs
- DataGridViewElement.cs
- NavigationHelper.cs
- CountdownEvent.cs
- UnsupportedPolicyOptionsException.cs
- StreamWriter.cs
- NativeMethods.cs
- BaseCollection.cs
- OraclePermissionAttribute.cs
- X509Extension.cs
- Rect3D.cs
- CompatibleComparer.cs
- XmlSchemaAll.cs
- Quaternion.cs
- OdbcUtils.cs
- LocationSectionRecord.cs
- PointAnimationUsingKeyFrames.cs
- TranslateTransform.cs
- PropertyChangedEventArgs.cs