public bool GetBoolValue(string key, bool defaultValue)
{
string stringValue = GetStringValue(key);
if (stringValue == null)
return defaultValue;
if (stringValue == "true" || stringValue == "yes" || stringValue == "on")
return true;
if (stringValue == "false" || stringValue == "no" || stringValue == "off")
return false;
throw new FormatException();
}