Ejemplo n.º 1
0
        private void OnAddMaterialType()
        {
            var materialTypeTile = new MaterialTypeTileViewModel(this);

            materialTypeTile.OnSwitchView(true);
            MaterialTypes.Add(materialTypeTile);
        }
Ejemplo n.º 2
0
        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);
        }