private void OnAddMaterialType() { var materialTypeTile = new MaterialTypeTileViewModel(this); materialTypeTile.OnSwitchView(true); MaterialTypes.Add(materialTypeTile); }
public void AddMaterial(MaterialType materialType) { if (materialType == null) { throw new ArgumentNullException(nameof(materialType)); } if (MaterialTypes.ContainsKey(materialType.Code)) { throw new ArgumentException("Material type already known"); } MaterialTypes.Add(materialType.Code, materialType); }