Beispiel #1
0
        /// <summary>
        /// Enforces the selected location (if it exists) to become "location2" (used as the ending node)
        /// </summary>
        private void btnSetLocation2_Click(object sender, EventArgs e)
        {
            if (_location2 != null)
            {
                _location2.ResetSpace();
            }

            if (_selectedGridSquare != null)
            {
                _location2 = _selectedGridSquare;
                _selectedGridSquare.BackColor = Color.Red;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Enforces the selected location (if it exists) to become "location1" (used as the starting node)
        /// </summary>
        private void btnSetLocation1_Click(object sender, EventArgs e)
        {
            if (_location1 != null)
            {
                _location1.ResetSpace();
            }

            if (_selectedGridSquare != null)
            {
                _selectedGridSquare.BackColor = Color.Blue;
                _location1 = _selectedGridSquare;
            }
        }