Files
SewerGenerator/StammGenerator/Converters/EqualValueToParameterConverter.cs
Damian Wessels e7891c1a05 This fixed #4
Schacht können nun wieder gespeichert werden

Converter um Schachttype erweitert.
2023-08-08 09:56:32 +02:00

31 lines
1.0 KiB
C#

using SewerStammGen.Shared.Enum;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace StammGenerator.Converters
{
public class EqualValueToParameterConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value.ToString() == parameter.ToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
if (targetType == typeof(EExportType)) return (EExportType)parameter;
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
if (targetType == typeof(ESchachtType)) return (ESchachtType)parameter;
throw new NotImplementedException();
}
}
}