using System;
using System.Globalization;
using System.Windows.Data;

namespace Flyad7_WPF.Converters
{
    public class ConnectionValueConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool? b = (bool?)value;
            if (b == null)
                return null;
            else if (b == true)
                return "连接成功";
            else
                return "连接断开";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
