ISEbd-22. Baygulov A.A. Lab work 1 (hard) #4
@ -12,7 +12,7 @@ namespace ProjectElectricLocomotive
|
||||
private Wheels amount;
|
||||
public void SetAmount(int a)
|
||||
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user
Требовалось сделать свойство числовое