Exemplo n.º 1
0
        protected override void CreateChildControls()
        {
            string text   = null;
            string helpId = EACHelpId.LearnMoreCAL.ToString();

            if (RbacPrincipal.Current.IsInRole("Enterprise"))
            {
                text = this.EnterpriseText;
            }
            else if (RbacPrincipal.Current.IsInRole("LiveID"))
            {
                text = this.DatacenterText;
            }
            if (text == null)
            {
                this.Visible = false;
                base.CreateChildControls();
                return;
            }
            TableRow tableRow = new TableRow();

            tableRow.VerticalAlign = VerticalAlign.Top;
            this.Controls.Add(tableRow);
            TableCell tableCell = new TableCell();

            tableRow.Controls.Add(tableCell);
            CommonSprite commonSprite = new CommonSprite();

            commonSprite.ImageId = CommonSprite.SpriteId.Information;
            tableCell.Controls.Add(commonSprite);
            TableCell tableCell2 = new TableCell();

            tableRow.Controls.Add(tableCell2);
            HelpLink helpLink = new HelpLink();

            helpLink.Text = text;
            helpLink.TextIsFormatString = true;
            helpLink.HelpId             = helpId;
            tableCell2.Controls.Add(helpLink);
            base.CreateChildControls();
        }
Exemplo n.º 2
0
 protected override void OnPreRender(EventArgs e)
 {
     base.OnPreRender(e);
     base.NavigateUrl = HelpLink.GetHrefNoEncoding(this.HelpId);
     base.Attributes.Add("onclick", "PopupWindowManager.showHelpClient(this.href); return false;");
 }
Exemplo n.º 3
0
 internal static string GetHrefNoEncoding(string helpId)
 {
     return(HelpLink.HelpUrlBuilder(helpId));
 }
Exemplo n.º 4
0
 internal static string GetHref(string helpId)
 {
     return(Encoder.HtmlEncode(HelpLink.HelpUrlBuilder(helpId)));
 }
Exemplo n.º 5
0
 private string GetHrefNoEncoding()
 {
     return(HelpLink.GetHrefNoEncoding(this.HelpId));
 }
Exemplo n.º 6
0
 private string GetHref()
 {
     return(HelpLink.GetHref(this.HelpId));
 }