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
- PackageFilter.cs
- UidManager.cs
- ComponentResourceKey.cs
- IdentityHolder.cs
- CodeAttributeDeclarationCollection.cs
- Point.cs
- DecimalKeyFrameCollection.cs
- SelectionChangedEventArgs.cs
- XmlDataSourceNodeDescriptor.cs
- TextElementCollection.cs
- ImageInfo.cs
- XamlPointCollectionSerializer.cs
- TypeUnloadedException.cs
- GeometryModel3D.cs
- NetworkInterface.cs
- TimeZone.cs
- ContentFilePart.cs
- IdentitySection.cs
- InputMethod.cs
- Rectangle.cs
- EdmItemCollection.cs
- BidOverLoads.cs
- XmlSchemaDocumentation.cs
- HScrollProperties.cs
- Command.cs
- ButtonAutomationPeer.cs
- ListItem.cs
- SByte.cs
- NestedContainer.cs
- XmlSchemaValidationException.cs
- PriorityBindingExpression.cs
- bindurihelper.cs
- ClientBuildManagerCallback.cs
- CellLabel.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Zone.cs
- XPathQilFactory.cs
- ListCommandEventArgs.cs
- ValueType.cs
- HostingEnvironmentSection.cs
- CompilationUtil.cs
- ObjectToken.cs
- WorkflowOperationInvoker.cs
- ObjectQueryState.cs
- SequenceQuery.cs
- ColumnCollectionEditor.cs
- AssemblyContextControlItem.cs
- ImageSource.cs
- ActivityBuilderHelper.cs
- TailPinnedEventArgs.cs
- ToolStripStatusLabel.cs
- Color.cs
- DataService.cs
- GeometryModel3D.cs
- Helpers.cs
- MasterPageBuildProvider.cs
- DataTablePropertyDescriptor.cs
- ArraySegment.cs
- InternalCache.cs
- Int64KeyFrameCollection.cs
- CrossAppDomainChannel.cs
- SqlErrorCollection.cs
- GeneralTransform3DCollection.cs
- TrackingMemoryStreamFactory.cs
- BaseCodeDomTreeGenerator.cs
- MexBindingBindingCollectionElement.cs
- RolePrincipal.cs
- MasterPageParser.cs
- WebControl.cs
- MetadataExporter.cs
- RuntimeVariableList.cs
- LinqToSqlWrapper.cs
- MediaElement.cs
- Win32SafeHandles.cs
- ConnectionPoint.cs
- DateTimeOffset.cs
- MediaEntryAttribute.cs
- BulletChrome.cs
- Cursors.cs
- WebBrowser.cs
- GridViewDeletedEventArgs.cs
- ImageButton.cs
- DrawingContextDrawingContextWalker.cs
- ToolBarButtonClickEvent.cs
- xamlnodes.cs
- UrlRoutingHandler.cs
- NominalTypeEliminator.cs
- UiaCoreApi.cs
- HttpPostedFile.cs
- PenLineJoinValidation.cs
- XmlMemberMapping.cs
- SelectionItemPattern.cs
- TimelineGroup.cs
- CurrentChangingEventArgs.cs
- CompositionTarget.cs
- SinglePageViewer.cs
- DelegatingHeader.cs
- WMIInterop.cs
- TextRange.cs
- SecurityElement.cs