Сдана Lab4
This commit is contained in:
parent
dfa874b91f
commit
9472abce93
@ -155,6 +155,7 @@
|
|||||||
listBoxStorages.Name = "listBoxStorages";
|
listBoxStorages.Name = "listBoxStorages";
|
||||||
listBoxStorages.Size = new Size(281, 129);
|
listBoxStorages.Size = new Size(281, 129);
|
||||||
listBoxStorages.TabIndex = 0;
|
listBoxStorages.TabIndex = 0;
|
||||||
|
listBoxStorages.SelectedIndexChanged += listBoxStorages_SelectedIndexChanged;
|
||||||
//
|
//
|
||||||
// FormPlaneCollection
|
// FormPlaneCollection
|
||||||
//
|
//
|
||||||
|
@ -26,7 +26,9 @@ namespace AirBomber
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void ReloadObjects()
|
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++)
|
for (int i = 0; i < _storage.Keys.Count; i++)
|
||||||
{
|
{
|
||||||
listBoxStorages.Items.Add(_storage.Keys[i]);
|
listBoxStorages.Items.Add(_storage.Keys[i]);
|
||||||
@ -45,11 +47,10 @@ namespace AirBomber
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></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();
|
pictureBoxCollection.Image = _storage[listBoxStorages.SelectedItem?.ToString()?? string.Empty]?.ShowPlanes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Добавление объекта в набор
|
/// Добавление объекта в набор
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user