ISEbd-22. Baygulov A.A. Lab work 1 (hard) #4

Closed
tellsense wants to merge 7 commits from laba1_H into main
Showing only changes of commit f433aaf59b - Show all commits

View File

@ -12,7 +12,7 @@ namespace ProjectElectricLocomotive
private Wheels amount;
public void SetAmount(int a)
Review

Требовалось сделать свойство числовое

Требовалось сделать свойство числовое
{
if (a == 2)
if (a <= 2)
{
amount = Wheels.Two;
}
@ -20,7 +20,7 @@ namespace ProjectElectricLocomotive
{
amount = Wheels.Three;
}
else if (a == 4)
else if (a >= 4)
{
amount = Wheels.Four;
}
@ -30,7 +30,7 @@ namespace ProjectElectricLocomotive
Brush wheelsColor = new SolidBrush(Color.Black);
if (amount == Wheels.Two)
g.FillEllipse(wheelsColor, _startPosX + 90, _startPosY + 45, 10, 10);
g.FillEllipse(wheelsColor, _startPosX + 100, _startPosY + 45, 10, 10);
g.FillEllipse(wheelsColor, _startPosX + 140, _startPosY + 45, 10, 10);
if (amount == Wheels.Three)
{