Beispiel #1
0
        /// <summary>
        /// Handles the event of any of the directional buttons being pressed.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DirButtonClick(object sender, System.EventArgs e)
        {
            buttonArray[MapManager.GetCurrentRowNum, MapManager.GetCurrentColNum].BackgroundImage = null;
            Button button = sender as Button;
            var    a      = MapManager.BlockedCellFinder(sender);

            if (a.IsBlocked == true)// REQ: if statement
            {
                buttonArray[(int)a.Row, (int)a.Column].BackgroundImage = Properties.Resources.X;
            }
            RefreshDisplay();
        }