Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ClientBuildManager.cs
- InvalidOleVariantTypeException.cs
- TrustLevel.cs
- SpecialNameAttribute.cs
- MarkupCompilePass1.cs
- Exceptions.cs
- WsdlBuildProvider.cs
- CreateUserWizardStep.cs
- InnerItemCollectionView.cs
- TextBoxDesigner.cs
- InfoCardArgumentException.cs
- SoapFault.cs
- ToolStripItem.cs
- EventLogConfiguration.cs
- CultureTable.cs
- ToolboxComponentsCreatedEventArgs.cs
- DataGridViewRowCancelEventArgs.cs
- DataGridDetailsPresenterAutomationPeer.cs
- HtmlAnchor.cs
- RelOps.cs
- StorageBasedPackageProperties.cs
- StaticTextPointer.cs
- WindowsRegion.cs
- ContainerParagraph.cs
- BoundField.cs
- AdRotator.cs
- PackageRelationshipCollection.cs
- ParallelTimeline.cs
- SharedPersonalizationStateInfo.cs
- OutputScope.cs
- Argument.cs
- ObjectListCommandsPage.cs
- DefinitionUpdate.cs
- RetriableClipboard.cs
- Line.cs
- JavascriptCallbackResponseProperty.cs
- GeometryGroup.cs
- MessageDecoder.cs
- DocumentPaginator.cs
- CheckBox.cs
- TypeGeneratedEventArgs.cs
- DummyDataSource.cs
- UdpConstants.cs
- CrossSiteScriptingValidation.cs
- ValuePattern.cs
- HttpModuleActionCollection.cs
- JoinElimination.cs
- TextMessageEncodingBindingElement.cs
- WindowsTitleBar.cs
- StyleSheetRefUrlEditor.cs
- Internal.cs
- DateTimeConverter.cs
- HandlerWithFactory.cs
- XmlStreamStore.cs
- HostedHttpTransportManager.cs
- CalendarTable.cs
- EntityDataSourceWrapperCollection.cs
- PropertyItemInternal.cs
- TemplateColumn.cs
- ByteAnimation.cs
- Animatable.cs
- PrintPreviewDialog.cs
- GridViewCommandEventArgs.cs
- AutomationEventArgs.cs
- DoubleAnimationUsingPath.cs
- Boolean.cs
- SiteMapNodeCollection.cs
- Int16.cs
- ObjectPersistData.cs
- SqlParameterizer.cs
- CapabilitiesState.cs
- Unit.cs
- WebPartCancelEventArgs.cs
- StringWriter.cs
- WizardStepBase.cs
- GlyphInfoList.cs
- RowsCopiedEventArgs.cs
- NullRuntimeConfig.cs
- StringCollectionMarkupSerializer.cs
- WindowsClaimSet.cs
- PolyLineSegment.cs
- RootProfilePropertySettingsCollection.cs
- ProfileSection.cs
- PeerContact.cs
- ListViewSelectEventArgs.cs
- UntypedNullExpression.cs
- TextSelectionHighlightLayer.cs
- RectAnimationBase.cs
- HtmlInputButton.cs
- CompilerGlobalScopeAttribute.cs
- XmlComplianceUtil.cs
- WebRequestModuleElementCollection.cs
- Tablet.cs
- GeneralTransformGroup.cs
- SchemaCollectionPreprocessor.cs
- TreeNodeSelectionProcessor.cs
- ResourcePool.cs
- EntityPropertyMappingAttribute.cs
- SpotLight.cs
- UnauthorizedWebPart.cs