Exemplo n.º 1
0
 public string GetSettingValue(SettingKeyEnum key)
 {
     foreach (var setting in settings)
     {
         if (setting.SettingKey == key)
         {
             return(setting.SettingValue);
         }
     }
     return("");
 }
Exemplo n.º 2
0
 private void LoadActiveKatas()
 {
     if (activeKatas == null)
     {
         activeKatas = new List <Kata>();
     }
     activeKatas.Clear();
     foreach (var kata in katas)
     {
         SettingKeyEnum kGroup    = GetGroupEnum(kata);
         string         groupUsed = GetSettingValue(kGroup);
         if (groupUsed == "1")
         {
             activeKatas.Add(kata);
         }
     }
 }
Exemplo n.º 3
0
 public void ChangeSetting(SettingKeyEnum key, string value)
 {
     db.SetSetting(key, value);
     LoadActiveKatas();
 }
Exemplo n.º 4
0
        internal void SetSetting(SettingKeyEnum key, string value)
        {
            var conn = getSettingConn();

            conn.Execute("UPDATE Settings SET SettingValue = ? where SettingKey = ?", value, key);
        }