Markov D.P. LabWork03 #6
@ -14,12 +14,12 @@ namespace ContainerShip
|
||||
{
|
||||
|
||||
private MapWithSetShipGeneric<DrawingObjectShip, AbstractMap> _mapShipCollectionGeneric;
|
||||
public bool onMap;
|
||||
|
||||
|
||||
public FormMapWithSetShip()
|
||||
{
|
||||
InitializeComponent();
|
||||
onMap = false;
|
||||
|
||||
}
|
||||
|
||||
private void ComboBoxSelectorMap_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@ -100,25 +100,23 @@ namespace ContainerShip
|
||||
return;
|
||||
}
|
||||
pictureBox.Image = _mapShipCollectionGeneric.ShowSet();
|
||||
onMap = false;
|
||||
|
||||
}
|
||||
|
||||
private void ButtonShowOnMap_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_mapShipCollectionGeneric == null)
|
||||
{
|
||||
onMap = false;
|
||||
{
|
||||
return;
|
||||
}
|
||||
pictureBox.Image = _mapShipCollectionGeneric.ShowOnMap();
|
||||
onMap = true;
|
||||
|
||||
}
|
||||
|
||||
private void ButtonMove_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_mapShipCollectionGeneric == null || !onMap)
|
||||
if (_mapShipCollectionGeneric == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
//получаем имя кнопки
|
||||
|
Loading…
Reference in New Issue
Block a user