Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / RTLAwareMessageBox.cs / 1 / 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
- Main.cs
- DbMetaDataColumnNames.cs
- StrongNameMembershipCondition.cs
- EmptyEnumerator.cs
- XmlBindingWorker.cs
- ConfigXmlWhitespace.cs
- LightweightCodeGenerator.cs
- Guid.cs
- IteratorDescriptor.cs
- ClientSideQueueItem.cs
- Timeline.cs
- PromptBuilder.cs
- SafeProcessHandle.cs
- EdmItemError.cs
- IRCollection.cs
- TraceUtility.cs
- ColorConverter.cs
- HandlerFactoryWrapper.cs
- AssemblyResolver.cs
- TransformedBitmap.cs
- FigureParagraph.cs
- ShapeTypeface.cs
- CodeIdentifiers.cs
- LingerOption.cs
- TraceContextRecord.cs
- DelegatingConfigHost.cs
- HandlerFactoryCache.cs
- ContentPlaceHolder.cs
- TextClipboardData.cs
- IfAction.cs
- AttributeEmitter.cs
- DataBoundControlHelper.cs
- EventLogPropertySelector.cs
- DataGridTextBoxColumn.cs
- SqlError.cs
- MembershipSection.cs
- ConfigsHelper.cs
- DictionaryContent.cs
- BitmapFrameDecode.cs
- FormView.cs
- XmlUrlResolver.cs
- DropShadowEffect.cs
- ArcSegment.cs
- MouseActionValueSerializer.cs
- TextBoxBase.cs
- SmiConnection.cs
- SafeLibraryHandle.cs
- DelegatingTypeDescriptionProvider.cs
- RadioButtonList.cs
- ListItemConverter.cs
- DiscoveryRequestHandler.cs
- DifferencingCollection.cs
- DragDrop.cs
- ExecutionEngineException.cs
- TempEnvironment.cs
- FontUnitConverter.cs
- WindowsScrollBarBits.cs
- EpmCustomContentDeSerializer.cs
- SchemaMerger.cs
- basecomparevalidator.cs
- WindowsTitleBar.cs
- GridSplitterAutomationPeer.cs
- Trace.cs
- Point4DValueSerializer.cs
- XpsPartBase.cs
- FormViewCommandEventArgs.cs
- MultiBinding.cs
- SqlUserDefinedAggregateAttribute.cs
- ApplicationBuildProvider.cs
- Color.cs
- XamlWriterExtensions.cs
- CodeMethodInvokeExpression.cs
- PropertyCollection.cs
- MdiWindowListItemConverter.cs
- SessionParameter.cs
- Canvas.cs
- TimeEnumHelper.cs
- SqlBuilder.cs
- Utils.cs
- SrgsItemList.cs
- WsdlBuildProvider.cs
- FileDetails.cs
- CompilerWrapper.cs
- IndexedEnumerable.cs
- X509ClientCertificateCredentialsElement.cs
- SafeRightsManagementSessionHandle.cs
- TextTreeInsertElementUndoUnit.cs
- ActivationServices.cs
- LogReservationCollection.cs
- ArgIterator.cs
- BaseCodeDomTreeGenerator.cs
- DbMetaDataCollectionNames.cs
- WindowsEditBox.cs
- ImmutableClientRuntime.cs
- RelationshipFixer.cs
- ObjectSecurity.cs
- WaitForChangedResult.cs
- ObjectDataSourceStatusEventArgs.cs
- MsdtcWrapper.cs
- WebPartsPersonalizationAuthorization.cs