Add cross-section convert strategies

This commit is contained in:
Evgeny Redikultsev
2024-09-28 20:46:42 +05:00
parent c10d6eb94e
commit 58b6e0eb8b
89 changed files with 1204 additions and 174 deletions

View File

@@ -16,6 +16,7 @@ namespace StructureHelper.Models.Materials
{
public class HeadMaterial : IHeadMaterial, INotifyPropertyChanged
{
private HeadMaterialUpdateStrategy updateStrategy = new HeadMaterialUpdateStrategy();
private Color color;
public Guid Id { get; }
@@ -31,6 +32,7 @@ namespace StructureHelper.Models.Materials
}
public IHelperMaterial HelperMaterial {get; set;}
public HeadMaterial(Guid id)
{
Id = id;
@@ -51,8 +53,7 @@ namespace StructureHelper.Models.Materials
public object Clone()
{
var newItem = new HeadMaterial();
newItem.HelperMaterial = this.HelperMaterial.Clone() as IHelperMaterial;
var updateStrategy = new MaterialUpdateStrategy();
newItem.HelperMaterial = HelperMaterial.Clone() as IHelperMaterial;
updateStrategy.Update(newItem, this);
return newItem;
}