示例#1
0
        public Grid(IGrid grid, GridManager parent)
        {
            _parent = parent;
            _grid = grid;
            Cells = new ObservableCollection<Cell>(new Cell[Cell.Width * Cell.Width]);

            for (int x = 0; x < Cell.Width; x++)
            {
                for (int y = 0; y < Cell.Width; y++)
                {
                    var p = new Point(x, y);
                    Cells[p.Index] = new Cell(_grid[p], this, p);
                }
            }
        }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new GridManager();
 }