RTLAwareMessageBox.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / 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 
{
    ///  
    ///     
    ///       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.
    ///    
    /// 
    internal static class RTLAwareMessageBox 
    {
        ///  
        ///     
        ///       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. 
        ///    
        /// 
        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);
        }

        ///  
        ///     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

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK