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
- EventLog.cs
- PerformanceCounterManager.cs
- StorageAssociationSetMapping.cs
- TypedElement.cs
- ConcatQueryOperator.cs
- FlatButtonAppearance.cs
- _NTAuthentication.cs
- PageRequestManager.cs
- MetabaseReader.cs
- SchemaAttDef.cs
- EntityFunctions.cs
- PolyLineSegmentFigureLogic.cs
- RichTextBoxContextMenu.cs
- AudioLevelUpdatedEventArgs.cs
- IListConverters.cs
- PagesChangedEventArgs.cs
- LockedBorderGlyph.cs
- securestring.cs
- WsdlImporterElementCollection.cs
- OverflowException.cs
- EarlyBoundInfo.cs
- GridViewAutoFormat.cs
- PatternMatcher.cs
- LineMetrics.cs
- ControlCollection.cs
- CharEntityEncoderFallback.cs
- SchemaImporterExtension.cs
- ActivityCodeGenerator.cs
- DataServiceException.cs
- BaseTemplateBuildProvider.cs
- ServiceDescriptionSerializer.cs
- HtmlImage.cs
- Keyboard.cs
- ConnectionManagementElement.cs
- WindowsFormsSynchronizationContext.cs
- EncryptionUtility.cs
- HttpRequest.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- Symbol.cs
- XmlWrappingReader.cs
- GcSettings.cs
- FilterQueryOptionExpression.cs
- EnvelopedSignatureTransform.cs
- MenuItem.cs
- HttpCachePolicy.cs
- EncoderParameters.cs
- LogicalExpr.cs
- SQLByte.cs
- _Connection.cs
- DynamicRenderer.cs
- DeploymentExceptionMapper.cs
- StrokeDescriptor.cs
- AudioSignalProblemOccurredEventArgs.cs
- RSAOAEPKeyExchangeDeformatter.cs
- RegionIterator.cs
- DownloadProgressEventArgs.cs
- TextFormatterHost.cs
- XmlArrayAttribute.cs
- XmlException.cs
- GradientStop.cs
- ComboBoxAutomationPeer.cs
- SelectionEditingBehavior.cs
- ReadOnlyCollection.cs
- HtmlInputCheckBox.cs
- ScrollViewerAutomationPeer.cs
- DesignSurface.cs
- ProviderBase.cs
- ConsoleTraceListener.cs
- NetNamedPipeSecurityMode.cs
- AvTraceDetails.cs
- ObjectDataSourceDisposingEventArgs.cs
- RightsManagementEncryptionTransform.cs
- NamespaceCollection.cs
- ByteRangeDownloader.cs
- DataRowExtensions.cs
- InfoCardBaseException.cs
- TypedRowHandler.cs
- DockPatternIdentifiers.cs
- ReservationNotFoundException.cs
- RIPEMD160.cs
- ColumnHeader.cs
- XmlValidatingReaderImpl.cs
- PersonalizablePropertyEntry.cs
- HttpModuleActionCollection.cs
- ImageConverter.cs
- RegexBoyerMoore.cs
- InkCanvasSelection.cs
- XmlWriterTraceListener.cs
- XmlSyndicationContent.cs
- TextTreeRootTextBlock.cs
- DataGridItemEventArgs.cs
- MainMenu.cs
- BindingOperations.cs
- ResourceManager.cs
- TabControlAutomationPeer.cs
- MessageTraceRecord.cs
- EdmError.cs
- PermissionSetTriple.cs
- DynamicRendererThreadManager.cs
- CategoryEditor.cs