Add beam shear calculator view

This commit is contained in:
Evgeny Redikultsev
2025-03-29 21:45:49 +05:00
parent 15bb7030cc
commit a0a25f183a
71 changed files with 969 additions and 472 deletions

View File

@@ -0,0 +1,37 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models.Shapes;
using StructureHelperCommon.Models.Shapes.Logics;
using StructureHelperCommon.Services;
using StructureHelperLogics.Models.Materials;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.BeamShears
{
public class BeamShearSectionUpdateStrategy : IUpdateStrategy<IBeamShearSection>
{
private IUpdateStrategy<IShape> shapeUpdateStrategy;
private IUpdateStrategy<IConcreteLibMaterial> concreteUpdateStrategy;
public void Update(IBeamShearSection targetObject, IBeamShearSection sourceObject)
{
CheckObject.IsNull(targetObject);
CheckObject.IsNull(sourceObject);
if (ReferenceEquals(targetObject, sourceObject)) { return; }
InitializeStrategies();
targetObject.Name = sourceObject.Name;
shapeUpdateStrategy.Update(targetObject.Shape, sourceObject.Shape);
targetObject.Material ??= new ConcreteLibMaterial();
concreteUpdateStrategy.Update(targetObject.Material, sourceObject.Material);
targetObject.CenterCover = sourceObject.CenterCover;
}
private void InitializeStrategies()
{
shapeUpdateStrategy ??= new ShapeUpdateStrategy();
concreteUpdateStrategy ??= new ConcreteLibUpdateStrategy();
}
}
}