LinePrimitive and RectanglePrimitive was added
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace StructureHelper.Windows.ViewModels.PrimitiveTemplates.RCs
|
||||
{
|
||||
public IRectangleBeamTemplate Model;
|
||||
|
||||
private Rectangle rectangle => (Model.Shape as Rectangle);
|
||||
private RectangleShape rectangle => (Model.Shape as RectangleShape);
|
||||
|
||||
public Window ParentWindow { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user