Force combination was added

This commit is contained in:
Evgeny Redikultsev
2022-11-27 17:04:34 +05:00
parent c5e503252e
commit 96b331f14c
52 changed files with 427 additions and 214 deletions

View File

@@ -1,4 +1,6 @@
using System;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Services.Units;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -10,9 +12,17 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
{
internal abstract class UnitBase : IValueConverter
{
public abstract UnitTypes unitType { get; }
public abstract IUnit currentUnit { get; }
public abstract string unitName { get;}
public abstract string MeasureUnit { get; }
public abstract object Convert(object value, Type targetType, object parameter, CultureInfo culture);
public abstract object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture);
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return CommonOperation.Convert(currentUnit, unitName, value);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return CommonOperation.ConvertBack(unitType, currentUnit, value);
}
}
}