This commit is contained in:
sc committed 2024-08-18 20:08:50 +08:00
commit eb3b176a26
13 files changed
+133 -25

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace DyeingComputer.ConvertMoels
{
internal class GramsSQLConvert: IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool G = System.Convert.ToBoolean(value);
if (!G)//判断单元格值是否为零
{
return "black";//零返回
}
else
{
return "red";//非零返回红色
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return null;
}
}
}
+1 -1
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -34,7 +35,6 @@ namespace DyeingComputer.ConvertMoels
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();