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
- WebPartEventArgs.cs
- CodeTypeReferenceCollection.cs
- SingleTagSectionHandler.cs
- SQLCharsStorage.cs
- FixedTextSelectionProcessor.cs
- XmlDataProvider.cs
- DragStartedEventArgs.cs
- DataObjectCopyingEventArgs.cs
- wmiprovider.cs
- OracleRowUpdatingEventArgs.cs
- XhtmlBasicListAdapter.cs
- SapiGrammar.cs
- QuaternionRotation3D.cs
- KeyMatchBuilder.cs
- X509ChainPolicy.cs
- Cell.cs
- MessageDecoder.cs
- VScrollBar.cs
- Selector.cs
- DocumentSchemaValidator.cs
- ActivityTrace.cs
- SelectionHighlightInfo.cs
- HtmlInputSubmit.cs
- ProviderCollection.cs
- TextContainer.cs
- DispatcherExceptionEventArgs.cs
- PropertyItem.cs
- BezierSegment.cs
- LinkButton.cs
- Win32SafeHandles.cs
- EditCommandColumn.cs
- MessageSecurityOverMsmq.cs
- PolyBezierSegment.cs
- AccessKeyManager.cs
- ListViewTableCell.cs
- UnicastIPAddressInformationCollection.cs
- ByteStorage.cs
- CFStream.cs
- Button.cs
- ComContractElementCollection.cs
- EdmProviderManifest.cs
- RadioButtonFlatAdapter.cs
- TextTreeNode.cs
- SettingsContext.cs
- LateBoundBitmapDecoder.cs
- TypeForwardedFromAttribute.cs
- HeaderCollection.cs
- ArglessEventHandlerProxy.cs
- WindowsFont.cs
- StructuredTypeEmitter.cs
- PopupRootAutomationPeer.cs
- PageAdapter.cs
- CodeValidator.cs
- MetadataProperty.cs
- XmlElementAttributes.cs
- SourceFilter.cs
- PathTooLongException.cs
- ButtonStandardAdapter.cs
- FamilyMap.cs
- ResourceDescriptionAttribute.cs
- ColorBuilder.cs
- ScriptingWebServicesSectionGroup.cs
- ImageIndexEditor.cs
- RankException.cs
- SharedUtils.cs
- QueryTask.cs
- Environment.cs
- ChtmlTextWriter.cs
- EllipticalNodeOperations.cs
- FreezableCollection.cs
- BindingOperations.cs
- ControlAdapter.cs
- TableItemProviderWrapper.cs
- TextServicesManager.cs
- PrintSystemException.cs
- Expression.DebuggerProxy.cs
- AccessorTable.cs
- AttributeXamlType.cs
- TextAutomationPeer.cs
- TreeNodeClickEventArgs.cs
- VectorAnimation.cs
- PrinterSettings.cs
- DecoderExceptionFallback.cs
- Link.cs
- AsymmetricAlgorithm.cs
- FixedPageProcessor.cs
- RunWorkerCompletedEventArgs.cs
- AppDomainFactory.cs
- Property.cs
- GPRECTF.cs
- FrameworkContentElementAutomationPeer.cs
- SaveFileDialog.cs
- PixelFormatConverter.cs
- XdrBuilder.cs
- SortedList.cs
- BamlRecords.cs
- ValidationRule.cs
- ProtectedConfigurationProviderCollection.cs
- WebContext.cs
- Bitmap.cs