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
- SignalGate.cs
- TypedAsyncResult.cs
- EntityDataSourceSelectingEventArgs.cs
- MsmqOutputMessage.cs
- RuntimeConfigLKG.cs
- RegexBoyerMoore.cs
- SettingsBindableAttribute.cs
- Vector3dCollection.cs
- HwndMouseInputProvider.cs
- MobileControlPersister.cs
- CodeTypeReference.cs
- SQLByteStorage.cs
- ResolveRequestResponseAsyncResult.cs
- LocalizationComments.cs
- ValidationHelper.cs
- ToolStripStatusLabel.cs
- NavigationEventArgs.cs
- WebDisplayNameAttribute.cs
- ObjectReaderCompiler.cs
- Sql8ExpressionRewriter.cs
- nulltextcontainer.cs
- TextTreeUndoUnit.cs
- CommonObjectSecurity.cs
- XmlSchemaInferenceException.cs
- LogEntryDeserializer.cs
- MultiPageTextView.cs
- TextPatternIdentifiers.cs
- ProxyGenerator.cs
- MobileControlsSectionHandler.cs
- DefaultTextStoreTextComposition.cs
- XmlSchemaAnnotation.cs
- ListViewCancelEventArgs.cs
- XsltFunctions.cs
- MemberMemberBinding.cs
- Scene3D.cs
- FileDetails.cs
- DtrList.cs
- EventDescriptorCollection.cs
- EventManager.cs
- DoWorkEventArgs.cs
- DataMemberFieldConverter.cs
- MobileSysDescriptionAttribute.cs
- TouchEventArgs.cs
- SecondaryIndexList.cs
- XmlNullResolver.cs
- SBCSCodePageEncoding.cs
- PointCollection.cs
- CodeSnippetTypeMember.cs
- ExtensionQuery.cs
- BaseResourcesBuildProvider.cs
- ContextProperty.cs
- IOException.cs
- XpsFontSubsetter.cs
- RestClientProxyHandler.cs
- CqlLexerHelpers.cs
- BinaryWriter.cs
- TabPanel.cs
- COM2Properties.cs
- XmlSchemaProviderAttribute.cs
- WebPermission.cs
- StylusCollection.cs
- BinaryParser.cs
- ContractBase.cs
- TransactionsSectionGroup.cs
- UpDownEvent.cs
- StringInfo.cs
- TransformGroup.cs
- SmiSettersStream.cs
- Underline.cs
- DefaultMemberAttribute.cs
- PropertyChangeTracker.cs
- IUnknownConstantAttribute.cs
- NameService.cs
- OdbcTransaction.cs
- MetadataArtifactLoaderCompositeResource.cs
- DbDataSourceEnumerator.cs
- ServiceOperationInfoTypeConverter.cs
- WebSysDescriptionAttribute.cs
- DataRecordInfo.cs
- EntityStoreSchemaFilterEntry.cs
- ChangeTracker.cs
- MissingSatelliteAssemblyException.cs
- DataSourceControl.cs
- _UriSyntax.cs
- DbConnectionPoolCounters.cs
- DefinitionUpdate.cs
- SqlExpressionNullability.cs
- EnumDataContract.cs
- SimpleTypeResolver.cs
- SID.cs
- Style.cs
- StatusBarItemAutomationPeer.cs
- DefaultObjectMappingItemCollection.cs
- SystemColors.cs
- RuleSetBrowserDialog.cs
- ToolStripControlHost.cs
- InternalPolicyElement.cs
- IdentifierCreationService.cs
- OptionUsage.cs
- BodyGlyph.cs