private void OKButton_Click(object sender, EventArgs e)
 {
     _city.ItemInProduction = _barValue; // TODO: correct selection
     _parent.Invalidate();
     _parent.Enabled = true;
     this.Visible    = false;
     this.Dispose();
 }
 // If OK is pressed --> rename city & close
 private void OKButton_Click(object sender, EventArgs e)
 {
     _city.Name = _renameTextBox.Text;
     _parent.Invalidate();
     _parent.DrawPanel.Invalidate();
     _parent.Enabled = true;
     this.Visible    = false;
     this.Dispose();
 }
Beispiel #3
0
        private void OKButton_Click(object sender, EventArgs e)
        {
            int cost = _city.ItemInProduction < 62 ? Game.Rules.UnitCost[_city.ItemInProduction] : Game.Rules.ImprovementCost[_city.ItemInProduction - 62 + 1];

            Game.ActiveCiv.Money -= 10 * cost - _city.ShieldsProgress;
            _city.ShieldsProgress = 10 * cost;
            _parent.Invalidate();
            _parent.Enabled = true;
            this.Visible    = false;
            this.Dispose();
        }