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
- CurrentTimeZone.cs
- ArrayExtension.cs
- CodeIterationStatement.cs
- HtmlSelect.cs
- Context.cs
- Ipv6Element.cs
- Mappings.cs
- DragStartedEventArgs.cs
- MULTI_QI.cs
- DataError.cs
- StatusStrip.cs
- RtType.cs
- URLIdentityPermission.cs
- FlowDocumentScrollViewer.cs
- ElementNotAvailableException.cs
- MetadataArtifactLoaderComposite.cs
- LoginView.cs
- Char.cs
- SystemException.cs
- SliderAutomationPeer.cs
- ProviderBase.cs
- WrappedIUnknown.cs
- TreeView.cs
- InvalidAsynchronousStateException.cs
- ReachBasicContext.cs
- QueryStringParameter.cs
- ObjectViewQueryResultData.cs
- BufferModeSettings.cs
- TemplateField.cs
- DataServiceBehavior.cs
- HostingEnvironmentSection.cs
- ListDictionary.cs
- AvTraceFormat.cs
- BitmapInitialize.cs
- TableHeaderCell.cs
- CookielessHelper.cs
- SqlNotificationRequest.cs
- XamlContextStack.cs
- RemoteWebConfigurationHostStream.cs
- Panel.cs
- XmlDeclaration.cs
- sqlser.cs
- EqualityComparer.cs
- PolyLineSegment.cs
- TreeNodeStyleCollection.cs
- OperatorExpressions.cs
- DataBindingValueUIHandler.cs
- SoundPlayer.cs
- ProfileWorkflowElement.cs
- ResolveMatches11.cs
- PathSegmentCollection.cs
- XPathNavigator.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Int32.cs
- XNodeValidator.cs
- BindingManagerDataErrorEventArgs.cs
- PasswordRecovery.cs
- PackagingUtilities.cs
- ThreadAbortException.cs
- WebServiceTypeData.cs
- ErrorFormatterPage.cs
- SqlDataSourceCache.cs
- PriorityRange.cs
- DelegateBodyWriter.cs
- DelegatedStream.cs
- PhysicalFontFamily.cs
- cookiecollection.cs
- AssemblyInfo.cs
- StylusPlugInCollection.cs
- RecognizeCompletedEventArgs.cs
- ScalarOps.cs
- SEHException.cs
- SafeRightsManagementPubHandle.cs
- SmiXetterAccessMap.cs
- DelegateTypeInfo.cs
- HotSpot.cs
- basecomparevalidator.cs
- _ConnectStream.cs
- Stroke2.cs
- DetailsViewDeleteEventArgs.cs
- SQLDateTime.cs
- SchemaRegistration.cs
- SizeConverter.cs
- WebPartManagerInternals.cs
- ExternalException.cs
- PrimitiveType.cs
- BuildDependencySet.cs
- DbBuffer.cs
- ZipFileInfoCollection.cs
- InternalException.cs
- WorkflowApplicationAbortedException.cs
- DoubleAnimationUsingKeyFrames.cs
- XmlCodeExporter.cs
- HelpEvent.cs
- TextAdaptor.cs
- SignatureDescription.cs
- RetrieveVirtualItemEventArgs.cs
- Tracer.cs
- FrameDimension.cs
- TextProviderWrapper.cs