private void BtnSell_Click(object sender, EventArgs e) { if (plane.Own == Plane.Owns.Rented || plane.Own == Plane.Owns.Leased) { MessageBox.Show("Нельзя продать арендованный самолет."); return; } if (plane.status == "В полёте") { MessageBox.Show("Самолет в полете."); return; } double currentSavings = Convert.ToDouble(lblPriceValue.Text.Replace("$", "")); planes.Remove(plane); game.SellPlane(currentSavings); }