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
- ClassImporter.cs
- Context.cs
- XhtmlTextWriter.cs
- InstanceContextManager.cs
- CodeAttributeDeclarationCollection.cs
- ToolStripSplitButton.cs
- XPathNodeIterator.cs
- TextComposition.cs
- _DisconnectOverlappedAsyncResult.cs
- FixedSOMFixedBlock.cs
- DataSourceListEditor.cs
- TableSectionStyle.cs
- PersonalizableTypeEntry.cs
- EnumValidator.cs
- _LocalDataStore.cs
- RSAPKCS1SignatureFormatter.cs
- OutputScope.cs
- NavigationPropertyEmitter.cs
- SharedUtils.cs
- Internal.cs
- MarkupCompilePass1.cs
- FrameworkName.cs
- Pen.cs
- ShapeTypeface.cs
- SimpleRecyclingCache.cs
- SoapAttributes.cs
- PropertyInfoSet.cs
- AuthenticationModuleElementCollection.cs
- XamlBrushSerializer.cs
- XslAstAnalyzer.cs
- PtsHost.cs
- SystemIPInterfaceStatistics.cs
- DataObjectPastingEventArgs.cs
- newitemfactory.cs
- Calendar.cs
- RootProfilePropertySettingsCollection.cs
- MultiPartWriter.cs
- StrokeDescriptor.cs
- ProcessInfo.cs
- InstalledFontCollection.cs
- FormsAuthentication.cs
- CollectionViewSource.cs
- LicFileLicenseProvider.cs
- MessageAction.cs
- relpropertyhelper.cs
- XmlCharCheckingWriter.cs
- DataObjectAttribute.cs
- ISAPIApplicationHost.cs
- RawStylusActions.cs
- VirtualPathUtility.cs
- CommonRemoteMemoryBlock.cs
- WebBodyFormatMessageProperty.cs
- ListBase.cs
- XmlCharacterData.cs
- RegionIterator.cs
- CheckBoxAutomationPeer.cs
- ConfigurationElementCollection.cs
- Lasso.cs
- StoreAnnotationsMap.cs
- CounterNameConverter.cs
- TypeConverter.cs
- FontTypeConverter.cs
- FamilyCollection.cs
- TreeViewImageIndexConverter.cs
- UnsafeNativeMethods.cs
- JumpTask.cs
- ViewLoader.cs
- DeclarativeCatalogPart.cs
- EdmScalarPropertyAttribute.cs
- SQLUtility.cs
- IsolatedStorageFileStream.cs
- CodeSubDirectory.cs
- GeometryHitTestResult.cs
- XmlSchemaChoice.cs
- EncodingInfo.cs
- AutomationElementCollection.cs
- SimpleTextLine.cs
- NavigationFailedEventArgs.cs
- FontDriver.cs
- ToolboxControl.cs
- Int16AnimationUsingKeyFrames.cs
- TextFormattingConverter.cs
- ClearCollection.cs
- FormatConvertedBitmap.cs
- EntityReference.cs
- ColumnPropertiesGroup.cs
- MatcherBuilder.cs
- ValidationErrorInfo.cs
- ConversionContext.cs
- WebFormsRootDesigner.cs
- BatchServiceHost.cs
- StructuredTypeInfo.cs
- CacheDependency.cs
- UserPreferenceChangingEventArgs.cs
- LinkButton.cs
- NullableConverter.cs
- ContentFilePart.cs
- DecodeHelper.cs
- RootBuilder.cs
- WindowsScrollBar.cs