Library material was added

This commit is contained in:
Evgeny Redikultsev
2022-11-06 18:55:01 +05:00
parent 1cf54603bc
commit 5d19958fd7
52 changed files with 1018 additions and 171 deletions

View File

@@ -1,6 +1,7 @@
using StructureHelper.Infrastructure.Enums;
using StructureHelper.Infrastructure.UI.DataContexts;
using StructureHelper.Windows.ViewModels.PrimitiveProperties;
using StructureHelperLogics.Models.Materials;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -27,10 +28,10 @@ namespace StructureHelper.Windows.PrimitiveProperiesWindow
{
PrimitiveBase primitive;
private PrimitivePropertiesViewModel viewModel;
public PrimitiveProperties(PrimitiveBase primitive)
public PrimitiveProperties(PrimitiveBase primitive, IHeadMaterialRepository materialRepository)
{
this.primitive = primitive;
viewModel = new PrimitivePropertiesViewModel(this.primitive);
viewModel = new PrimitivePropertiesViewModel(this.primitive, materialRepository);
this.DataContext = viewModel;
InitializeComponent();
if (primitive is Rectangle) { AddPrimitiveProperties(PrimitiveType.Rectangle); }
@@ -60,10 +61,5 @@ namespace StructureHelper.Windows.PrimitiveProperiesWindow
StpProperties.Children.Add(contentControl);
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
viewModel.EditColor();
}
}
}