2022-11-24 02:08:47 +04:00

38 lines
974 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Airbus
{
internal class DrawningPorthole : IPorthole
{
private CountPorthole _countpornhole;
public int CountPorthole
{
get => (int)_countpornhole;
set
{
_countpornhole = (CountPorthole)value;
}
}
public void DrawPortholes(Graphics g, Color color, float posX, float posY)
{
for (int i = 0; i < (int)CountPorthole / 2; i++)
{
DrawPorthole(g, color, posX + 125 - i * 7, posY + 30);
DrawPorthole(g, color, posX + 125 - i * 7, posY + 40);
}
}
protected virtual void DrawPorthole(Graphics g, Color color, float posX, float posY)
{
g.DrawEllipse(new(color, 1), posX, posY, 5, 5);
}
}
}