示例#1
0
 public void UpdateWidgetSettings()
 {
     foreach (var widgetDefault in Widget.WidgetDefaults)
     {
         var setting =
             WidgetSettings.FirstOrDefault(e => e.WidgetDefaultId == widgetDefault.WidgetDefaultId);
         if (setting == null)
         {
             WidgetSettings.Add(CreateFrom(widgetDefault));
         }
     }
 }
示例#2
0
        private WidgetSetting GetSettingByName(string settingName)
        {
            var widgetDefault = Widget.WidgetDefaults.FirstOrDefault(e => e.SettingName.ToLower() == settingName.ToLower());

            return(WidgetSettings.FirstOrDefault(t => t.WidgetDefaultId == widgetDefault.WidgetDefaultId));
        }
示例#3
0
 private WidgetSetting GetSettingById(string settingId)
 {
     return(WidgetSettings.FirstOrDefault(e => e.WidgetSettingId == settingId));
 }