исправления
This commit is contained in:
parent
069691bec5
commit
666c51d70b
@ -121,7 +121,6 @@
|
|||||||
this.comboBoxSelectorMap.Name = "comboBoxSelectorMap";
|
this.comboBoxSelectorMap.Name = "comboBoxSelectorMap";
|
||||||
this.comboBoxSelectorMap.Size = new System.Drawing.Size(200, 28);
|
this.comboBoxSelectorMap.Size = new System.Drawing.Size(200, 28);
|
||||||
this.comboBoxSelectorMap.TabIndex = 0;
|
this.comboBoxSelectorMap.TabIndex = 0;
|
||||||
this.comboBoxSelectorMap.SelectedIndexChanged += new System.EventHandler(this.ComboBoxSelectorMap_SelectedIndexChanged);
|
|
||||||
//
|
//
|
||||||
// textBoxNewMapName
|
// textBoxNewMapName
|
||||||
//
|
//
|
||||||
|
@ -29,7 +29,6 @@ namespace HoistingCrane
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
private readonly MapsCollection _mapsCollection;
|
private readonly MapsCollection _mapsCollection;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
private MapWithSetHoistingCraneGeneric<DrawingObjectHoistingCrane, AbstractMap> _mapHoistingCraneCollectionGeneric;
|
|
||||||
public FormMapWithSetHoistingCrane(ILogger<FormMapWithSetHoistingCrane> logger)
|
public FormMapWithSetHoistingCrane(ILogger<FormMapWithSetHoistingCrane> logger)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -63,29 +62,6 @@ namespace HoistingCrane
|
|||||||
listBoxMaps.SelectedIndex = index;
|
listBoxMaps.SelectedIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void ComboBoxSelectorMap_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
AbstractMap map = null;
|
|
||||||
switch (comboBoxSelectorMap.Text)
|
|
||||||
{
|
|
||||||
case "Простая карта":
|
|
||||||
map = new SimpleMap();
|
|
||||||
break;
|
|
||||||
case "Вторая карта":
|
|
||||||
map = new SecondMap();
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (map != null)
|
|
||||||
{
|
|
||||||
_mapHoistingCraneCollectionGeneric = new MapWithSetHoistingCraneGeneric<DrawingObjectHoistingCrane, AbstractMap>(
|
|
||||||
pictureBox.Width, pictureBox.Height, map);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_mapHoistingCraneCollectionGeneric = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Добавление карты
|
/// Добавление карты
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -245,7 +221,7 @@ namespace HoistingCrane
|
|||||||
enums = Direction.Right;
|
enums = Direction.Right;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pictureBox.Image = _mapHoistingCraneCollectionGeneric.MoveObject(enums);
|
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].MoveObject(enums);
|
||||||
}
|
}
|
||||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user