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
- MessageLogTraceRecord.cs
- Html32TextWriter.cs
- DrawingState.cs
- Crypto.cs
- StructuredProperty.cs
- InvalidOperationException.cs
- BooleanAnimationUsingKeyFrames.cs
- followingsibling.cs
- CodeArgumentReferenceExpression.cs
- DisplayInformation.cs
- Asn1IntegerConverter.cs
- RuntimeHelpers.cs
- RepeatButton.cs
- VisualStyleTypesAndProperties.cs
- StateManagedCollection.cs
- SqlRowUpdatingEvent.cs
- XmlSchemaInfo.cs
- HttpPostProtocolImporter.cs
- ClusterSafeNativeMethods.cs
- DetailsView.cs
- RoleManagerModule.cs
- ScriptServiceAttribute.cs
- QilXmlReader.cs
- TCEAdapterGenerator.cs
- StreamWriter.cs
- NetPeerTcpBindingElement.cs
- querybuilder.cs
- RoutedEventConverter.cs
- PageEventArgs.cs
- WindowsUpDown.cs
- TypeExtension.cs
- EntityDataSourceSelectingEventArgs.cs
- ColumnHeader.cs
- ReaderWriterLock.cs
- RegexGroupCollection.cs
- SqlInternalConnectionSmi.cs
- DefaultTextStoreTextComposition.cs
- StringKeyFrameCollection.cs
- DocumentPageView.cs
- PeerDuplexChannelListener.cs
- RuleProcessor.cs
- FlowLayoutSettings.cs
- EditorPart.cs
- XslNumber.cs
- LogArchiveSnapshot.cs
- XXXInfos.cs
- Identity.cs
- XmlSchemaIdentityConstraint.cs
- PropertyPushdownHelper.cs
- ProxyFragment.cs
- RepeaterItemEventArgs.cs
- InputBinder.cs
- _AutoWebProxyScriptHelper.cs
- DataMisalignedException.cs
- BindingWorker.cs
- Clause.cs
- WorkflowInstanceQuery.cs
- DataReceivedEventArgs.cs
- DescriptionAttribute.cs
- TabControlAutomationPeer.cs
- WebConvert.cs
- ViewStateException.cs
- DeferredElementTreeState.cs
- ReliableReplySessionChannel.cs
- StylusDevice.cs
- PresentationSource.cs
- DesignerHelpers.cs
- TPLETWProvider.cs
- RuntimeComponentFilter.cs
- Selection.cs
- fixedPageContentExtractor.cs
- CodeDOMUtility.cs
- CreateUserWizard.cs
- ComContractElement.cs
- FormsAuthenticationEventArgs.cs
- X509Certificate2Collection.cs
- InterleavedZipPartStream.cs
- TableFieldsEditor.cs
- FilteredDataSetHelper.cs
- ToolBarTray.cs
- DefaultMergeHelper.cs
- TextWriterTraceListener.cs
- ProjectionPruner.cs
- CustomWebEventKey.cs
- BamlResourceSerializer.cs
- ContainerParagraph.cs
- CompilerGlobalScopeAttribute.cs
- DataTableMappingCollection.cs
- WSSecurityTokenSerializer.cs
- FindCriteria11.cs
- Misc.cs
- ComponentRenameEvent.cs
- externdll.cs
- ClientConvert.cs
- Ray3DHitTestResult.cs
- TextBlock.cs
- MergeFailedEvent.cs
- XPathCompileException.cs
- ObjectCacheHost.cs
- HttpRuntimeSection.cs