diff --git a/DumpTruck/DumpTruck/DrawningDumpTruck.cs b/DumpTruck/DumpTruck/DrawningDumpTruck.cs index 6ecb5ee..1fd16b9 100644 --- a/DumpTruck/DumpTruck/DrawningDumpTruck.cs +++ b/DumpTruck/DumpTruck/DrawningDumpTruck.cs @@ -40,7 +40,7 @@ namespace DumpTruck.DrawningObjects if (dumpTruck.Trailer) { //прицеп - Brush trailer = new SolidBrush(Color.Black); + Brush trailer = new SolidBrush(EntityTruck.AdditionalColor); g.FillRectangle(trailer, _startPosX, _startPosY, 5, 38); g.FillRectangle(trailer, _startPosX + 5, _startPosY + 33, 70, 5); g.FillRectangle(trailer, _startPosX + 70, _startPosY, 5, 38); diff --git a/DumpTruck/DumpTruck/DrawningTruck.cs b/DumpTruck/DumpTruck/DrawningTruck.cs index bc1d030..fff37be 100644 --- a/DumpTruck/DumpTruck/DrawningTruck.cs +++ b/DumpTruck/DumpTruck/DrawningTruck.cs @@ -203,7 +203,7 @@ namespace DumpTruck.DrawningObjects //кузов Brush br = new SolidBrush(EntityTruck.BodyColor); g.FillRectangle(br, _startPosX + 81, _startPosY + 1, 29, 40); - Brush br1 = new SolidBrush(EntityTruck.AdditionalColor); + Brush br1 = new SolidBrush(EntityTruck.BodyColor); g.FillRectangle(br1, _startPosX + 1, _startPosY + 41, 109, 19); //колеса Brush wheels = new SolidBrush(Color.Black); diff --git a/DumpTruck/DumpTruck/FormDumpTruck.cs b/DumpTruck/DumpTruck/FormDumpTruck.cs index c99f10d..bf9d4f7 100644 --- a/DumpTruck/DumpTruck/FormDumpTruck.cs +++ b/DumpTruck/DumpTruck/FormDumpTruck.cs @@ -73,7 +73,7 @@ namespace DumpTruck } Color color2 = Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)); ColorDialog dialog2 = new(); - if (dialog.ShowDialog() == DialogResult.OK) + if (dialog2.ShowDialog() == DialogResult.OK) { color2 = dialog2.Color; } diff --git a/DumpTruck/DumpTruck/FormTruckCollection.cs b/DumpTruck/DumpTruck/FormTruckCollection.cs index 30975ca..f11552f 100644 --- a/DumpTruck/DumpTruck/FormTruckCollection.cs +++ b/DumpTruck/DumpTruck/FormTruckCollection.cs @@ -134,8 +134,7 @@ namespace DumpTruck ReloadObjects(); } - private void listBoxStorages_SelectedIndexChanged(object sender, - EventArgs e) + private void listBoxStorages_SelectedIndexChanged(object sender, EventArgs e) { pictureBoxCollection.Image = _storage[listBoxStorages.SelectedItem?.ToString() ?? string.Empty]?.ShowTrucks();