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
- MailMessageEventArgs.cs
- InvokeHandlers.cs
- IOThreadTimer.cs
- ComEventsMethod.cs
- DetailsViewPagerRow.cs
- CoTaskMemHandle.cs
- DateTimeFormat.cs
- WorkflowInstance.cs
- Label.cs
- XmlAttributes.cs
- ProcessModule.cs
- MexNamedPipeBindingElement.cs
- ThicknessAnimation.cs
- TextParaClient.cs
- Shape.cs
- CustomAssemblyResolver.cs
- PropertyRef.cs
- OdbcConnection.cs
- FieldNameLookup.cs
- InvalidTimeZoneException.cs
- TextCharacters.cs
- XmlSerializer.cs
- PointCollection.cs
- OdbcDataReader.cs
- KeyToListMap.cs
- LicenseManager.cs
- MemberCollection.cs
- ErrorWrapper.cs
- PassportAuthenticationEventArgs.cs
- SingleConverter.cs
- Typeface.cs
- CodeTypeMember.cs
- BufferCache.cs
- OracleColumn.cs
- BrushConverter.cs
- PersonalizationProviderHelper.cs
- RegionData.cs
- DesignerView.xaml.cs
- AssemblySettingAttributes.cs
- RenderingBiasValidation.cs
- CultureSpecificStringDictionary.cs
- XsltContext.cs
- XmlDataSourceView.cs
- FixedDocument.cs
- WindowsListViewItemStartMenu.cs
- MappingSource.cs
- ClientBuildManagerCallback.cs
- ProtocolElement.cs
- SchemaImporterExtension.cs
- TrustLevelCollection.cs
- WizardForm.cs
- RadioButtonFlatAdapter.cs
- IdentifierService.cs
- VersionPair.cs
- AutoGeneratedFieldProperties.cs
- _NestedSingleAsyncResult.cs
- NonBatchDirectoryCompiler.cs
- FormsAuthenticationUserCollection.cs
- DocumentViewerConstants.cs
- ErrorActivity.cs
- DriveNotFoundException.cs
- xml.cs
- TextElementCollection.cs
- IDispatchConstantAttribute.cs
- CodeExporter.cs
- EnumValAlphaComparer.cs
- InvariantComparer.cs
- XpsFilter.cs
- WindowsListViewGroupHelper.cs
- ReachDocumentSequenceSerializerAsync.cs
- MLangCodePageEncoding.cs
- SnapLine.cs
- TraceProvider.cs
- SudsCommon.cs
- ConfigXmlWhitespace.cs
- NavigatingCancelEventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- XmlSchemaRedefine.cs
- XmlUrlResolver.cs
- PropertyChangedEventArgs.cs
- DebugViewWriter.cs
- XmlSchemaComplexType.cs
- LambdaSerializationException.cs
- ToolStripManager.cs
- IxmlLineInfo.cs
- StringExpressionSet.cs
- CodeNamespaceCollection.cs
- Pool.cs
- Storyboard.cs
- Parser.cs
- CleanUpVirtualizedItemEventArgs.cs
- DataStorage.cs
- CharEntityEncoderFallback.cs
- KeyToListMap.cs
- Vector3DKeyFrameCollection.cs
- MatrixTransform.cs
- RelativeSource.cs
- Int32Storage.cs
- CodeDirectoryCompiler.cs
- SimpleApplicationHost.cs