示例#1
0
        public Main()
        {
            InitializeComponent();

            SetPictureBoxWidth();

            map           = new Map(rows, columns);
            mapPathFinder = new MapPathfinder(map);

            SetControlState(false);
        }
示例#2
0
        private void BtnReset_Click(object sender, EventArgs e)
        {
            columns = int.Parse(txtColumns.Text);
            rows    = columns;

            SetPictureBoxWidth();

            map           = new Map(rows, columns);
            mapPathFinder = new MapPathfinder(map);

            // redraw the grid
            pictureBox.Invalidate();
        }