using Bootstrap.DataAccess; using System.Security.Principal; namespace Bootstrap.Admin.Models { /// /// /// public class HeaderBarModel : ModelBase { /// /// /// /// public HeaderBarModel(IIdentity identity) { var user = UserHelper.RetrieveUserByUserName(identity.Name); Icon = string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon); DisplayName = user.DisplayName; UserName = user.UserName; AppCode = user.App; Css = user.Css; ActiveCss = string.IsNullOrEmpty(Css) ? Theme : Css; } /// /// /// public string UserName { get; } /// /// /// public string DisplayName { get; } /// /// 获得/设置 用户头像地址 /// public string Icon { get; } /// /// 获取/设置 个人网站样式 /// public string Css { get; } /// /// 获得 当前设置的默认应用 /// public string AppCode { get; } /// /// 获得 当前样式 /// public string ActiveCss { get; } } }