diff --git a/lab_0/FormSimpleBusCollection.cs b/lab_0/FormSimpleBusCollection.cs index f782e15..d3fd8a5 100644 --- a/lab_0/FormSimpleBusCollection.cs +++ b/lab_0/FormSimpleBusCollection.cs @@ -39,7 +39,7 @@ public partial class FormSimpleBusCollection : Form { switch (comboBoxSelectorCompany.Text) { - case "Хранилище": + case "хранилище": _company = new BusStation(pictureBox.Width, pictureBox.Height, new MassiveGenericObjects()); break; @@ -169,15 +169,12 @@ public partial class FormSimpleBusCollection : Form /// private void ButtonRefresh_Click(object sender, EventArgs e) { - listBoxCollection.Items.Clear(); - for (int i = 0; i < _storageCollection.Keys?.Count; ++i) + if (_company == null) { - string? colName = _storageCollection.Keys?[i]; - if (!string.IsNullOrEmpty(colName)) - { - listBoxCollection.Items.Add(colName); - } + return; } + + pictureBox.Image = _company.Show(); } /// @@ -320,7 +317,7 @@ public partial class FormSimpleBusCollection : Form switch (comboBoxSelectorCompany.Text) { - case "Хранилище": + case "хранилище": _company = new BusStation(pictureBox.Width, pictureBox.Height, collection); _logger.LogInformation("Компания создана"); break;