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
- ApplyImportsAction.cs
- InvalidPrinterException.cs
- XsdBuilder.cs
- DateTimeFormat.cs
- DataFormat.cs
- HealthMonitoringSection.cs
- WindowsListViewGroupHelper.cs
- SmtpNtlmAuthenticationModule.cs
- WebHttpEndpoint.cs
- BitmapSourceSafeMILHandle.cs
- ToolStripLabel.cs
- ToolStripArrowRenderEventArgs.cs
- ImageMapEventArgs.cs
- HMACMD5.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SqlSelectClauseBuilder.cs
- MiniLockedBorderGlyph.cs
- PageBuildProvider.cs
- LocationEnvironment.cs
- StrongNameKeyPair.cs
- ResourceCategoryAttribute.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- Invariant.cs
- TextParagraphView.cs
- documentsequencetextpointer.cs
- PingReply.cs
- MediaCommands.cs
- XmlNodeReader.cs
- XmlLinkedNode.cs
- TableSectionStyle.cs
- TypeLibConverter.cs
- ResourceProperty.cs
- PageRouteHandler.cs
- Underline.cs
- CanonicalFontFamilyReference.cs
- TextHidden.cs
- DomainUpDown.cs
- ArrayList.cs
- DataGridCaption.cs
- GACIdentityPermission.cs
- autovalidator.cs
- DSACryptoServiceProvider.cs
- ComponentSerializationService.cs
- GregorianCalendar.cs
- ChannelCredentials.cs
- IISMapPath.cs
- CreateRefExpr.cs
- EntityDataSourceContainerNameItem.cs
- StoreItemCollection.Loader.cs
- NativeCppClassAttribute.cs
- FunctionImportMapping.cs
- PinnedBufferMemoryStream.cs
- AssociationType.cs
- ResourceAssociationType.cs
- GestureRecognitionResult.cs
- DataBinding.cs
- NativeMethods.cs
- CodeCommentStatement.cs
- ConnectivityStatus.cs
- XmlQueryRuntime.cs
- RowUpdatedEventArgs.cs
- Stroke.cs
- CompiledXpathExpr.cs
- MembershipPasswordException.cs
- InsufficientMemoryException.cs
- ReceiveErrorHandling.cs
- WebPartDisplayModeCollection.cs
- QilUnary.cs
- GatewayIPAddressInformationCollection.cs
- ApplicationDirectory.cs
- KnownIds.cs
- ProjectionPathSegment.cs
- ConfigPathUtility.cs
- ImageSourceConverter.cs
- TransformPatternIdentifiers.cs
- Unit.cs
- Code.cs
- Module.cs
- TextPenaltyModule.cs
- CommandLineParser.cs
- CommandCollectionEditor.cs
- SHA512.cs
- DbConnectionPoolGroupProviderInfo.cs
- BooleanFunctions.cs
- IgnoreSection.cs
- List.cs
- TimeSpanConverter.cs
- ConditionChanges.cs
- QueryTreeBuilder.cs
- DocumentOrderComparer.cs
- SafeEventLogWriteHandle.cs
- DBParameter.cs
- TransactionInterop.cs
- NamespaceCollection.cs
- GPRECTF.cs
- TextTabProperties.cs
- ControlDesigner.cs
- SubpageParagraph.cs
- _ListenerRequestStream.cs
- WindowsAuthenticationModule.cs