/// <summary> /// 增加spt /// </summary> /// <param name="id">id</param> /// <param name="text">text</param> /// <param name="DefaultImageUrl">默认的图片</param> /// <param name="HoverImageUrl">悬停的图片</param> public void AddTab(string id, string text, string DefaultImageUrl, string HoverImageUrl) { BPTab en = new BPTab(id, text); en.DefaultImageUrl = System.Web.HttpContext.Current.Request.ApplicationPath + DefaultImageUrl; en.HoverImageUrl = System.Web.HttpContext.Current.Request.ApplicationPath + HoverImageUrl; this.Items.Add(en); }
/// <summary> /// 获得 BPTab by key. /// </summary> /// <param name="key">key</param> /// <returns></returns> public BPTab GetBPTab(string key) { //return (BPTab)this.Items[]; for(int i = 0 ; i < this.Items.Count ;i++ ) { try { BPTab tab= (BPTab)this.Items[i]; if (tab.ID==key) return tab; } catch { } } throw new Exception("@没有Tab "+key); }
/// <summary> /// 增加spt /// </summary> /// <param name="id">id</param> /// <param name="text">text</param> public void AddTab(string id, string text) { BPTab en = new BPTab(id,text); this.Items.Add(en); }