예제 #1
0
        private void _goToCityButton_Click(object sender, System.EventArgs e)
        {
            frmCityDetails cityWindow;

            cityWindow = new frmCityDetails(_city);

            cityWindow.ShowDialog(this.Owner);
            this.Close();
        }
예제 #2
0
        private void _gameWindow_DoubleClick(object sender, System.EventArgs e)
        {
            GridCell gridCell;
            Point    absolute;
            Point    relative;

            absolute = Cursor.Position;
            relative = _gameWindow.PointToClient(absolute);
            gridCell = _gameWindow.UnTranslate(relative);
            if (gridCell == null)
            {
                return;
            }

            if (gridCell.City != null)
            {
                frmCityDetails cityDetailWindow;

                cityDetailWindow = new frmCityDetails(gridCell.City);
                cityDetailWindow.ShowDialog(this);
            }
        }