From 2211d27fc78d53ef0f6d9f369b3a5fc0beb0ae82 Mon Sep 17 00:00:00 2001 From: "yuliya.mavrina@internet.ru" Date: Fri, 6 Oct 2023 17:29:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=E2=84=961?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DoubleDeckerBus/DoubleDeckerBus/DirectionBus.cs | 2 +- .../DoubleDeckerBus/DoubleDeckerBus.Designer.cs | 1 + DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.cs | 8 +++++--- DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs | 2 -- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/DoubleDeckerBus/DoubleDeckerBus/DirectionBus.cs b/DoubleDeckerBus/DoubleDeckerBus/DirectionBus.cs index 0ec093a..07db3c8 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/DirectionBus.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/DirectionBus.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace DoubleDeckerBus { - internal enum DirectionBus + public enum DirectionBus { None = 0, Up = 1, diff --git a/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.Designer.cs b/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.Designer.cs index f5ce44d..802179b 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.Designer.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.Designer.cs @@ -46,6 +46,7 @@ pictureBoxBus.SizeMode = PictureBoxSizeMode.AutoSize; pictureBoxBus.TabIndex = 0; pictureBoxBus.TabStop = false; + pictureBoxBus.Click += pictureBoxBus_Click; // // buttonCreate // diff --git a/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.cs b/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.cs index c5f235b..1605bdc 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/DoubleDeckerBus.cs @@ -13,8 +13,7 @@ namespace DoubleDeckerBus { return; } - Bitmap bmp = new(pictureBoxBus.Width, - pictureBoxBus.Height); + Bitmap bmp = new(pictureBoxBus.Width, pictureBoxBus.Height); Graphics gr = Graphics.FromImage(bmp); _drawningBus.DrawTransport(gr); pictureBoxBus.Image = bmp; @@ -52,6 +51,9 @@ random.Next(0, 256)), pictureBoxBus.Width, pictureBoxBus.Height); Draw(); } - + private void pictureBoxBus_Click(object sender, EventArgs e) + { + + } } } \ No newline at end of file diff --git a/DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs b/DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs index 7571c88..9492405 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs @@ -31,8 +31,6 @@ namespace DoubleDeckerBus } _startPosX = x; _startPosY = y; - _pictureWidth = width; - _pictureHeight = height; } public void MoveTransport(DirectionBus direction) {