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
- BufferBuilder.cs
- PropertyChangedEventManager.cs
- ImageField.cs
- DesignTable.cs
- TrustManager.cs
- DataRecordObjectView.cs
- CompositeCollection.cs
- DataSourceHelper.cs
- ObjectItemCollection.cs
- RenderDataDrawingContext.cs
- HorizontalAlignConverter.cs
- CaretElement.cs
- GradientStop.cs
- WebPartTransformer.cs
- QueueProcessor.cs
- NavigationService.cs
- EdmItemCollection.cs
- MarkupExtensionReturnTypeAttribute.cs
- Panel.cs
- EnumValidator.cs
- AnnotationService.cs
- ImageListUtils.cs
- TextBoxLine.cs
- SoapFormatter.cs
- HtmlElementErrorEventArgs.cs
- ProfileGroupSettings.cs
- DesignOnlyAttribute.cs
- InstanceDataCollectionCollection.cs
- MarkupCompiler.cs
- RandomDelaySendsAsyncResult.cs
- FormViewDeleteEventArgs.cs
- MsmqMessage.cs
- PatternMatcher.cs
- XmlAtomicValue.cs
- ConfigUtil.cs
- ProgressChangedEventArgs.cs
- ExtendedPropertyDescriptor.cs
- LocalValueEnumerator.cs
- Point3DAnimationBase.cs
- ProvidePropertyAttribute.cs
- FileDialogCustomPlace.cs
- DetailsViewInsertedEventArgs.cs
- FileSystemEventArgs.cs
- Repeater.cs
- TemplateNameScope.cs
- EFDataModelProvider.cs
- SQLCharsStorage.cs
- BitmapMetadata.cs
- WebPartChrome.cs
- TakeQueryOptionExpression.cs
- PreProcessor.cs
- SecurityHeaderLayout.cs
- SecurityUtils.cs
- ComponentCollection.cs
- SplineKeyFrames.cs
- WebPartCatalogAddVerb.cs
- HttpHandler.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- GetPageCompletedEventArgs.cs
- HtmlAnchor.cs
- CommonObjectSecurity.cs
- SwitchElementsCollection.cs
- ShapeTypeface.cs
- ParameterCollection.cs
- FixedDocumentPaginator.cs
- ManagementException.cs
- InputEventArgs.cs
- Setter.cs
- Descriptor.cs
- Wizard.cs
- ToolStripSeparator.cs
- Brushes.cs
- LateBoundBitmapDecoder.cs
- wgx_sdk_version.cs
- XmlWriterSettings.cs
- ReceiveCompletedEventArgs.cs
- SecurityPermission.cs
- EndpointDiscoveryMetadata11.cs
- TypeConverterHelper.cs
- MimePart.cs
- MergeFilterQuery.cs
- ServiceParser.cs
- DbConnectionInternal.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- UnsafeNativeMethods.cs
- DocumentXPathNavigator.cs
- EditorPartChrome.cs
- TrackingMemoryStream.cs
- ProtocolImporter.cs
- SamlAudienceRestrictionCondition.cs
- Stylus.cs
- KeyPullup.cs
- DrawingGroup.cs
- Visual3D.cs
- RuntimeConfigLKG.cs
- DoubleLinkListEnumerator.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- WorkflowMarkupSerializer.cs
- AxHostDesigner.cs
- WebControlParameterProxy.cs