Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- StringAnimationUsingKeyFrames.cs
- TextEditorDragDrop.cs
- TargetConverter.cs
- ContractAdapter.cs
- ClassData.cs
- IisTraceWebEventProvider.cs
- TypeHelper.cs
- CodeCastExpression.cs
- ImageAutomationPeer.cs
- RightsManagementProvider.cs
- VariableAction.cs
- RequestCacheValidator.cs
- AspNetSynchronizationContext.cs
- Rect3D.cs
- AssemblyInfo.cs
- KernelTypeValidation.cs
- DBDataPermission.cs
- WebConfigurationHostFileChange.cs
- Interlocked.cs
- DecoderExceptionFallback.cs
- TCEAdapterGenerator.cs
- BinaryObjectReader.cs
- CalendarDay.cs
- LongValidatorAttribute.cs
- MulticastOption.cs
- StaticTextPointer.cs
- InstallerTypeAttribute.cs
- ConfigXmlWhitespace.cs
- WebControlAdapter.cs
- TextSimpleMarkerProperties.cs
- Focus.cs
- SchemaMerger.cs
- WrappedIUnknown.cs
- StatusBarDrawItemEvent.cs
- WmpBitmapDecoder.cs
- ExtendedPropertyDescriptor.cs
- Stacktrace.cs
- PtsHost.cs
- OdbcDataReader.cs
- CornerRadius.cs
- SqlDataSourceSelectingEventArgs.cs
- ChameleonKey.cs
- IssuanceLicense.cs
- TextProperties.cs
- InstanceCreationEditor.cs
- PipelineModuleStepContainer.cs
- OperandQuery.cs
- ClientTargetCollection.cs
- RegexWorker.cs
- FunctionUpdateCommand.cs
- CapabilitiesRule.cs
- FeatureManager.cs
- EventRouteFactory.cs
- DbProviderFactories.cs
- OracleDataAdapter.cs
- CryptoApi.cs
- MembershipPasswordException.cs
- SmiEventSink_DeferedProcessing.cs
- WebPartConnectionsCloseVerb.cs
- KoreanLunisolarCalendar.cs
- KeyNotFoundException.cs
- TrustSection.cs
- DesignerOptionService.cs
- VSWCFServiceContractGenerator.cs
- ImageConverter.cs
- WebPartActionVerb.cs
- HTMLTagNameToTypeMapper.cs
- MenuItem.cs
- ToolboxItemFilterAttribute.cs
- HttpCapabilitiesBase.cs
- CookielessHelper.cs
- WebRequestModulesSection.cs
- SwitchElementsCollection.cs
- SearchExpression.cs
- ApplyHostConfigurationBehavior.cs
- RadioButtonRenderer.cs
- GridViewColumnCollection.cs
- OutputCacheSection.cs
- XmlSignificantWhitespace.cs
- SmtpNetworkElement.cs
- MethodBody.cs
- MasterPageBuildProvider.cs
- Win32.cs
- UnionCodeGroup.cs
- PageParserFilter.cs
- CodeConditionStatement.cs
- CharEntityEncoderFallback.cs
- DocobjHost.cs
- EncoderParameters.cs
- EntityViewGenerator.cs
- SqlXmlStorage.cs
- PointCollection.cs
- WindowsStatic.cs
- NullRuntimeConfig.cs
- BufferModeSettings.cs
- ObjectHandle.cs
- XmlConvert.cs
- Int32.cs
- ParsedRoute.cs
- sqlcontext.cs