private void InterpretSetting(string name, string value)
{
try
{
if (this.FloatSettings.Contains(name))
this.SetValue(name, Convert.ToSingle(value));
else if (this.IntegerSettings.Contains(name))
this.SetValue(name, Convert.ToInt32(value));
else if (this.UIntegerSettings.Contains(name))
this.SetValue(name, Convert.ToUInt32(value));
else if (this.BooleanSettings.Contains(name))
this.SetValue(name, Convert.ToBoolean(value));
else if (this.KeySettings.Contains(name))
this.SetValue(name, ParseEnum<WinAPI.VirtualKeyShort>(value));
else
WithOverlay.PrintError("Unknown settings-field \"{0}\" (value: \"{1}\")", name, value);
}
catch(Exception ex)
{
WithOverlay.PrintException(ex);
}
}