Четвертая лабораторная работа

This commit is contained in:
Катя Ихонкина 2022-11-04 19:50:01 +04:00
parent 274596e219
commit 3a2b3a5bb9
2 changed files with 0 additions and 38 deletions

View File

@ -12,9 +12,6 @@ namespace MotorBoat
{
public partial class FormMapWithSetBoats : Form
{
/// <summary>
/// Объект от класса карты с набором объектов
/// </summary>
private MapWithSetBoatsGeneric<DrawningObjectBoat, AbstractMap> _mapShipCollectionGeneric;
private readonly Dictionary<string, AbstractMap> _mapDict = new()
{
@ -23,9 +20,6 @@ namespace MotorBoat
{"Морская карта",new SeaMap() }
};
private readonly MapsCollection _mapsCollection;
/// <summary>
/// Конструктор
/// </summary>
public FormMapWithSetBoats()
{
InitializeComponent();
@ -84,17 +78,6 @@ namespace MotorBoat
_mapShipCollectionGeneric = null;
}
}
/// <summary>
/// Выбор карты
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <summary>
/// Добавление объекта
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonAddBoat_Click(object sender, EventArgs e)
{
if (ListBoxMaps.SelectedIndex == -1)
@ -119,11 +102,6 @@ namespace MotorBoat
}
}
/// <summary>
/// Удаление объекта
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonRemoveBoat_Click(object sender, EventArgs e)
{
if (ListBoxMaps.SelectedIndex == -1)
@ -149,11 +127,6 @@ namespace MotorBoat
MessageBox.Show("Не удалось удалить объект");
}
}
/// <summary>
/// Вывод набора
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonShowStorage_Click(object sender, EventArgs e)
{
if (ListBoxMaps.SelectedIndex == -1)
@ -162,11 +135,6 @@ namespace MotorBoat
}
pictureBox.Image = _mapsCollection[ListBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
}
/// <summary>
/// Вывод карты
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonShowOnMap_Click(object sender, EventArgs e)
{
if (ListBoxMaps.SelectedIndex == -1)
@ -175,11 +143,6 @@ namespace MotorBoat
}
pictureBox.Image = _mapsCollection[ListBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowOnMap();
}
/// <summary>
/// Перемещение
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonMove_Click(object sender, EventArgs e)
{
if (ListBoxMaps.SelectedIndex == -1)

View File

@ -8,7 +8,6 @@ namespace MotorBoat
{
internal class MapsCollection
{
readonly Dictionary<string, MapWithSetBoatsGeneric<DrawningObjectBoat, AbstractMap>> _mapStorages;
public List<string> Keys => _mapStorages.Keys.ToList();
private readonly int _pictureWidth;