Exemple #1
0
        private void CellMouseDown(object sender, CellMouseDownEventArgs e)
        {
            if (rdoWall.Checked)
            {
                _map[e.Location.X, e.Location.Y] = !_map[e.Location.X, e.Location.Y];

                if (_map[e.Location.X, e.Location.Y])
                {
                    ctlMap.ClearCell(e.Location);
                }
                else
                {
                    ctlMap.SetCell(e.Location, Color.Gray);
                }
            }
            else if (rdoGoal.Checked)
            {
                ctlMap.Goal = e.Location;
                _goal       = e.Location;
            }
            else if (rdoStart.Checked)
            {
                ctlMap.Start = e.Location;
                _start       = e.Location;
            }
        }
Exemple #2
0
 private void OnCellMouseDown(CellMouseDownEventArgs e)
 {
     CellMouseDown?.Invoke(this, e);
 }