From 8996de1a55eb01047cec73595ba903ba76376806 Mon Sep 17 00:00:00 2001 From: dlopatin Date: Mon, 18 Mar 2024 10:25:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=86=D0=B2=D0=B5=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Drawnings/DrawningPropelledArtillery.cs | 23 ++++++++----------- .../DrawningSelfPropelledArtilleryUnit.cs | 23 +++++++++---------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningPropelledArtillery.cs b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningPropelledArtillery.cs index c1a3260..8c05e24 100644 --- a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningPropelledArtillery.cs +++ b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningPropelledArtillery.cs @@ -222,28 +222,27 @@ public class DrawningPropelledArtillery Pen pen = new(Color.Black); - + Brush brush = new SolidBrush(EntityPropelledArtillery.BodyColor); + Brush brSlateGray = new SolidBrush(Color.SlateGray); g.DrawEllipse(pen, _startPosX.Value + 0, _startPosY.Value + 75, 30, 30); g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 75, 30, 30); g.DrawRectangle(pen, _startPosX.Value + 15, _startPosY.Value + 75, 90, 30); //границы ЦВЕТ - Brush brOlive = new SolidBrush(Color.Olive); - g.FillRectangle(brOlive, _startPosX.Value + 25, _startPosY.Value + 40, 35, 30);//башня - g.FillEllipse(brOlive, _startPosX.Value + 0, _startPosY.Value + 75, 30, 30); - g.FillEllipse(brOlive, _startPosX.Value + 90, _startPosY.Value + 75, 30, 30); - g.FillRectangle(brOlive, _startPosX.Value + 15, _startPosY.Value + 75, 90, 30); + g.FillRectangle(brush, _startPosX.Value + 25, _startPosY.Value + 40, 35, 30);//башня + g.FillEllipse(brush, _startPosX.Value + 0, _startPosY.Value + 75, 30, 30); + g.FillEllipse(brush, _startPosX.Value + 90, _startPosY.Value + 75, 30, 30); + g.FillRectangle(brush, _startPosX.Value + 15, _startPosY.Value + 75, 90, 30); // границы арт. установки g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 40, 35, 30); g.DrawRectangle(pen, _startPosX.Value + 0, _startPosY.Value + 65, 120, 13);//крыша // верхние катки ЦВЕТ - Brush brCadetBlue = new SolidBrush(Color.CadetBlue); - g.FillEllipse(brCadetBlue, _startPosX.Value + 30, _startPosY.Value + 70, 20, 20); - g.FillEllipse(brCadetBlue, _startPosX.Value + 50, _startPosY.Value + 70, 20, 20); - g.FillEllipse(brCadetBlue, _startPosX.Value + 70, _startPosY.Value + 70, 20, 20); + g.FillEllipse(brSlateGray, _startPosX.Value + 30, _startPosY.Value + 70, 20, 20); + g.FillEllipse(brSlateGray, _startPosX.Value + 50, _startPosY.Value + 70, 20, 20); + g.FillEllipse(brSlateGray, _startPosX.Value + 70, _startPosY.Value + 70, 20, 20); // верхние катки ОТРИСОВКА g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 70, 20, 20); @@ -263,8 +262,6 @@ public class DrawningPropelledArtillery g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 90, 15, 15); g.DrawEllipse(pen, _startPosX.Value + 75, _startPosY.Value + 90, 15, 15); - //Большие катки ЦВЕТ - Brush brSlateGray = new SolidBrush(Color.SlateGray); g.FillEllipse(brSlateGray, _startPosX.Value + 3, _startPosY.Value + 78, 24, 24); g.FillEllipse(brSlateGray, _startPosX.Value + 93, _startPosY.Value + 78, 24, 24); @@ -272,7 +269,7 @@ public class DrawningPropelledArtillery g.DrawEllipse(pen, _startPosX.Value + 3, _startPosY.Value + 78, 24, 24); g.DrawEllipse(pen, _startPosX.Value + 93, _startPosY.Value + 78, 24, 24); - g.FillRectangle(brOlive, _startPosX.Value + 0, _startPosY.Value + 65, 120, 13);// + g.FillRectangle(brush, _startPosX.Value + 0, _startPosY.Value + 65, 120, 13);// diff --git a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningSelfPropelledArtilleryUnit.cs b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningSelfPropelledArtilleryUnit.cs index 628afb9..c0cea51 100644 --- a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningSelfPropelledArtilleryUnit.cs +++ b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/Drawnings/DrawningSelfPropelledArtilleryUnit.cs @@ -27,32 +27,31 @@ public class DrawningSelfPropelledArtilleryUnit : DrawningPropelledArtillery } Pen pen = new(Color.Black); - Brush additionalBrush = new SolidBrush(selfpropelledartilleryunit.AdditionalColor); + Brush brush = new SolidBrush(selfpropelledartilleryunit.AdditionalColor); + base.DrawTransport(g); if (selfpropelledartilleryunit.TurretCannon) { - g.FillEllipse(additionalBrush, _startPosX.Value + 26, _startPosY.Value + 35, 50, 30); - g.FillRectangle(additionalBrush, _startPosX.Value + 25, _startPosY.Value + 36, 20, 29); - g.FillRectangle(additionalBrush, _startPosX.Value + 60, _startPosY.Value + 45, 60, 5); - g.FillEllipse(additionalBrush, _startPosX.Value + 113, _startPosY.Value + 42, 20, 10); + g.FillEllipse(brush, _startPosX.Value + 26, _startPosY.Value + 35, 50, 30); + g.FillRectangle(brush, _startPosX.Value + 25, _startPosY.Value + 36, 20, 29); + g.FillRectangle(brush, _startPosX.Value + 60, _startPosY.Value + 45, 60, 5); + g.FillEllipse(brush, _startPosX.Value + 113, _startPosY.Value + 42, 20, 10); } if (selfpropelledartilleryunit.LaunchBattery) { - g.FillRectangle(additionalBrush, _startPosX.Value + 0, _startPosY.Value + 45, 20, 20); - g.FillPolygon(additionalBrush, new Point[] + g.FillRectangle(brush, _startPosX.Value + 0, _startPosY.Value + 45, 20, 20); + g.FillPolygon(brush, new Point[] { new Point(_startPosX.Value + 0, _startPosY.Value + 15), new Point(_startPosX.Value + 0, _startPosY.Value + 65), new Point(_startPosX.Value + 20, _startPosY.Value + 65), new Point(_startPosX.Value + 20, _startPosY.Value + 45), new Point(_startPosX.Value + 0, _startPosY.Value + 15) }); - g.FillEllipse(additionalBrush, _startPosX.Value + 0, _startPosY.Value + 5, 10, 30); - g.FillRectangle(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 15, 20, 5); - g.FillRectangle(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 25, 15, 5); + g.FillEllipse(brush, _startPosX.Value + 0, _startPosY.Value + 5, 10, 30); + g.FillRectangle(brush, _startPosX.Value + 10, _startPosY.Value + 15, 20, 5); + g.FillRectangle(brush, _startPosX.Value + 10, _startPosY.Value + 25, 15, 5); } - base.DrawTransport(g); - } } \ No newline at end of file