|
|
@ -8,7 +8,7 @@ namespace SunlightAggregationTerminal.Converters |
|
|
{ |
|
|
{ |
|
|
public class StringToImageConverter: IValueConverter |
|
|
public class StringToImageConverter: IValueConverter |
|
|
{ |
|
|
{ |
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) |
|
|
{ |
|
|
{ |
|
|
if (value !=null) |
|
|
if (value !=null) |
|
|
{ |
|
|
{ |
|
|
@ -29,7 +29,7 @@ namespace SunlightAggregationTerminal.Converters |
|
|
return ImageSource.FromFile("sunlightlogo.png"); |
|
|
return ImageSource.FromFile("sunlightlogo.png"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) |
|
|
{ |
|
|
{ |
|
|
// 通常图片转回字符串在 UI 上很少用到,可以抛出异常或留空
|
|
|
// 通常图片转回字符串在 UI 上很少用到,可以抛出异常或留空
|
|
|
throw new NotImplementedException(); |
|
|
throw new NotImplementedException(); |
|
|
|