예제 #1
0
 private void ShapeCell_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == ShapeCellViewModel.ShapeCellValuePropertyName)
     {
         ShapeCellViewModel _shapeCell = (ShapeCellViewModel)sender;
         this.SetCell(_shapeCell);
         this.FHandled = false;
     }
 }
예제 #2
0
        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;
            }
        }