/// <summary> /// 保存组件设置 /// </summary> /// <param name="conf"></param> public void SaveComponent(SystemConfig conf) { var configSettings = new ConfigSettings(); var config = new SystemConfig(configSettings, "System", Server.MapPath("~/Settings")); config.Load(); config.TranslateKey = conf.TranslateKey; config.EnableStatistics = conf.EnableStatistics; config.StatisticsId = conf.StatisticsId; config.EnableShare = conf.EnableShare; config.JiaThisId = conf.JiaThisId; config.ShowComments = conf.ShowComments; config.ChangyanId = conf.ChangyanId; config.ShowGuestbook = conf.ShowGuestbook; config.YouyanId = conf.YouyanId; config.Save(); }
/// <summary> /// 保存站点设置 /// </summary> /// <param name="conf"></param> public void SaveSite(SystemConfig conf) { var configSettings = new ConfigSettings(); var config = new SystemConfig(configSettings, "System", Server.MapPath("~/Settings")); config.Load(); config.SiteName = conf.SiteName; config.SiteDomain = conf.SiteDomain; config.RecordNo = conf.RecordNo; config.LogoPath = conf.LogoPath; config.PageSize = conf.PageSize; config.ShowMenu = conf.ShowMenu; config.CacheExpired = conf.CacheExpired; config.Save(); }