Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / Util / RTLAwareMessageBox.cs / 1305376 / 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
- PrivacyNoticeElement.cs
- GridViewUpdateEventArgs.cs
- InstanceKeyView.cs
- NotImplementedException.cs
- InvalidFilterCriteriaException.cs
- DataRelationPropertyDescriptor.cs
- ResourcePermissionBase.cs
- NonNullItemCollection.cs
- OleDbRowUpdatedEvent.cs
- FlowDocumentReader.cs
- SecurityResources.cs
- VoiceInfo.cs
- UriParserTemplates.cs
- ObfuscationAttribute.cs
- ExceptionHandlerDesigner.cs
- PolyLineSegment.cs
- SiteMembershipCondition.cs
- TrackingMemoryStream.cs
- StructuredTypeEmitter.cs
- TextSelectionProcessor.cs
- PrintingPermissionAttribute.cs
- ReferencedAssembly.cs
- LazyTextWriterCreator.cs
- XmlDomTextWriter.cs
- LocalValueEnumerator.cs
- XmlWrappingWriter.cs
- Helpers.cs
- WorkflowPersistenceService.cs
- StatusBarItemAutomationPeer.cs
- WindowsGraphics2.cs
- SafePEFileHandle.cs
- ToolStripItemClickedEventArgs.cs
- ApplicationTrust.cs
- UrlMappingsModule.cs
- StorageFunctionMapping.cs
- HtmlElementCollection.cs
- EventLogStatus.cs
- HwndKeyboardInputProvider.cs
- WorkflowInstance.cs
- assertwrapper.cs
- PropertyItem.cs
- OletxCommittableTransaction.cs
- HttpWriter.cs
- PresentationTraceSources.cs
- BrowserCapabilitiesFactory.cs
- GridItemPattern.cs
- DataControlButton.cs
- FrameworkReadOnlyPropertyMetadata.cs
- DataGridViewColumnCollection.cs
- DataConnectionHelper.cs
- HttpServerVarsCollection.cs
- Operand.cs
- HtmlControlPersistable.cs
- XmlTextReaderImpl.cs
- IsolatedStorageFile.cs
- DynamicScriptObject.cs
- SecurityDocument.cs
- ToolBarButtonClickEvent.cs
- ZipIOLocalFileBlock.cs
- AlphabetConverter.cs
- Synchronization.cs
- ImmutableCommunicationTimeouts.cs
- MemberAccessException.cs
- CurrentChangedEventManager.cs
- FileEnumerator.cs
- PrinterResolution.cs
- isolationinterop.cs
- StylusCollection.cs
- DiscoveryServiceExtension.cs
- COM2ColorConverter.cs
- EdmEntityTypeAttribute.cs
- Base64Encoding.cs
- AppDomainUnloadedException.cs
- activationcontext.cs
- ApplicationException.cs
- SBCSCodePageEncoding.cs
- XmlComment.cs
- Double.cs
- IdentifierCollection.cs
- NetworkInformationException.cs
- CapabilitiesUse.cs
- XmlNamespaceMappingCollection.cs
- CngAlgorithmGroup.cs
- RecognizedWordUnit.cs
- ProxyFragment.cs
- SafeUserTokenHandle.cs
- HandlerBase.cs
- PeerNameRecord.cs
- SortQueryOperator.cs
- ConfigurationSchemaErrors.cs
- HttpDictionary.cs
- TextEffect.cs
- SelectionPattern.cs
- NameValuePermission.cs
- GridViewColumnCollection.cs
- StoryFragments.cs
- XhtmlTextWriter.cs
- FocusWithinProperty.cs
- InkCanvas.cs
- XmlExceptionHelper.cs