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
- TypeLoadException.cs
- ListViewInsertEventArgs.cs
- WrapPanel.cs
- HelloOperation11AsyncResult.cs
- XmlNullResolver.cs
- RtfToXamlLexer.cs
- Crypto.cs
- PageParser.cs
- HtmlTextArea.cs
- PolygonHotSpot.cs
- AspCompat.cs
- HttpRequestWrapper.cs
- CustomErrorCollection.cs
- ConnectionManagementSection.cs
- ComponentResourceManager.cs
- ClientFormsAuthenticationCredentials.cs
- ClearCollection.cs
- RuntimeHandles.cs
- AutomationElementCollection.cs
- AccessorTable.cs
- ListControl.cs
- AuthenticatingEventArgs.cs
- CaseStatementProjectedSlot.cs
- XmlDocumentFragment.cs
- MobileControlBuilder.cs
- Hex.cs
- DataGridViewLinkCell.cs
- SimplePropertyEntry.cs
- AudioBase.cs
- GlobalAllocSafeHandle.cs
- WSSecurityPolicy11.cs
- ProfilePropertySettings.cs
- IdnMapping.cs
- UnsafeNativeMethods.cs
- EntityTransaction.cs
- DataControlHelper.cs
- ValidatedControlConverter.cs
- SynchronizedPool.cs
- MeasurementDCInfo.cs
- ContentElement.cs
- DataColumnMapping.cs
- CodeDirectiveCollection.cs
- DummyDataSource.cs
- StickyNoteAnnotations.cs
- SendMailErrorEventArgs.cs
- RNGCryptoServiceProvider.cs
- PageAsyncTask.cs
- RawStylusActions.cs
- _LocalDataStoreMgr.cs
- Rotation3D.cs
- TdsEnums.cs
- FontWeight.cs
- SiteMapNodeItemEventArgs.cs
- IntSecurity.cs
- ObfuscateAssemblyAttribute.cs
- InputLanguageProfileNotifySink.cs
- X509Chain.cs
- FormsAuthenticationTicket.cs
- TextEditorDragDrop.cs
- BookmarkEventArgs.cs
- BinaryCommonClasses.cs
- UInt64.cs
- QilXmlWriter.cs
- CompilationLock.cs
- IPPacketInformation.cs
- SecurityTokenSpecification.cs
- SafeNativeMethods.cs
- XmlSchemaIdentityConstraint.cs
- DesignerActionGlyph.cs
- RecognizedPhrase.cs
- SignatureHelper.cs
- TextParagraphCache.cs
- DataServiceQueryContinuation.cs
- X509ClientCertificateAuthentication.cs
- SqlCachedBuffer.cs
- Models.cs
- SymbolPair.cs
- AmbientLight.cs
- TouchPoint.cs
- FocusWithinProperty.cs
- SystemIcons.cs
- FieldMetadata.cs
- X509Certificate2.cs
- UseAttributeSetsAction.cs
- MachineKeyConverter.cs
- PhonemeEventArgs.cs
- PointCollection.cs
- ProxyWebPartConnectionCollection.cs
- CompositeFontParser.cs
- FeatureManager.cs
- SecureEnvironment.cs
- SafeNativeHandle.cs
- HtmlValidationSummaryAdapter.cs
- PersistenceParticipant.cs
- DataGrid.cs
- ZipIOModeEnforcingStream.cs
- AccessDataSource.cs
- ListBase.cs
- PreparingEnlistment.cs
- CryptoApi.cs