public void Render(TextWriter writer, NavigationModule currentModule, NavigationBarType type) { int num = Math.Min(6, this.itemList.Count); int num2 = (this.itemList.Count > 6) ? 6 : this.itemList.Count; int[] array = new int[num2]; int num3 = 0; for (int i = 0; i < num2; i++) { array[i] = 99 / num2; num3 += array[i]; } int num4 = 0; while (num3 < 99 && num4 < num2) { array[num4]++; num3++; num4++; } if (type == NavigationBarType.WunderBar) { writer.Write("<div class=\"nbWunderBar\">"); } for (int j = 0; j < num; j++) { this.itemList[j].Render(writer, currentModule, (type == NavigationBarType.WunderBar) ? array[j] : 0, type == NavigationBarType.WunderBar && this.itemList.Count > 4); } if (type == NavigationBarType.WunderBar) { writer.Write("</div>"); } if (this.itemList.Count > 6) { writer.Write("<div class=\"nbWunderBar\">"); for (int k = 6; k < 12; k++) { if (k < this.itemList.Count) { this.itemList[k].Render(writer, currentModule, array[k % 6], true); } else { writer.Write("<div class=\"nbMnuItm nbMnuItmWF\" style=\"width:"); writer.Write(array[k % 6]); writer.Write("%\">"); this.userContext.RenderThemeImage(writer, ThemeFileId.Clear1x1, "nbMnuImgWS", new object[0]); writer.Write("</div>"); } } writer.Write("</div>"); } }
public int GetNavigationBarHeight(NavigationBarType type) { if (type == NavigationBarType.WunderBar) { return(5 + 31 * ((this.itemList.Count > 6) ? 2 : 1)); } if (type == NavigationBarType.ExpandBar) { return(5 + 31 * ((this.itemList.Count > 6) ? 7 : this.itemList.Count)); } throw new ArgumentException("Wrong navigation bar type"); }
// Token: 0x06002BF8 RID: 11256 RVA: 0x000F5A75 File Offset: 0x000F3C75 protected int GetNavigationBarHeight(NavigationBarType type) { return(this.navigationBar.GetNavigationBarHeight(type)); }
// Token: 0x06002BF7 RID: 11255 RVA: 0x000F5A56 File Offset: 0x000F3C56 protected void RenderNavigationBar(NavigationBarType type) { this.navigationBar.Render(base.Response.Output, base.NavigationModule, type); }