Example #1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// OnPreRender runs just before the Render phase of the Page Life Cycle
        /// </summary>
        /// <history>
        ///     [cnurse]	12/22/2007	Created
        /// </history>
        /// -----------------------------------------------------------------------------
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            EnsureChildControls();
            separator.Visible = DisplayLink && DisplayIcon;

            LocalResourceFile = UIUtilities.GetLocalResourceFile(this);

            var tooltipText = string.Empty;

            if (!string.IsNullOrEmpty(ToolTipKey))
            {
                tooltipText = Localization.GetString(ToolTipKey, LocalResourceFile);
            }

            if (string.IsNullOrEmpty(tooltipText) && !string.IsNullOrEmpty(ToolTip))
            {
                tooltipText = ToolTip;
            }

            if (!string.IsNullOrEmpty(tooltipText))
            {
                icon.ToolTip = link.ToolTip = icon.AlternateText = tooltipText;
            }
        }
Example #2
0
 public static string GetLocalResourceFile(Control ctrl)
 {
     return(UIUtilities.GetLocalResourceFile(ctrl));
 }