Headmaterial was repaired

This commit is contained in:
Evgeny Redikultsev
2022-11-11 21:29:24 +05:00
parent 1d7a97f4fd
commit ba609091aa
26 changed files with 165 additions and 187 deletions

View File

@@ -6,6 +6,8 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Services.ColorServices;
using StructureHelperLogics.Models.Materials;
@@ -13,17 +15,22 @@ namespace StructureHelper.Models.Materials
{
public class HeadMaterial : IHeadMaterial
{
public string Id { get; }
public string Name { get; set; }
public Color Color { get; set; }
public IHelperMaterial HelperMaterial {get; set;}
//public MaterialDefinitionBase Material { get; set; }
public HeadMaterial()
{
Id = Convert.ToString(Guid.NewGuid());
Color = ColorProcessor.GetRandomColor();
}
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
{
return HelperMaterial.GetLoaderMaterial(limitState, calcTerm);
}
public object Clone()
{
IHeadMaterial material = new HeadMaterial
@@ -34,5 +41,6 @@ namespace StructureHelper.Models.Materials
};
return material;
}
}
}