using Bootstrap.Client.DataAccess; using Bootstrap.Security; using System.Security.Principal; namespace Bootstrap.Client.Models { /// /// /// public class HeaderBarModel : ModelBase { /// /// /// /// public HeaderBarModel(IIdentity identity) { var user = BootstrapUser.RetrieveUserByUserName(identity.Name); Icon = user.Icon; DisplayName = user.DisplayName; UserName = user.UserName; SettingsUrl = DictHelper.RetrieveSettingsUrl(); ProfilesUrl = DictHelper.RetrieveProfilesUrl(); if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css; } /// /// /// public string UserName { get; } /// /// /// public string DisplayName { get; } /// /// 获得/设置 用户头像地址 /// public string Icon { get; } /// /// 获得/设置 设置网址 /// public string SettingsUrl { get; set; } /// /// 获得/设置 个人中心网址 /// public string ProfilesUrl { get; set; } } }