aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config
blob: 1bcb77372318eb2c9539d38bb74a9e1d22dfdee7 (plain)
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
  <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
  <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
  <package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
  <package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
  <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
</packages>
udo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace Tango.MachineStudio.Statistics.Converters
{
    public class CollectionConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value != null && value is System.Collections.IEnumerable)
            {
                var colection = value as System.Collections.IEnumerable;
                var text = new StringBuilder();
                foreach(var val in colection)
                {
                    string visibleText = val.ToString();
                    if (val is bool)
                    {
                        visibleText = (bool)val== true ? "Yes" : "No";
                    }
                    text.Append(visibleText);
                    text.Append("/");
                }
                string str_text = text.ToString();
                if(str_text.Length > 1)
                {
                    str_text = str_text.Remove(str_text.Length - 1);
                }
                return str_text;
            }
            return "";
        }

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