Добавила недостающие комментарии
This commit is contained in:
parent
14d621ebb7
commit
d5bbf33284
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace ProjectStormtrooper.CollectionGenericObjects;
|
namespace ProjectStormtrooper.CollectionGenericObjects;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Абстракция компании, хранящий коллекцию бомбардировщиков
|
/// Абстракция компании, хранящий коллекцию штурмовика
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class AbstractCompany
|
public abstract class AbstractCompany
|
||||||
{
|
{
|
||||||
@ -35,7 +35,7 @@ public abstract class AbstractCompany
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="picWidth">Ширина окна</param>
|
/// <param name="picWidth">Ширина окна</param>
|
||||||
/// <param name="picHeight">Высота окна</param>
|
/// <param name="picHeight">Высота окна</param>
|
||||||
/// <param name="collection">Коллекция бомбардировщиков</param>
|
/// <param name="collection">Коллекция штурмовика</param>
|
||||||
public AbstractCompany(int picWidth, int picHeight, ICollectionGenericObjects<DrawningStormtrooperBase> collection)
|
public AbstractCompany(int picWidth, int picHeight, ICollectionGenericObjects<DrawningStormtrooperBase> collection)
|
||||||
{
|
{
|
||||||
_pictureWidth = picWidth;
|
_pictureWidth = picWidth;
|
||||||
|
@ -6,13 +6,19 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace ProjectStormtrooper.CollectionGenericObjects;
|
namespace ProjectStormtrooper.CollectionGenericObjects;
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация абстрактной компании
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
public class StormtrooperSharingService : AbstractCompany
|
public class StormtrooperSharingService : AbstractCompany
|
||||||
{
|
{
|
||||||
public StormtrooperSharingService(int picWidth, int picHeight, ICollectionGenericObjects<DrawningStormtrooperBase> collection) : base(picWidth, picHeight, collection)
|
public StormtrooperSharingService(int picWidth, int picHeight, ICollectionGenericObjects<DrawningStormtrooperBase> collection) : base(picWidth, picHeight, collection)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Вывод заднего фона
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g"></param>
|
||||||
protected override void DrawBackgound(Graphics g)
|
protected override void DrawBackgound(Graphics g)
|
||||||
{
|
{
|
||||||
int width = _pictureWidth / _placeSizeWidth;
|
int width = _pictureWidth / _placeSizeWidth;
|
||||||
@ -27,7 +33,9 @@ public class StormtrooperSharingService : AbstractCompany
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Расстановка объектов
|
||||||
|
/// </summary>
|
||||||
protected override void SetObjectsPosition()
|
protected override void SetObjectsPosition()
|
||||||
{
|
{
|
||||||
int width = _pictureWidth / _placeSizeWidth;
|
int width = _pictureWidth / _placeSizeWidth;
|
||||||
|
@ -60,8 +60,8 @@ public partial class FormStormtrooperCollection : Form
|
|||||||
{
|
{
|
||||||
case nameof(DrawingStormtrooper):
|
case nameof(DrawingStormtrooper):
|
||||||
drawningStormtrooperBase = new DrawingStormtrooper(random.Next(100, 300), random.Next(1000, 3000),
|
drawningStormtrooperBase = new DrawingStormtrooper(random.Next(100, 300), random.Next(1000, 3000),
|
||||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
GetColor(random),
|
||||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
GetColor(random),
|
||||||
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
|
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
|
||||||
break;
|
break;
|
||||||
case nameof(DrawningStormtrooperBase):
|
case nameof(DrawningStormtrooperBase):
|
||||||
|
Loading…
Reference in New Issue
Block a user