Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / RTLAwareMessageBox.cs / 1305376 / 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
- StylusPlugin.cs
- NativeMethods.cs
- SoapException.cs
- XpsFilter.cs
- CodePropertyReferenceExpression.cs
- Int32CollectionConverter.cs
- MD5CryptoServiceProvider.cs
- DbConnectionStringCommon.cs
- BuildResultCache.cs
- PackageRelationshipCollection.cs
- BulletedList.cs
- DockPattern.cs
- ContainerFilterService.cs
- TypographyProperties.cs
- ObjectSecurity.cs
- DocumentPage.cs
- NetTcpBindingCollectionElement.cs
- CodeCompileUnit.cs
- ConfigurationException.cs
- StateMachineSubscriptionManager.cs
- D3DImage.cs
- XmlException.cs
- XAMLParseException.cs
- securestring.cs
- XmlCharCheckingReader.cs
- BlockCollection.cs
- BitmapEncoder.cs
- DataControlFieldCell.cs
- PolyQuadraticBezierSegment.cs
- SqlDataRecord.cs
- RegexCharClass.cs
- DesignerDataTableBase.cs
- ThreadStaticAttribute.cs
- UserPersonalizationStateInfo.cs
- ServiceDescription.cs
- JsonFormatWriterGenerator.cs
- SnapLine.cs
- HttpStreamXmlDictionaryWriter.cs
- OdbcCommand.cs
- TokenCreationParameter.cs
- ConfigXmlText.cs
- ChangeNode.cs
- ConfigurationPropertyCollection.cs
- ListViewContainer.cs
- UnicodeEncoding.cs
- EnvironmentPermission.cs
- ObjectToIdCache.cs
- ListBoxItem.cs
- StateChangeEvent.cs
- CompatibleIComparer.cs
- QilScopedVisitor.cs
- DefaultTraceListener.cs
- RegisteredScript.cs
- RuntimeConfigLKG.cs
- DefaultShape.cs
- TextEditorCopyPaste.cs
- CookieProtection.cs
- IndependentAnimationStorage.cs
- Int32Animation.cs
- MetadataArtifactLoaderCompositeFile.cs
- DrawListViewColumnHeaderEventArgs.cs
- DecoderBestFitFallback.cs
- HttpListenerPrefixCollection.cs
- ProgressBar.cs
- MDIWindowDialog.cs
- UInt16Storage.cs
- SmiMetaData.cs
- COM2IDispatchConverter.cs
- GPStream.cs
- KeyEventArgs.cs
- MulticastOption.cs
- MessageVersionConverter.cs
- ScaleTransform3D.cs
- ListControlBoundActionList.cs
- FontUnitConverter.cs
- XmlLoader.cs
- MouseActionConverter.cs
- DataGridViewComboBoxColumnDesigner.cs
- CodeCastExpression.cs
- ResizeGrip.cs
- IIS7WorkerRequest.cs
- HttpAsyncResult.cs
- Paragraph.cs
- DefaultEventAttribute.cs
- ItemContainerProviderWrapper.cs
- SecurityTokenResolver.cs
- SqlTransaction.cs
- BasicKeyConstraint.cs
- webeventbuffer.cs
- TextEditorTables.cs
- ApplicationException.cs
- ArrangedElementCollection.cs
- OutputCacheProfileCollection.cs
- OpenTypeLayoutCache.cs
- JoinSymbol.cs
- SimpleLine.cs
- DrawListViewItemEventArgs.cs
- Vector.cs
- SmtpDateTime.cs
- DefaultAsyncDataDispatcher.cs