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
- NotSupportedException.cs
- ToolStripSystemRenderer.cs
- HashUtility.cs
- SqlNotificationEventArgs.cs
- TdsParser.cs
- QilStrConcat.cs
- TextBox.cs
- FormattedText.cs
- NativeMethods.cs
- SqlNotificationEventArgs.cs
- METAHEADER.cs
- CorrelationValidator.cs
- DeviceContext.cs
- UnsupportedPolicyOptionsException.cs
- PictureBox.cs
- WebDescriptionAttribute.cs
- EntityDesignerDataSourceView.cs
- SymLanguageVendor.cs
- CodeBinaryOperatorExpression.cs
- EndpointIdentity.cs
- WindowCollection.cs
- UnsafeCollabNativeMethods.cs
- CalendarSelectionChangedEventArgs.cs
- Attributes.cs
- BinaryUtilClasses.cs
- TextPointerBase.cs
- PartitionedStream.cs
- ThreadStartException.cs
- securitymgrsite.cs
- StorageInfo.cs
- SoapObjectReader.cs
- EpmCustomContentWriterNodeData.cs
- AsnEncodedData.cs
- Aggregates.cs
- RemoteWebConfigurationHostStream.cs
- AnnotationService.cs
- ColumnResizeAdorner.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- WebHeaderCollection.cs
- ToolBarButtonClickEvent.cs
- HtmlInputRadioButton.cs
- ClientConfigPaths.cs
- DynamicMetaObject.cs
- RequiredFieldValidator.cs
- WebScriptServiceHostFactory.cs
- SourceItem.cs
- KnownTypeAttribute.cs
- MethodBody.cs
- Configuration.cs
- LoginUtil.cs
- DataGridViewCellFormattingEventArgs.cs
- XmlDataSourceView.cs
- _SslStream.cs
- UriExt.cs
- SelectedGridItemChangedEvent.cs
- SQLGuid.cs
- ToolStripContainer.cs
- StoryFragments.cs
- GeneralTransform3DTo2DTo3D.cs
- PropertyValueEditor.cs
- ExpressionDumper.cs
- StrongNamePublicKeyBlob.cs
- TextCompositionEventArgs.cs
- TripleDES.cs
- PeerFlooder.cs
- StylusPointPropertyInfo.cs
- SafeThemeHandle.cs
- webproxy.cs
- AttributeQuery.cs
- OutOfProcStateClientManager.cs
- Int32Collection.cs
- ClientRoleProvider.cs
- DataGridViewTopLeftHeaderCell.cs
- _Win32.cs
- LambdaSerializationException.cs
- XmlReflectionMember.cs
- EnumMemberAttribute.cs
- ListenerSessionConnection.cs
- ToolStripItemClickedEventArgs.cs
- ColorConverter.cs
- AuthorizationRule.cs
- CollectionEditorDialog.cs
- ColorInterpolationModeValidation.cs
- DirectionalLight.cs
- MediaElementAutomationPeer.cs
- PerformanceCounterPermissionEntryCollection.cs
- httpserverutility.cs
- NavigationHelper.cs
- TextWriterEngine.cs
- RequiredAttributeAttribute.cs
- WebDisplayNameAttribute.cs
- TimeoutException.cs
- NotSupportedException.cs
- ListBoxChrome.cs
- QueryComponents.cs
- AppDomain.cs
- formatter.cs
- ObjectTag.cs
- DynamicQueryableWrapper.cs
- XmlAttributeOverrides.cs