diff --git a/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs b/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs index 3d6df27..ebfa28c 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs @@ -46,7 +46,7 @@ namespace AirplaneWithRadar Airplane = new EntityAirplane(); Airplane.Init(speed, weight, bodyColor); DrawningPortholes = new(); - DrawningPortholes.CountPortholes = 30; + DrawningPortholes.CountPortholes = 10; } /// /// Установка позиции diff --git a/AirplaneWithRadar/AirplaneWithRadar/DrawningAirplanePortholes.cs b/AirplaneWithRadar/AirplaneWithRadar/DrawningAirplanePortholes.cs index f67964c..2c94173 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/DrawningAirplanePortholes.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/DrawningAirplanePortholes.cs @@ -12,10 +12,6 @@ namespace AirplaneWithRadar public int CountPortholes { - get - { - return (int)_countPortholes; - } set { _countPortholes = (CountPortholes)(value); @@ -28,7 +24,7 @@ namespace AirplaneWithRadar DrawPorthole(g, middle, _startPosY); int left = middle - 5; int right = middle + 5; - for (var i = 1; i <= CountPortholes / 4; i += 1) + for (var i = 1; i <= (int)_countPortholes / 4; i += 1) { DrawPorthole(g, left, _startPosY); left -= 5; diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormAirplane.Designer.cs b/AirplaneWithRadar/AirplaneWithRadar/FormAirplane.Designer.cs index 387adce..d8cf5c7 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormAirplane.Designer.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/FormAirplane.Designer.cs @@ -164,6 +164,7 @@ this.comboBoxPortholes.Name = "comboBoxPortholes"; this.comboBoxPortholes.Size = new System.Drawing.Size(44, 23); this.comboBoxPortholes.TabIndex = 8; + this.comboBoxPortholes.Text = "10"; // // FormAirplane //