Unit constants was added

This commit is contained in:
Evgeny Redikultsev
2022-11-13 20:12:28 +05:00
parent 1e98e2cc57
commit e68ae14963
18 changed files with 152 additions and 40 deletions

View File

@@ -337,12 +337,12 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
{
if (this is Rectangle)
{
X = showedX + OwnerVm.YX1 / UnitConstatnts.LengthConstant;
X = showedX + OwnerVm.YX1 / UnitConstatnts.Length;
}
else if (this is Point)
{
Point point = this as Point;
X = showedX + OwnerVm.YX1 / UnitConstatnts.LengthConstant;
X = showedX + OwnerVm.YX1 / UnitConstatnts.Length;
}
else { throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown); }
}
@@ -350,12 +350,12 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
{
if (this is Rectangle)
{
Y = -showedY + OwnerVm.XY1 / UnitConstatnts.LengthConstant - PrimitiveHeight;
Y = -showedY + OwnerVm.XY1 / UnitConstatnts.Length - PrimitiveHeight;
}
else if (this is Point)
{
Point point = this as Point;
Y = -showedY + OwnerVm.XY1 / UnitConstatnts.LengthConstant - point.Diameter;
Y = -showedY + OwnerVm.XY1 / UnitConstatnts.Length - point.Diameter;
}
else { throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown); }
}