/// <summary> /// 在主窗口增加标签页。 /// 注:addMainTab在Main.aspx中注册了 /// </summary> /// <param name="id">标签页的ID,若再次调用,会跳到已经打开的标签页。</param> /// <param name="url">标签页URL</param> /// <param name="title">标题</param> /// <param name="icon">图标</param> /// <param name="refreshWhenExists">再次调用时是否刷新</param> public static void AddMainTab(string id, string url, string title, FineUI.Icon icon, bool refreshWhenExists = false) { string iconPath = GetIconUrl(icon); string script = string.Format("window.top.addMainTab('{0}', '{1}', '{2}', '{3}', {4})", id, url, title, iconPath, refreshWhenExists); FineUI.PageContext.RegisterStartupScript(script); }
// 获取FineUI图标的url public static string GetIconUrl(FineUI.Icon icon) { //return string.Format("~/Res/Icon/{0}.png", FineUI.Icon.Comment); return(FineUI.IconHelper.GetIconUrl(icon)); }