Next step for having the settings of effects stored in the greenshot.ini, using a TypeConverter this seems to work. An important change to the IniValue.cs: here a default value is created when the ini doesn't have a value yet. This used to be just "null". Next step would be that settings forms get a reset/default button. [skip ci]

This commit is contained in:
RKrom 2014-11-17 12:49:06 +01:00
commit 8cb2dedb87
8 changed files with 263 additions and 44 deletions

View file

@ -305,7 +305,7 @@ namespace Greenshot.IniFile {
Value = defaultValueFromConfig;
return;
}
} else if (propertyValue != null) {
} else if (!string.IsNullOrEmpty(propertyValue)) {
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) {
// We are dealing with a generic type that is nullable
valueType = Nullable.GetUnderlyingType(valueType);