void Initialize(CellBoard cellBoard)
 {
     Cells = TwoDimensionalArrayExtension.Create<CellView>(cellBoard.ActualCells.Size());
     cellBoard.ActualCells.ForEach((point, cell) => {
         var cellView = new CellView { Point = point, DataContext = cell };
         cellView.IndexChanged += OnCellViewIndexChanged;
         Cells.Set(point, cellView);
     });
 }
Exemple #2
0
 void Initialize(CellBoard cellBoard)
 {
     Cells = TwoDimensionalArrayExtension.Create <CellView>(cellBoard.ActualCells.Size());
     cellBoard.ActualCells.ForEach((point, cell) => {
         var cellView = new CellView {
             Point = point, DataContext = cell
         };
         cellView.IndexChanged += OnCellViewIndexChanged;
         Cells.Set(point, cellView);
     });
 }
Exemple #3
0
 void OnCellViewIndexChanged(CellView cellView)
 {
     using (var graphics = CreateGraphics()) {
         cellView.Paint(graphics);
     }
 }
 void OnCellViewIndexChanged(CellView cellView)
 {
     using (var graphics = CreateGraphics()) {
         cellView.Paint(graphics);
     }
 }