исправление ошибок
This commit is contained in:
parent
ebc44e92dc
commit
9ab984f93d
@ -89,6 +89,7 @@
|
||||
this.listBoxMaps.Name = "listBoxMaps";
|
||||
this.listBoxMaps.Size = new System.Drawing.Size(199, 104);
|
||||
this.listBoxMaps.TabIndex = 4;
|
||||
this.listBoxMaps.SelectedIndexChanged += new System.EventHandler(this.ListBoxMaps_SelectedIndexChanged);
|
||||
//
|
||||
// buttonAddMap
|
||||
//
|
||||
@ -113,6 +114,8 @@
|
||||
this.comboBoxSelectorMap.Name = "comboBoxSelectorMap";
|
||||
this.comboBoxSelectorMap.Size = new System.Drawing.Size(200, 28);
|
||||
this.comboBoxSelectorMap.TabIndex = 0;
|
||||
this.comboBoxSelectorMap.SelectedIndexChanged += new System.EventHandler(this.ComboBoxSelectorMap_SelectedIndexChanged);
|
||||
|
||||
//
|
||||
// textBoxNewMapName
|
||||
//
|
||||
|
@ -59,6 +59,29 @@ namespace HoistingCrane
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user