LinePrimitive and RectanglePrimitive was added

This commit is contained in:
Evgeny Redikultsev
2022-11-19 21:12:55 +05:00
parent 667b91cbfa
commit b566373f16
37 changed files with 544 additions and 69 deletions

View File

@@ -27,11 +27,33 @@ namespace StructureHelper.Windows.ViewModels.Materials
ILibMaterial selectedLibMaterial;
public ICommand AddNewMaterialCommand { get; set; }
public ICommand AddElasticMaterialCommand
{
get
{
return addElasticMaterialCommand ??
(
addElasticMaterialCommand = new RelayCommand(o => AddElasticMaterial())
);
}
}
private void AddElasticMaterial()
{
IHeadMaterial material = new HeadMaterial() { Name = "New elastic material" };
material.HelperMaterial = new ElasticMaterial() { Modulus = 2e11d, CompressiveStrength = 4e8d, TensileStrength = 4e8d };
HeadMaterials.Add(material);
materialRepository.HeadMaterials.Add(material);
SelectedMaterial = material;
}
public ICommand CopyHeadMaterialCommand { get; set; }
public ICommand EditColorCommand { get; set; }
public ICommand DeleteMaterialCommand { get; set; }
public ICommand EditHeadMaterial;
private ICommand addElasticMaterialCommand;
public ObservableCollection<IHeadMaterial> HeadMaterials { get; private set; }
public IHeadMaterial SelectedMaterial
{
@@ -104,7 +126,6 @@ namespace StructureHelper.Windows.ViewModels.Materials
HeadMaterials.Add(material);
materialRepository.HeadMaterials.Add(material);
SelectedMaterial = material;
}
private void DeleteMaterial()