Лабораторная №1

This commit is contained in:
yuliya.mavrina@internet.ru 2023-10-06 17:29:04 +03:00
parent 8730380d16
commit 2211d27fc7
4 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace DoubleDeckerBus
{
internal enum DirectionBus
public enum DirectionBus
{
None = 0,
Up = 1,

View File

@ -46,6 +46,7 @@
pictureBoxBus.SizeMode = PictureBoxSizeMode.AutoSize;
pictureBoxBus.TabIndex = 0;
pictureBoxBus.TabStop = false;
pictureBoxBus.Click += pictureBoxBus_Click;
//
// buttonCreate
//

View File

@ -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)
{
}
}
}

View File

@ -31,8 +31,6 @@ namespace DoubleDeckerBus
}
_startPosX = x;
_startPosY = y;
_pictureWidth = width;
_pictureHeight = height;
}
public void MoveTransport(DirectionBus direction)
{