PIBD-14_Khalikova.A.R_Stormtrooper_LabWork03_Simple #3

Closed
Adelina wants to merge 3 commits from LabWork03 into LabWork02
3 changed files with 14 additions and 6 deletions
Showing only changes of commit d5bbf33284 - Show all commits

View File

@ -2,7 +2,7 @@
namespace ProjectStormtrooper.CollectionGenericObjects;
/// <summary>
/// Абстракция компании, хранящий коллекцию бомбардировщиков
/// Абстракция компании, хранящий коллекцию штурмовика
/// </summary>
public abstract class AbstractCompany
{
@ -35,7 +35,7 @@ public abstract class AbstractCompany
/// </summary>
/// <param name="picWidth">Ширина окна</param>
/// <param name="picHeight">Высота окна</param>
/// <param name="collection">Коллекция бомбардировщиков</param>
/// <param name="collection">Коллекция штурмовика</param>
public AbstractCompany(int picWidth, int picHeight, ICollectionGenericObjects<DrawningStormtrooperBase> collection)
{
_pictureWidth = picWidth;

View File

@ -6,13 +6,19 @@ using System.Text;
using System.Threading.Tasks;
namespace ProjectStormtrooper.CollectionGenericObjects;
/// <summary>
/// Реализация абстрактной компании
/// </summary>
public class StormtrooperSharingService : AbstractCompany
{
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)
{
int width = _pictureWidth / _placeSizeWidth;
@ -27,7 +33,9 @@ public class StormtrooperSharingService : AbstractCompany
}
}
}
/// <summary>
/// Расстановка объектов
/// </summary>
protected override void SetObjectsPosition()
{
int width = _pictureWidth / _placeSizeWidth;

View File

@ -60,8 +60,8 @@ public partial class FormStormtrooperCollection : Form
{
case nameof(DrawingStormtrooper):
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)),
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
GetColor(random),
GetColor(random),
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
break;
case nameof(DrawningStormtrooperBase):