Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / Util / RTLAwareMessageBox.cs / 3 / RTLAwareMessageBox.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Windows.Forms; using System.Design; namespace System.Web.UI.Design.WebControls { ////// internal static 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 Strings.RTL != "RTL_False"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Windows.Forms; using System.Design; namespace System.Web.UI.Design.WebControls { ////// internal static 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 Strings.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
- HwndProxyElementProvider.cs
- DbProviderFactoriesConfigurationHandler.cs
- PrintControllerWithStatusDialog.cs
- TreeNodeStyleCollection.cs
- DoubleCollectionConverter.cs
- ClockController.cs
- ModulesEntry.cs
- HttpCookiesSection.cs
- DataSourceControl.cs
- ControlBuilder.cs
- RelationshipConverter.cs
- WmpBitmapEncoder.cs
- WinFormsUtils.cs
- RequestBringIntoViewEventArgs.cs
- Types.cs
- PageBreakRecord.cs
- UdpConstants.cs
- TdsParserHelperClasses.cs
- TextElement.cs
- ThreadExceptionDialog.cs
- MemoryMappedFile.cs
- DbConnectionPoolCounters.cs
- GraphicsPathIterator.cs
- HtmlLiteralTextAdapter.cs
- UnsafeNativeMethods.cs
- _NetRes.cs
- WhiteSpaceTrimStringConverter.cs
- ClientEventManager.cs
- HttpConfigurationSystem.cs
- WeakRefEnumerator.cs
- Compilation.cs
- TableItemStyle.cs
- ClientSideProviderDescription.cs
- UnsettableComboBox.cs
- SqlDataSourceCache.cs
- SpeechEvent.cs
- SqlClientWrapperSmiStreamChars.cs
- ChannelServices.cs
- IpcManager.cs
- InstanceCollisionException.cs
- DataControlLinkButton.cs
- PeerNameRecordCollection.cs
- Int32Storage.cs
- DistinctQueryOperator.cs
- PropertyPushdownHelper.cs
- RepeaterCommandEventArgs.cs
- Descriptor.cs
- StyleHelper.cs
- BindingMAnagerBase.cs
- Mappings.cs
- StrongName.cs
- DetailsViewDeletedEventArgs.cs
- WebPartManager.cs
- DataObjectFieldAttribute.cs
- SQLMoneyStorage.cs
- Currency.cs
- TransformFinalBlockRequest.cs
- HttpModulesSection.cs
- PagedDataSource.cs
- BulletChrome.cs
- Bitmap.cs
- ResourceAssociationSetEnd.cs
- ReferencedCollectionType.cs
- UIElementParagraph.cs
- ResXResourceSet.cs
- WindowVisualStateTracker.cs
- UInt32.cs
- CLSCompliantAttribute.cs
- While.cs
- CompareInfo.cs
- PackWebRequestFactory.cs
- PersistenceTypeAttribute.cs
- DependencyObjectPropertyDescriptor.cs
- LabelLiteral.cs
- ViewGenResults.cs
- DataTransferEventArgs.cs
- ImageField.cs
- XPathDescendantIterator.cs
- ConvertEvent.cs
- DeviceContext2.cs
- ImageMap.cs
- CodeTypeReference.cs
- GridViewRowEventArgs.cs
- BypassElementCollection.cs
- HtmlValidatorAdapter.cs
- VisualTarget.cs
- ApplicationFileParser.cs
- XPathNavigatorKeyComparer.cs
- GreenMethods.cs
- GenerateHelper.cs
- TextTreeTextBlock.cs
- FileUtil.cs
- DataGridViewColumnConverter.cs
- UnsafeNativeMethods.cs
- FormViewCommandEventArgs.cs
- UIElement3D.cs
- EntityProviderFactory.cs
- PackageStore.cs
- DataFormat.cs
- sqlcontext.cs