Лабараторная работа №3 3

This commit is contained in:
IlyasValiulov 2024-03-08 15:05:41 +04:00
parent 0c3397fcee
commit 1460d8e2a0
3 changed files with 1 additions and 5 deletions

View File

@ -23,7 +23,7 @@ public abstract class AbstractCompany
/// <summary>
/// Коллекция судов
/// </summary>
public ICollectionGenericObjects<DrawningShip>? _collection = null;
protected ICollectionGenericObjects<DrawningShip>? _collection = null;
/// <summary>
/// Вычисление максимального количества элементов, который можно разместить в окне
/// </summary>

View File

@ -8,7 +8,6 @@ public class ShipPortService : AbstractCompany
public ShipPortService(int picWidth, int picHeight, ICollectionGenericObjects<DrawningShip> collection) : base(picWidth, picHeight, collection)
{
}
protected override void DrawBackgound(Graphics g)
{
//рисуем пристань
@ -23,7 +22,6 @@ public class ShipPortService : AbstractCompany
}
}
}
protected override void SetObjectsPosition()
{
int width = _pictureWidth / _placeSizeWidth;

View File

@ -67,12 +67,10 @@ public partial class FormShipCollection : Form
{
CreateObject(nameof(DrawningShip));
}
private void buttonAddWarmlyShip_Click(object sender, EventArgs e)
{
CreateObject(nameof(DrawningWarmlyShip));
}
private void buttonRemoveShip_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(maskedTextBox.Text) || _company == null)