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
- _LazyAsyncResult.cs
- XmlSchemaAny.cs
- BaseTemplateBuildProvider.cs
- HelpFileFileNameEditor.cs
- Vector3DKeyFrameCollection.cs
- TextBox.cs
- PasswordBoxAutomationPeer.cs
- Pool.cs
- MenuItemStyleCollection.cs
- LoginName.cs
- GlobalizationAssembly.cs
- XmlMemberMapping.cs
- CalendarDayButton.cs
- DataView.cs
- CodeDomDesignerLoader.cs
- CheckoutException.cs
- BufferedReadStream.cs
- SizeChangedInfo.cs
- SqlRetyper.cs
- Configuration.cs
- Attributes.cs
- Style.cs
- ImageClickEventArgs.cs
- SafeRightsManagementHandle.cs
- TemplateKey.cs
- CompilationSection.cs
- StorageFunctionMapping.cs
- Point3DAnimation.cs
- ShaderEffect.cs
- MenuCommand.cs
- CalendarButton.cs
- CreateUserWizard.cs
- IPEndPoint.cs
- IERequestCache.cs
- BasicViewGenerator.cs
- EntityWrapper.cs
- StaticFileHandler.cs
- HttpApplication.cs
- log.cs
- Function.cs
- DataViewSettingCollection.cs
- PieceNameHelper.cs
- DataGridRow.cs
- SettingsSection.cs
- MaterialCollection.cs
- CommandBindingCollection.cs
- DataGridViewDataErrorEventArgs.cs
- SafeCertificateContext.cs
- SqlBuffer.cs
- ValidationSettings.cs
- InfiniteTimeSpanConverter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- InheritanceContextHelper.cs
- ClientBuildManagerCallback.cs
- DispatcherHookEventArgs.cs
- PersistChildrenAttribute.cs
- FileDetails.cs
- webproxy.cs
- CalendarDataBindingHandler.cs
- Viewport3DAutomationPeer.cs
- MimeTypeMapper.cs
- QilValidationVisitor.cs
- SafeRightsManagementEnvironmentHandle.cs
- Operand.cs
- FolderBrowserDialog.cs
- BoundField.cs
- SelectedGridItemChangedEvent.cs
- PaperSize.cs
- ImpersonationContext.cs
- XmlSchemaProviderAttribute.cs
- HtmlInputControl.cs
- SplitContainer.cs
- EntityExpressionVisitor.cs
- PictureBoxDesigner.cs
- RawMouseInputReport.cs
- DataGridViewAccessibleObject.cs
- LayoutEngine.cs
- TypeSystem.cs
- BlurBitmapEffect.cs
- ContentPathSegment.cs
- wgx_render.cs
- SEHException.cs
- XComponentModel.cs
- HtmlLink.cs
- CatalogPart.cs
- X509CertificateStore.cs
- SoapException.cs
- CfgParser.cs
- OutputCacheProfileCollection.cs
- OuterGlowBitmapEffect.cs
- OpenFileDialog.cs
- NativeMethods.cs
- EdmRelationshipRoleAttribute.cs
- ArgumentNullException.cs
- CriticalFinalizerObject.cs
- Pointer.cs
- BindingCompleteEventArgs.cs
- Win32Native.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DocumentPageViewAutomationPeer.cs