Interpolation View for calculation result was added

This commit is contained in:
Evgeny Redikultsev
2023-01-08 14:11:16 +05:00
parent 2d7c8648ab
commit 401e3dd02b
52 changed files with 1428 additions and 61 deletions

View File

@@ -1,6 +1,7 @@
using StructureHelper.Infrastructure;
using StructureHelper.Models.Materials;
using StructureHelper.Services.Primitives;
using StructureHelper.Windows.AddMaterialWindow;
using StructureHelper.Windows.MainWindow;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Settings;
@@ -56,6 +57,29 @@ namespace StructureHelper.Windows.ViewModels.Materials
public ICommand DeleteMaterialCommand { get; set; }
public ICommand EditHeadMaterial;
private RelayCommand showSafetyfactors;
public RelayCommand ShowSafetyFactors
{
get
{
return showSafetyfactors ??
(
showSafetyfactors = new RelayCommand(o =>
{
if (selectedMaterial.HelperMaterial is ILibMaterial)
{
var material = selectedMaterial.HelperMaterial as ILibMaterial;
var wnd = new SafetyFactorsView(material.SafetyFactors);
wnd.ShowDialog();
OnPropertyChanged(nameof(Items));
}
}, o=> SelectedLibMaterial != null
));
}
}
private ICommand addElasticMaterialCommand;
public ObservableCollection<IHeadMaterial> HeadMaterials { get; private set; }
@@ -74,6 +98,19 @@ namespace StructureHelper.Windows.ViewModels.Materials
}
}
public ObservableCollection<IMaterialSafetyFactor> Items
{
get
{
if (selectedMaterial.HelperMaterial is ILibMaterial)
{
var material = selectedMaterial.HelperMaterial as ILibMaterial;
return new ObservableCollection<IMaterialSafetyFactor>(material.SafetyFactors);
}
else return null;
}
}
public string SelectedName
{
get => selectedMaterial.Name;