From 910d16250b93831418b01d5481fa52e6d54ffe3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=9F=D1=83=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD?= Date: Sun, 30 Oct 2022 21:34:56 +0400 Subject: [PATCH] fix --- AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs | 2 +- .../AirplaneWithRadar/DrawningAirplanePortholes.cs | 6 +----- .../AirplaneWithRadar/FormAirplane.Designer.cs | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) 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 //