изменения

This commit is contained in:
2023-11-28 01:11:20 +04:00
parent cb9551d76e
commit 5b82c75d8d
3 changed files with 8 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ namespace AirBomber.DrawningObjects
return;
}
Pen pen = new(Color.Black);
Brush bodycolor = new SolidBrush(EntityBomber.BodyColor);
//отрисовка крыла 1
GraphicsPath fly_1 = new GraphicsPath();
fly_1.AddLine(_startPosX + 80, _startPosY + 2, _startPosX + 80, _startPosY + 80);
@@ -139,7 +140,7 @@ namespace AirBomber.DrawningObjects
g.FillPath(Brushes.Black, treygol);
g.DrawPath(Pens.Black, treygol);
//отрисовка корпуса
g.DrawRectangle(pen, _startPosX + 30, _startPosY + 80, 120, 25);
g.FillRectangle(bodycolor, _startPosX + 30, _startPosY + 80, 120, 25);
//отрисовка крыла 2
GraphicsPath fly_2 = new GraphicsPath();
fly_2.AddLine(_startPosX + 80, _startPosY + 105, _startPosX + 80, _startPosY + 185);

View File

@@ -106,6 +106,7 @@
listBoxStorages.Name = "listBoxStorages";
listBoxStorages.Size = new Size(193, 104);
listBoxStorages.TabIndex = 0;
listBoxStorages.SelectedIndexChanged += ListBoxObjects_SelectedIndexChanged;
//
// ButtonRefreshCollection
//

View File

@@ -138,5 +138,10 @@ namespace AirBomber
ReloadObjects();
}
}
private void ListBoxObjects_SelectedIndexChanged(object sender, EventArgs e)
{
PicBoxBomberCollection.Image =
_bomber[listBoxStorages.SelectedItem?.ToString() ?? string.Empty]?.ShowBomber();
}
}
}