ISEbd-22 Alimova M.S. Lab Work 04 #4

Closed
malimova wants to merge 7 commits from Lab4 into Lab3
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 9472abce93 - Show all commits

View File

@ -155,6 +155,7 @@
listBoxStorages.Name = "listBoxStorages";
listBoxStorages.Size = new Size(281, 129);
listBoxStorages.TabIndex = 0;
listBoxStorages.SelectedIndexChanged += listBoxStorages_SelectedIndexChanged;
//
// FormPlaneCollection
//

View File

@ -26,7 +26,9 @@ namespace AirBomber
/// </summary>
private void ReloadObjects()
{
int index = listBoxStorages.SelectedIndex; listBoxStorages.Items.Clear();
int index = listBoxStorages.SelectedIndex;
listBoxStorages.Items.Clear();
for (int i = 0; i < _storage.Keys.Count; i++)
{
listBoxStorages.Items.Add(_storage.Keys[i]);
@ -45,11 +47,10 @@ namespace AirBomber
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void listBoxObjects_SelectedIndexChanged(object sender, EventArgs e)
private void listBoxStorages_SelectedIndexChanged(object sender, EventArgs e)
{
pictureBoxCollection.Image = _storage[listBoxStorages.SelectedItem?.ToString()?? string.Empty]?.ShowPlanes();
}
/// <summary>
/// Добавление объекта в набор
/// </summary>