30 lines
837 B
C#
30 lines
837 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Globalization;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
using System.Windows.Media;
|
|||
|
|
|
|||
|
|
namespace 垂直剖面动态观测系统.Converter
|
|||
|
|
{
|
|||
|
|
//模型--制图的转换(箭头的颜色)
|
|||
|
|
public class BoolToBrushConverter : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
if (value != null && bool.Parse(value.ToString()))
|
|||
|
|
{
|
|||
|
|
return Brushes.LightGreen;
|
|||
|
|
}
|
|||
|
|
return Brushes.Red;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
throw new NotImplementedException();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|