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

namespace Aucma.Scada.UI.ConvertToObj.LinerInventory
{
    public class StatusLabelConverter : IMultiValueConverter
    {
        public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return false;
            }
            else
            {
                int info = (int)value[0];

                if (info == 1)
                {
                    return "green";
                }
                else
                {
                    return "red";
                }
            }

        }

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