From 811e02b7bd2a5f18c0c38dff55ff400cda48cc9a Mon Sep 17 00:00:00 2001 From: AnnaLioness Date: Fri, 20 Oct 2023 17:22:41 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lab1ContainersShip/Lab1ContainersShip/DrawingShip.cs | 3 +-- Lab1ContainersShip/Lab1ContainersShip/EntityShip.cs | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Lab1ContainersShip/Lab1ContainersShip/DrawingShip.cs b/Lab1ContainersShip/Lab1ContainersShip/DrawingShip.cs index 3eec57f..aa1e6b8 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/DrawingShip.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/DrawingShip.cs @@ -149,8 +149,7 @@ namespace Lab1ContainersShip.DrawingObjects return; } Pen pen = new Pen(Color.Black); - //Brush adbrush = new SolidBrush(EntityShip.AdditionalColor); - Brush brBlue = new SolidBrush(Color.Blue); + Brush brBody = new SolidBrush(EntityShip.BodyColor); // заполнение борта g.FillPolygon(brBody, new PointF[] diff --git a/Lab1ContainersShip/Lab1ContainersShip/EntityShip.cs b/Lab1ContainersShip/Lab1ContainersShip/EntityShip.cs index c3cc52e..1410765 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/EntityShip.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/EntityShip.cs @@ -24,17 +24,16 @@ namespace Lab1ContainersShip.Entities /// /// Дополнительный цвет (для опциональных элементов) /// - //public Color AdditionalColor { get; private set; } - + /// /// Признак (опция) наличия крана /// - //public bool Crane { get; private set; } + /// /// Признак (опция) наличия контейнеров /// - //public bool Conteiners { get; private set; } + public double Step => (double)Speed * 100 / Weight; public EntityShip(int speed, double weight, Color bodyColor) {