private void ShapeCell_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == ShapeCellViewModel.ShapeCellValuePropertyName) { ShapeCellViewModel _shapeCell = (ShapeCellViewModel)sender; this.SetCell(_shapeCell); this.FHandled = false; } }
private void SetCell(ShapeCellViewModel aShapeCell) { int _cellValue = aShapeCell.ShapeCellValue; this.FHandled = true; for (int k = 0; k < this.FHeight; k++) { bool _layerCellValue = (_cellValue & 1 << k) > 0; this.FCells[aShapeCell.X, aShapeCell.Y, k].LayerCellValue = _layerCellValue; } }