30 lines
827 B
C#
30 lines
827 B
C#
using ATS.Windows;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Data;
|
|
|
|
namespace ATS.Converters
|
|
{
|
|
public class GuidToParameterNameConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if(value is Guid id)
|
|
{
|
|
var para = MainWindow.Instance.Program.Parameters.FirstOrDefault(x => x.ID == id);
|
|
if(para != null) return para.Name;
|
|
}
|
|
return "";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|