Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- TextShapeableCharacters.cs
- SpeakProgressEventArgs.cs
- ContentPlaceHolder.cs
- XsdDuration.cs
- DispatcherHooks.cs
- Repeater.cs
- SafeArrayTypeMismatchException.cs
- SerialPinChanges.cs
- LinearQuaternionKeyFrame.cs
- safesecurityhelperavalon.cs
- _SSPIWrapper.cs
- SizeFConverter.cs
- UserControl.cs
- PropertyGridCommands.cs
- ExpressionBinding.cs
- XmlUrlEditor.cs
- IMembershipProvider.cs
- InvalidContentTypeException.cs
- SafeThemeHandle.cs
- RectValueSerializer.cs
- DataGridTextBoxColumn.cs
- DesignerActionKeyboardBehavior.cs
- EastAsianLunisolarCalendar.cs
- StructuredTypeInfo.cs
- Version.cs
- TimeIntervalCollection.cs
- ClientTargetCollection.cs
- EmptyEnumerator.cs
- ColorComboBox.cs
- HWStack.cs
- _SslSessionsCache.cs
- HttpModuleAction.cs
- BasicHttpBinding.cs
- HitTestFilterBehavior.cs
- EntityDataSourceDataSelection.cs
- _UriTypeConverter.cs
- ChangePassword.cs
- IgnoreFileBuildProvider.cs
- PropertyEmitterBase.cs
- FormatSettings.cs
- Helper.cs
- ProvidersHelper.cs
- SqlWebEventProvider.cs
- WindowsGraphics2.cs
- NotImplementedException.cs
- SoapEnumAttribute.cs
- UserMapPath.cs
- CreateUserWizardDesigner.cs
- SafeArrayTypeMismatchException.cs
- ReadOnlyCollectionBase.cs
- ArgumentDesigner.xaml.cs
- LinqDataSourceUpdateEventArgs.cs
- Misc.cs
- Opcode.cs
- Listen.cs
- HtmlInputFile.cs
- SHA1.cs
- ScriptingSectionGroup.cs
- VBIdentifierTrimConverter.cs
- QuaternionKeyFrameCollection.cs
- ManagedIStream.cs
- ActivityStateRecord.cs
- DiffuseMaterial.cs
- itemelement.cs
- SplitterDesigner.cs
- X509Certificate2.cs
- Debugger.cs
- BuildProviderAppliesToAttribute.cs
- AdapterUtil.cs
- XmlTypeAttribute.cs
- SocketAddress.cs
- CodeTypeOfExpression.cs
- DataGridHeaderBorder.cs
- EditorReuseAttribute.cs
- ConstructorBuilder.cs
- ClientTargetCollection.cs
- PersonalizationStateQuery.cs
- IImplicitResourceProvider.cs
- CodeThrowExceptionStatement.cs
- SqlBuffer.cs
- SafeFileHandle.cs
- StringFreezingAttribute.cs
- Pts.cs
- ApplicationProxyInternal.cs
- PageParser.cs
- OleDbMetaDataFactory.cs
- TTSEngineTypes.cs
- FormViewPageEventArgs.cs
- TrustManagerMoreInformation.cs
- ConfigWriter.cs
- MemoryPressure.cs
- HitTestFilterBehavior.cs
- MenuCommand.cs
- PropertyPath.cs
- MatrixConverter.cs
- ProviderConnectionPoint.cs
- AutomationPropertyInfo.cs
- CodeParameterDeclarationExpressionCollection.cs
- WebFaultClientMessageInspector.cs
- DataGridViewSelectedCellCollection.cs