💩 优化一部分代码

This commit is contained in:
liufei
2022-06-07 11:16:14 +08:00
parent 444697b457
commit 9d174ed2fc
12 changed files with 54 additions and 44 deletions

View File

@@ -10,12 +10,21 @@ namespace GeekDesk.Converts
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
int val = int.Parse(value.ToString());
var param = 0;
if (parameter != null)
{
param = int.Parse(parameter.ToString());
}
if (val + param > 0)
{
val += param;
}
return new CornerRadius(val);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
return null;
}
}
}