29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWo.Converter
|
|
{
|
|
public class NodeType2IconPathConverter : IValueConverter
|
|
{
|
|
private readonly Dictionary<NodeType, string> NodeType2Icon = new Dictionary<NodeType, string> { { NodeType.CostBearer, "../../Ressources/Icons/16_euro.png" }, { NodeType.Employee, "../../Ressources/Icons/User Business Male.png" }, { NodeType.SupportConceptCostBearerRelDC, "../../Ressources/Icons/16_euro.png" }, { NodeType.SupportConcept, "../../Ressources/Icons/16_report.png" }, { NodeType.Customer_Male, "../../Ressources/Icons/User Home Boy.png" }, { NodeType.Customer_Female, "../../Ressources/Icons/User Home Girl.png" }, { NodeType.Undefined, string.Empty } };
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is NodeType)
|
|
{
|
|
return this.NodeType2Icon[(NodeType)value];
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |