PIbd-11 Valiulov I.A. LabWork03 Simple #3
@ -23,7 +23,7 @@ public abstract class AbstractCompany
|
||||
/// <summary>
|
||||
/// Коллекция судов
|
||||
/// </summary>
|
||||
public ICollectionGenericObjects<DrawningShip>? _collection = null;
|
||||
protected ICollectionGenericObjects<DrawningShip>? _collection = null;
|
||||
/// <summary>
|
||||
/// Вычисление максимального количества элементов, который можно разместить в окне
|
||||
/// </summary>
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user