Add beam shear window
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -13,7 +14,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
|
||||
public Guid Id { get; }
|
||||
|
||||
public List<IBeamShearAction> BeamShearActions {get;}
|
||||
public List<IBeamShearAction> BeamShearActions { get; } = new();
|
||||
|
||||
public List<ICalculator> Calculators { get; } = new();
|
||||
|
||||
@@ -44,5 +45,48 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteSection(IBeamShearSection section)
|
||||
{
|
||||
foreach (var calculator in Calculators)
|
||||
{
|
||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||
{
|
||||
if (beamShearCalculator.InputData.ShearSections.Contains(section))
|
||||
{
|
||||
beamShearCalculator.InputData.DeleteSection(section);
|
||||
beamShearCalculator.InputData.ShearSections.Remove(section);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void DeleteAction(IBeamShearAction action)
|
||||
{
|
||||
foreach (var calculator in Calculators)
|
||||
{
|
||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||
{
|
||||
if (beamShearCalculator.InputData.BeamShearActions.Contains(action))
|
||||
{
|
||||
beamShearCalculator.InputData.DeleteAction(action);
|
||||
beamShearCalculator.InputData.BeamShearActions.Remove(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void DeleteStirrup(IStirrup stirrup)
|
||||
{
|
||||
foreach (var calculator in Calculators)
|
||||
{
|
||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||
{
|
||||
if (beamShearCalculator.InputData.Stirrups.Contains(stirrup))
|
||||
{
|
||||
beamShearCalculator.InputData.DeleteStirrup(stirrup);
|
||||
beamShearCalculator.InputData.Stirrups.Remove(stirrup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user