Mochalov D.V Lab_work1 #1

Merged
eegov merged 4 commits from LabWork01 into master 2022-09-30 09:21:34 +04:00
Showing only changes of commit 4f70dc343c - Show all commits

View File

@ -101,9 +101,9 @@ namespace Locomotive
//тело
g.DrawRectangle(pen, _startPosX , _startPosY, _locomotiveWidth - 10, _locomotiveHeight - 10);
//окна
g.FillRectangle(new SolidBrush(Locomotive?.BodyColor ?? Color.Black), _startPosX + 10, _startPosY + 10, 10, 10);
g.FillRectangle(new SolidBrush(Locomotive?.BodyColor ?? Color.Black), _startPosX + 30, _startPosY + 10, 10, 10);
g.FillRectangle(new SolidBrush(Locomotive?.BodyColor ?? Color.Black), _startPosX + 80, _startPosY + 10, 10, 10);
g.DrawRectangle(pen, _startPosX + 10, _startPosY + 10, 10, 10);
g.DrawRectangle(pen, _startPosX + 30, _startPosY + 10, 10, 10);
g.DrawRectangle(pen, _startPosX + 80, _startPosY + 10, 10, 10);
//дверь
g.DrawRectangle(pen, _startPosX + 50, _startPosY + 10, 10, 20);
//колеса
@ -112,7 +112,7 @@ namespace Locomotive
g.DrawEllipse(pen, _startPosX + 70, _startPosY + 40, 10, 10);
g.DrawEllipse(pen, _startPosX + 90, _startPosY + 40, 10, 10);
//черный прямоугольник
g.FillRectangle(new SolidBrush(Locomotive?.BodyColor ?? Color.Black), _startPosX + 100, _startPosY + 10, 10, 30);
g.FillRectangle(new SolidBrush(Color.Black), _startPosX + 100, _startPosY + 10, 10, 30);
}
public void ChangeBorders(int width, int height)