ISEbd-22 Alimova M.S. Lab Work 04 #4
@ -155,6 +155,7 @@
|
||||
listBoxStorages.Name = "listBoxStorages";
|
||||
listBoxStorages.Size = new Size(281, 129);
|
||||
listBoxStorages.TabIndex = 0;
|
||||
listBoxStorages.SelectedIndexChanged += listBoxStorages_SelectedIndexChanged;
|
||||
//
|
||||
// FormPlaneCollection
|
||||
//
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user