From 87be0f7fb2162eb8a29e2b849b78b4c97da6fbe9 Mon Sep 17 00:00:00 2001 From: Salikh Date: Sun, 15 Oct 2023 18:14:19 +0400 Subject: [PATCH 1/6] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber.csproj | 26 +++ AirBomber/AirBomber.sln | 25 +++ AirBomber/Direction.cs | 16 ++ AirBomber/DrawningAirBomber.cs | 214 +++++++++++++++++++++ AirBomber/EntityAirBomber.cs | 39 ++++ AirBomber/FormAirBomber.Designer.cs | 135 +++++++++++++ AirBomber/FormAirBomber.cs | 92 +++++++++ AirBomber/FormAirBomber.resx | 120 ++++++++++++ AirBomber/Program.cs | 17 ++ AirBomber/Properties/Resources.Designer.cs | 103 ++++++++++ AirBomber/Properties/Resources.resx | 133 +++++++++++++ AirBomber/Resources/down.png | Bin 0 -> 4013 bytes AirBomber/Resources/left.png | Bin 0 -> 5552 bytes AirBomber/Resources/right-arrow.png | Bin 0 -> 3168 bytes AirBomber/Resources/up-arrow.png | Bin 0 -> 8440 bytes 15 files changed, 920 insertions(+) create mode 100644 AirBomber/AirBomber.csproj create mode 100644 AirBomber/AirBomber.sln create mode 100644 AirBomber/Direction.cs create mode 100644 AirBomber/DrawningAirBomber.cs create mode 100644 AirBomber/EntityAirBomber.cs create mode 100644 AirBomber/FormAirBomber.Designer.cs create mode 100644 AirBomber/FormAirBomber.cs create mode 100644 AirBomber/FormAirBomber.resx create mode 100644 AirBomber/Program.cs create mode 100644 AirBomber/Properties/Resources.Designer.cs create mode 100644 AirBomber/Properties/Resources.resx create mode 100644 AirBomber/Resources/down.png create mode 100644 AirBomber/Resources/left.png create mode 100644 AirBomber/Resources/right-arrow.png create mode 100644 AirBomber/Resources/up-arrow.png diff --git a/AirBomber/AirBomber.csproj b/AirBomber/AirBomber.csproj new file mode 100644 index 0000000..13ee123 --- /dev/null +++ b/AirBomber/AirBomber.csproj @@ -0,0 +1,26 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + \ No newline at end of file diff --git a/AirBomber/AirBomber.sln b/AirBomber/AirBomber.sln new file mode 100644 index 0000000..993c7a1 --- /dev/null +++ b/AirBomber/AirBomber.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirBomber", "AirBomber.csproj", "{986B28E7-F9B9-4843-8FD5-B716158A33C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {986B28E7-F9B9-4843-8FD5-B716158A33C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {986B28E7-F9B9-4843-8FD5-B716158A33C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {986B28E7-F9B9-4843-8FD5-B716158A33C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {986B28E7-F9B9-4843-8FD5-B716158A33C1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5CE3E52F-4CF8-4859-AD95-5AB1B892CFA0} + EndGlobalSection +EndGlobal diff --git a/AirBomber/Direction.cs b/AirBomber/Direction.cs new file mode 100644 index 0000000..275dd71 --- /dev/null +++ b/AirBomber/Direction.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirBomber +{ + public enum Diraction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/AirBomber/DrawningAirBomber.cs b/AirBomber/DrawningAirBomber.cs new file mode 100644 index 0000000..9f56be3 --- /dev/null +++ b/AirBomber/DrawningAirBomber.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirBomber +{ + public class DrawningAirBomber + { + public EntityAirBomber? EntityAirBomber { get; private set; } + + private int _pictureWeigth; + + private int _pictureHeight; + + private int _startPosX; + + private int _startPosY; + + private int _PlaneWidth = 160; + + private int _PlaneHeight = 210; + + public bool Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool rocket, int width, int height) + { + //TODO: Продумать проверки + if (weight < _pictureWeigth || height < _pictureHeight) + { + return false; + } + _pictureWeigth = width; + _pictureHeight = height; + EntityAirBomber = new EntityAirBomber(); + EntityAirBomber.Init(speed, weight, bodycolor, dopcolor, bodykit, toplivo, rocket); + return true; + } + + public void SetPosition(int x, int y) + { + + //TODO: Изменения x, y + if (x <= _pictureWeigth - _PlaneWidth && y <= _pictureHeight - _PlaneHeight) + { + _startPosX = x; + _startPosY = y; + } + /*_startPosX = x; + _startPosY = y;*/ + } + + public void MoveTransport(Diraction diraction) + { + if (EntityAirBomber == null) + { + return; + } + + switch (diraction) + { + case Diraction.Left: + if (EntityAirBomber.BodyKit) + { + if (_startPosX - EntityAirBomber.Step > 0) + { + _startPosX -= (int)EntityAirBomber.Step; + } + } + else + { + if (_startPosX - EntityAirBomber.Step > 0) + { + _startPosX -= (int)EntityAirBomber.Step_No_Obves; + } + } + break; + case Diraction.Right: + if (EntityAirBomber.BodyKit) + { + if (_startPosX + EntityAirBomber.Step + _PlaneWidth < _pictureWeigth) + { + _startPosX += (int)EntityAirBomber.Step; + } + } + else + { + if (_startPosX + EntityAirBomber.Step + _PlaneWidth < _pictureWeigth) + { + _startPosX += (int)EntityAirBomber.Step_No_Obves; + } + } + break; + case Diraction.Up: + if (EntityAirBomber.BodyKit) + { + if (_startPosY - EntityAirBomber.Step > 0) + { + _startPosY -= (int)EntityAirBomber.Step; + } + } + else + { + if (_startPosY - EntityAirBomber.Step > 0) + { + _startPosY -= (int)EntityAirBomber.Step_No_Obves; + } + } + break; + case Diraction.Down: + if (EntityAirBomber.BodyKit) + { + if (_startPosY + EntityAirBomber.Step + _PlaneHeight < _pictureHeight) + { + _startPosY += (int)EntityAirBomber.Step; + } + } + else + { + if (_startPosY + EntityAirBomber.Step + _PlaneHeight < _pictureHeight) + { + _startPosY += (int)EntityAirBomber.Step_No_Obves; + } + } + break; + } + } + + public void DrawCar(Graphics g) + { + if (EntityAirBomber == null) + { + return; + } + + Pen pen = new(Color.Black); + Brush dopcolor = new SolidBrush(EntityAirBomber.DopColor); + if (EntityAirBomber.BodyKit) + { + //отрисовка ракет + GraphicsPath rocket_1 = new GraphicsPath(); + rocket_1.AddLine(_startPosX + 70, _startPosY + 35, _startPosX + 80, _startPosY + 25); + rocket_1.AddLine(_startPosX + 80, _startPosY + 25, _startPosX + 80, _startPosY + 45); + rocket_1.CloseFigure(); + g.FillPath(dopcolor, rocket_1); + g.DrawPath(Pens.Black, rocket_1); + GraphicsPath rocket_2 = new GraphicsPath(); + rocket_2.AddLine(_startPosX + 70, _startPosY + 65, _startPosX + 80, _startPosY + 55); + rocket_2.AddLine(_startPosX + 80, _startPosY + 55, _startPosX + 80, _startPosY + 75); + rocket_2.CloseFigure(); + g.FillPath(dopcolor, rocket_2); + g.DrawPath(Pens.Black, rocket_2); + GraphicsPath rocket_3 = new GraphicsPath(); + rocket_3.AddLine(_startPosX + 70, _startPosY + 120, _startPosX + 80, _startPosY + 110); + rocket_3.AddLine(_startPosX + 80, _startPosY + 110, _startPosX + 80, _startPosY + 130); + rocket_3.CloseFigure(); + g.FillPath(dopcolor, rocket_3); + g.DrawPath(Pens.Black, rocket_3); + GraphicsPath rocket_4 = new GraphicsPath(); + rocket_4.AddLine(_startPosX + 70, _startPosY + 150, _startPosX + 80, _startPosY + 140); + rocket_4.AddLine(_startPosX + 80, _startPosY + 140, _startPosX + 80, _startPosY + 160); + rocket_4.CloseFigure(); + g.FillPath(dopcolor, rocket_4); + g.DrawPath(Pens.Black, rocket_4); + //отрисовка баков + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 5, 8, 10); + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 25, 8, 10); + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 45, 8, 10); + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 130, 8, 10); + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 150, 8, 10); + g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 170, 8, 10); + } + //g.DrawEllipse(pen, _startPosX + 90, _startPosY, 20, 20); + //g.DrawRectangle(pen, _startPosX + 90, _startPosY + 10,20, 40); + //отрисовка крыла 1 + GraphicsPath fly_1 = new GraphicsPath(); + fly_1.AddLine(_startPosX + 80, _startPosY + 2, _startPosX + 80, _startPosY + 80); + fly_1.AddLine(_startPosX + 80, _startPosY + 2, _startPosX + 90, _startPosY + 2); + fly_1.AddLine(_startPosX + 90, _startPosY + 2, _startPosX + 100, _startPosY + 80); + fly_1.AddLine(_startPosX + 100, _startPosY + 80, _startPosX + 80, _startPosY + 80); + g.DrawPath(Pens.Black, fly_1); + //отрисовка кабины пилота + GraphicsPath treygol = new GraphicsPath(); + treygol.AddLine(_startPosX + 3, _startPosY + 95, _startPosX + 30, _startPosY + 80); + treygol.AddLine(_startPosX + 30, _startPosY + 80, _startPosX + 30, _startPosY + 105); + treygol.CloseFigure(); + g.FillPath(Brushes.Black, treygol); + g.DrawPath(Pens.Black, treygol); + //отрисовка корпуса + g.DrawRectangle(pen, _startPosX + 30, _startPosY + 80, 120, 25); + //отрисовка крыла 2 + GraphicsPath fly_2 = new GraphicsPath(); + fly_2.AddLine(_startPosX + 80, _startPosY + 105, _startPosX + 80, _startPosY + 185); + fly_2.AddLine(_startPosX + 80, _startPosY + 185, _startPosX + 90, _startPosY + 185); + fly_2.AddLine(_startPosX + 90, _startPosY + 185, _startPosX + 100, _startPosY + 105); + fly_2.CloseFigure(); + g.DrawPath(Pens.Black, fly_2); + //отриосвка хвоста + GraphicsPath wing = new GraphicsPath(); + //wing.AddLine(_startPosX, _startPosY, _startPosX, _startPosY); + wing.AddLine(_startPosX + 135, _startPosY + 80, _startPosX + 135, _startPosY + 70); + wing.AddLine(_startPosX + 135, _startPosY + 70, _startPosX + 150, _startPosY + 50); + wing.AddLine(_startPosX + 150, _startPosY + 50, _startPosX + 150, _startPosY + 80); + wing.CloseFigure(); + g.DrawPath(Pens.Black, wing); + GraphicsPath wing_2 = new GraphicsPath(); + wing_2.AddLine(_startPosX + 135, _startPosY + 105, _startPosX + 135, _startPosY + 115); + wing_2.AddLine(_startPosX + 135, _startPosY + 115, _startPosX + 150, _startPosY + 135); + wing_2.AddLine(_startPosX + 150, _startPosY + 135, _startPosX + 150, _startPosY + 105); + wing_2.CloseFigure(); + g.DrawPath(Pens.Black, wing_2); + } + } +} diff --git a/AirBomber/EntityAirBomber.cs b/AirBomber/EntityAirBomber.cs new file mode 100644 index 0000000..dca48bf --- /dev/null +++ b/AirBomber/EntityAirBomber.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirBomber +{ + public class EntityAirBomber + { + public int Speed { get; private set; } //скорость + + public int Weight { get; private set; } //вес грузовика + + public Color BodyColor { get; private set; } // основной цвет + + public Color DopColor { get; private set; } // доп цвет + + public bool BodyKit { get; private set; } //наличие обвесов + + public bool Toplivo { get; private set; } // топливо + + public bool Rocket { get; private set; } //ракеты + + public double Step => (double)Speed * 100 / Weight; + public double Step_No_Obves => (double)Speed * 200 / Weight; + + public void Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool ropcket) + { + Speed = speed; + Weight = weight; + BodyColor = bodycolor; + DopColor = dopcolor; + BodyKit = bodykit; + Toplivo = toplivo; + Rocket = ropcket; + } + } +} diff --git a/AirBomber/FormAirBomber.Designer.cs b/AirBomber/FormAirBomber.Designer.cs new file mode 100644 index 0000000..c8bec02 --- /dev/null +++ b/AirBomber/FormAirBomber.Designer.cs @@ -0,0 +1,135 @@ +namespace AirBomber +{ + partial class FormAirBomber + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + pictureBox = new PictureBox(); + buttonRight = new Button(); + buttonDown = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonCreate = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit(); + SuspendLayout(); + // + // pictureBox + // + pictureBox.Dock = DockStyle.Fill; + pictureBox.Location = new Point(0, 0); + pictureBox.Name = "pictureBox"; + pictureBox.Size = new Size(800, 450); + pictureBox.TabIndex = 0; + pictureBox.TabStop = false; + pictureBox.Click += pictureBox_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.right_arrow; + buttonRight.BackgroundImageLayout = ImageLayout.Zoom; + buttonRight.Location = new Point(713, 373); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(30, 30); + buttonRight.TabIndex = 2; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.down; + buttonDown.BackgroundImageLayout = ImageLayout.Zoom; + buttonDown.Location = new Point(677, 401); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(30, 30); + buttonDown.TabIndex = 3; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.left; + buttonLeft.BackgroundImageLayout = ImageLayout.Zoom; + buttonLeft.Location = new Point(641, 373); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(30, 30); + buttonLeft.TabIndex = 4; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.up_arrow; + buttonUp.BackgroundImageLayout = ImageLayout.Zoom; + buttonUp.Location = new Point(677, 345); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(30, 30); + buttonUp.TabIndex = 5; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(30, 395); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(131, 43); + buttonCreate.TabIndex = 6; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // FormAirBomber + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(buttonCreate); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonDown); + Controls.Add(buttonRight); + Controls.Add(pictureBox); + Name = "FormAirBomber"; + Text = "Form1"; + ((System.ComponentModel.ISupportInitialize)pictureBox).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBox; + private Button buttonRight; + private Button buttonDown; + private Button buttonLeft; + private Button buttonUp; + private Button buttonCreate; + } +} \ No newline at end of file diff --git a/AirBomber/FormAirBomber.cs b/AirBomber/FormAirBomber.cs new file mode 100644 index 0000000..68b9737 --- /dev/null +++ b/AirBomber/FormAirBomber.cs @@ -0,0 +1,92 @@ +namespace AirBomber +{ + public partial class FormAirBomber : Form + { + private DrawningAirBomber? _drawingair; + public FormAirBomber() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + + } + private void Draw() + { + + if (_drawingair == null) + { + return; + } + Bitmap bmp = new(pictureBox.Width, + pictureBox.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawingair.DrawCar(gr); + pictureBox.Image = bmp; + } + + private void buttonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawingair = new DrawningAirBomber(); + _drawingair.Init(random.Next(100, 300), + random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Convert.ToBoolean(random.Next(0, 2)), + Convert.ToBoolean(random.Next(0, 2)), + Convert.ToBoolean(random.Next(0, 2)), + pictureBox.Width, pictureBox.Height); + _drawingair.SetPosition(random.Next(10, 100), + random.Next(10, 100)); + Draw(); + } + + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawingair == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _drawingair.MoveTransport(Diraction.Up); + break; + case "buttonDown": + _drawingair.MoveTransport(Diraction.Down); + break; + case "buttonLeft": + _drawingair.MoveTransport(Diraction.Left); + break; + case "buttonRight": + _drawingair.MoveTransport(Diraction.Right); + break; + } + Draw(); + } + + private void pictureBox_Click(object sender, EventArgs e) + { + + } + + private void button3_Click(object sender, EventArgs e) + { + } + + private void button2_Click(object sender, EventArgs e) + { + } + + private void button5_Click(object sender, EventArgs e) + { + } + + private void button4_Click(object sender, EventArgs e) + { + } + } +} \ No newline at end of file diff --git a/AirBomber/FormAirBomber.resx b/AirBomber/FormAirBomber.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/AirBomber/FormAirBomber.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AirBomber/Program.cs b/AirBomber/Program.cs new file mode 100644 index 0000000..76b85fe --- /dev/null +++ b/AirBomber/Program.cs @@ -0,0 +1,17 @@ +namespace AirBomber +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new FormAirBomber()); + } + } +} \ No newline at end of file diff --git a/AirBomber/Properties/Resources.Designer.cs b/AirBomber/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0b4dd32 --- /dev/null +++ b/AirBomber/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace AirBomber.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AirBomber.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap down { + get { + object obj = ResourceManager.GetObject("down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap left { + get { + object obj = ResourceManager.GetObject("left", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap right_arrow { + get { + object obj = ResourceManager.GetObject("right-arrow", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap up_arrow { + get { + object obj = ResourceManager.GetObject("up-arrow", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/AirBomber/Properties/Resources.resx b/AirBomber/Properties/Resources.resx new file mode 100644 index 0000000..9095ae1 --- /dev/null +++ b/AirBomber/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\right-arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\up-arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/AirBomber/Resources/down.png b/AirBomber/Resources/down.png new file mode 100644 index 0000000000000000000000000000000000000000..9e2352dce0d582012e22e5d633402bfcd030b039 GIT binary patch literal 4013 zcmeHK`&Sd!7CsXqAqb*iML>z-KuWK?6a+*J+7ujtpy*W)EK!scL6QQMAP8e!zHUYA zfC42TUMgNI5|sBNB$gHo2$X6G2;m_SXn6#~%Ror(#I^2!(6#O_&RVnf?C z*IYlq@G;ak*9QO?BKzop01)s;0?^aN%`ErTB5uf>eZg@6+Bv7ap)9>~M{&?B{)?da zL+pt7gcGr+K|(@;ePm2jT=)sjX?u1oD|c#_IRHjG5&E9PT;8NKr1(DTc=Nk~(tC$? zuC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Ng_j_~?yU{l2K^7p*4h57aW E0L#{9+yDRo literal 0 HcmV?d00001 -- 2.25.1 From b8df03df51fa9b09dd1895805b8ff8bb968e3819 Mon Sep 17 00:00:00 2001 From: Salikh Date: Tue, 17 Oct 2023 22:59:22 +0400 Subject: [PATCH 2/6] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/DrawningAirBomber.cs | 57 ++++++++++------------------------ AirBomber/EntityAirBomber.cs | 1 - 2 files changed, 17 insertions(+), 41 deletions(-) diff --git a/AirBomber/DrawningAirBomber.cs b/AirBomber/DrawningAirBomber.cs index 9f56be3..f87f0bc 100644 --- a/AirBomber/DrawningAirBomber.cs +++ b/AirBomber/DrawningAirBomber.cs @@ -21,7 +21,7 @@ namespace AirBomber private int _PlaneWidth = 160; - private int _PlaneHeight = 210; + private int _PlaneHeight = 185; public bool Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool rocket, int width, int height) { @@ -41,13 +41,11 @@ namespace AirBomber { //TODO: Изменения x, y - if (x <= _pictureWeigth - _PlaneWidth && y <= _pictureHeight - _PlaneHeight) + if (x <= _pictureWeigth - _PlaneWidth && x >= 0 && y <= _pictureHeight - _PlaneHeight && y >= 0) { _startPosX = x; _startPosY = y; } - /*_startPosX = x; - _startPosY = y;*/ } public void MoveTransport(Diraction diraction) @@ -57,75 +55,54 @@ namespace AirBomber return; } + int step = (int)EntityAirBomber.Step; + switch (diraction) { case Diraction.Left: - if (EntityAirBomber.BodyKit) + if (_startPosX - step >= 0) { - if (_startPosX - EntityAirBomber.Step > 0) - { - _startPosX -= (int)EntityAirBomber.Step; - } + _startPosX -= step; } else { - if (_startPosX - EntityAirBomber.Step > 0) - { - _startPosX -= (int)EntityAirBomber.Step_No_Obves; - } + _startPosX = 0; } break; case Diraction.Right: - if (EntityAirBomber.BodyKit) + if (_startPosX + step + _PlaneWidth <= _pictureWeigth) { - if (_startPosX + EntityAirBomber.Step + _PlaneWidth < _pictureWeigth) - { - _startPosX += (int)EntityAirBomber.Step; - } + _startPosX += step; } else { - if (_startPosX + EntityAirBomber.Step + _PlaneWidth < _pictureWeigth) - { - _startPosX += (int)EntityAirBomber.Step_No_Obves; - } + _startPosX = _pictureWeigth - _PlaneWidth; } break; case Diraction.Up: - if (EntityAirBomber.BodyKit) + if (_startPosY - step >= 0) { - if (_startPosY - EntityAirBomber.Step > 0) - { - _startPosY -= (int)EntityAirBomber.Step; - } + _startPosY -= step; } else { - if (_startPosY - EntityAirBomber.Step > 0) - { - _startPosY -= (int)EntityAirBomber.Step_No_Obves; - } + _startPosY = 0; } break; case Diraction.Down: - if (EntityAirBomber.BodyKit) + if (_startPosY + step + _PlaneHeight <= _pictureHeight) { - if (_startPosY + EntityAirBomber.Step + _PlaneHeight < _pictureHeight) - { - _startPosY += (int)EntityAirBomber.Step; - } + _startPosY += step; } else { - if (_startPosY + EntityAirBomber.Step + _PlaneHeight < _pictureHeight) - { - _startPosY += (int)EntityAirBomber.Step_No_Obves; - } + _startPosY = _pictureHeight - _PlaneHeight; } break; } } + public void DrawCar(Graphics g) { if (EntityAirBomber == null) diff --git a/AirBomber/EntityAirBomber.cs b/AirBomber/EntityAirBomber.cs index dca48bf..bec8c8d 100644 --- a/AirBomber/EntityAirBomber.cs +++ b/AirBomber/EntityAirBomber.cs @@ -23,7 +23,6 @@ namespace AirBomber public bool Rocket { get; private set; } //ракеты public double Step => (double)Speed * 100 / Weight; - public double Step_No_Obves => (double)Speed * 200 / Weight; public void Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool ropcket) { -- 2.25.1 From 3c3737fc84e6cdaf7f7332648f2a58f03d361d79 Mon Sep 17 00:00:00 2001 From: Salikh Date: Sun, 5 Nov 2023 17:23:51 +0400 Subject: [PATCH 3/6] J,yjdf --- Air/Air.csproj | 11 +++++++++++ Air/Air.sln | 25 +++++++++++++++++++++++++ Air/Form1.Designer.cs | 39 +++++++++++++++++++++++++++++++++++++++ Air/Form1.cs | 10 ++++++++++ Air/Program.cs | 17 +++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 Air/Air.csproj create mode 100644 Air/Air.sln create mode 100644 Air/Form1.Designer.cs create mode 100644 Air/Form1.cs create mode 100644 Air/Program.cs diff --git a/Air/Air.csproj b/Air/Air.csproj new file mode 100644 index 0000000..b57c89e --- /dev/null +++ b/Air/Air.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + \ No newline at end of file diff --git a/Air/Air.sln b/Air/Air.sln new file mode 100644 index 0000000..5d1bb21 --- /dev/null +++ b/Air/Air.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Air", "Air.csproj", "{6188EDB2-279D-4507-B206-1C322D9FF9A2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FFA7AD5F-278D-4646-A987-0C6AE66FC3CB} + EndGlobalSection +EndGlobal diff --git a/Air/Form1.Designer.cs b/Air/Form1.Designer.cs new file mode 100644 index 0000000..5ae4ea4 --- /dev/null +++ b/Air/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace Air +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Form1"; + } + + #endregion + } +} \ No newline at end of file diff --git a/Air/Form1.cs b/Air/Form1.cs new file mode 100644 index 0000000..79d7017 --- /dev/null +++ b/Air/Form1.cs @@ -0,0 +1,10 @@ +namespace Air +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Air/Program.cs b/Air/Program.cs new file mode 100644 index 0000000..8334642 --- /dev/null +++ b/Air/Program.cs @@ -0,0 +1,17 @@ +namespace Air +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file -- 2.25.1 From 3f2e0563153df07bcec62174f22847e54bae5abb Mon Sep 17 00:00:00 2001 From: Salikh Date: Tue, 14 Nov 2023 19:15:16 +0400 Subject: [PATCH 4/6] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Air/Air.csproj | 11 ----------- Air/Air.sln | 25 ------------------------- Air/Form1.Designer.cs | 39 --------------------------------------- Air/Form1.cs | 10 ---------- Air/Program.cs | 17 ----------------- 5 files changed, 102 deletions(-) delete mode 100644 Air/Air.csproj delete mode 100644 Air/Air.sln delete mode 100644 Air/Form1.Designer.cs delete mode 100644 Air/Form1.cs delete mode 100644 Air/Program.cs diff --git a/Air/Air.csproj b/Air/Air.csproj deleted file mode 100644 index b57c89e..0000000 --- a/Air/Air.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - WinExe - net6.0-windows - enable - true - enable - - - \ No newline at end of file diff --git a/Air/Air.sln b/Air/Air.sln deleted file mode 100644 index 5d1bb21..0000000 --- a/Air/Air.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.34031.279 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Air", "Air.csproj", "{6188EDB2-279D-4507-B206-1C322D9FF9A2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6188EDB2-279D-4507-B206-1C322D9FF9A2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {FFA7AD5F-278D-4646-A987-0C6AE66FC3CB} - EndGlobalSection -EndGlobal diff --git a/Air/Form1.Designer.cs b/Air/Form1.Designer.cs deleted file mode 100644 index 5ae4ea4..0000000 --- a/Air/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace Air -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/Air/Form1.cs b/Air/Form1.cs deleted file mode 100644 index 79d7017..0000000 --- a/Air/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Air -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/Air/Program.cs b/Air/Program.cs deleted file mode 100644 index 8334642..0000000 --- a/Air/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Air -{ - internal static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - // To customize application configuration such as set high DPI settings or default font, - // see https://aka.ms/applicationconfiguration. - ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); - } - } -} \ No newline at end of file -- 2.25.1 From 09aba1c0751b8810216db4af4d803d4363517dd9 Mon Sep 17 00:00:00 2001 From: Salikh Date: Tue, 14 Nov 2023 22:08:08 +0400 Subject: [PATCH 5/6] =?UTF-8?q?=D0=BE=D0=B1=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/DrawningAirBomber.cs | 10 ++++++---- AirBomber/EntityAirBomber.cs | 5 +---- AirBomber/FormAirBomber.cs | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/AirBomber/DrawningAirBomber.cs b/AirBomber/DrawningAirBomber.cs index f87f0bc..d732b16 100644 --- a/AirBomber/DrawningAirBomber.cs +++ b/AirBomber/DrawningAirBomber.cs @@ -23,17 +23,17 @@ namespace AirBomber private int _PlaneHeight = 185; - public bool Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool rocket, int width, int height) + public bool Init(int speed, int weight, Color bodycolor, Color dopcolor, bool toplivo, bool rocket, int width, int height) { //TODO: Продумать проверки - if (weight < _pictureWeigth || height < _pictureHeight) + if (width < _pictureWeigth || height < _pictureHeight) { return false; } _pictureWeigth = width; _pictureHeight = height; EntityAirBomber = new EntityAirBomber(); - EntityAirBomber.Init(speed, weight, bodycolor, dopcolor, bodykit, toplivo, rocket); + EntityAirBomber.Init(speed, weight, bodycolor, dopcolor, toplivo, rocket); return true; } @@ -112,7 +112,7 @@ namespace AirBomber Pen pen = new(Color.Black); Brush dopcolor = new SolidBrush(EntityAirBomber.DopColor); - if (EntityAirBomber.BodyKit) + if (EntityAirBomber.Toplivo) { //отрисовка ракет GraphicsPath rocket_1 = new GraphicsPath(); @@ -139,6 +139,8 @@ namespace AirBomber rocket_4.CloseFigure(); g.FillPath(dopcolor, rocket_4); g.DrawPath(Pens.Black, rocket_4); + } + if (EntityAirBomber.Rocket) { //отрисовка баков g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 5, 8, 10); g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 25, 8, 10); diff --git a/AirBomber/EntityAirBomber.cs b/AirBomber/EntityAirBomber.cs index bec8c8d..0c09897 100644 --- a/AirBomber/EntityAirBomber.cs +++ b/AirBomber/EntityAirBomber.cs @@ -16,21 +16,18 @@ namespace AirBomber public Color DopColor { get; private set; } // доп цвет - public bool BodyKit { get; private set; } //наличие обвесов - public bool Toplivo { get; private set; } // топливо public bool Rocket { get; private set; } //ракеты public double Step => (double)Speed * 100 / Weight; - public void Init(int speed, int weight, Color bodycolor, Color dopcolor, bool bodykit, bool toplivo, bool ropcket) + public void Init(int speed, int weight, Color bodycolor, Color dopcolor, bool toplivo, bool ropcket) { Speed = speed; Weight = weight; BodyColor = bodycolor; DopColor = dopcolor; - BodyKit = bodykit; Toplivo = toplivo; Rocket = ropcket; } diff --git a/AirBomber/FormAirBomber.cs b/AirBomber/FormAirBomber.cs index 68b9737..cfa29db 100644 --- a/AirBomber/FormAirBomber.cs +++ b/AirBomber/FormAirBomber.cs @@ -36,7 +36,6 @@ namespace AirBomber Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)), - Convert.ToBoolean(random.Next(0, 2)), pictureBox.Width, pictureBox.Height); _drawingair.SetPosition(random.Next(10, 100), random.Next(10, 100)); -- 2.25.1 From 669f8b456868d7c5d94f1f8c18ff82a8a84cef0b Mon Sep 17 00:00:00 2001 From: Salikh Date: Sat, 25 Nov 2023 12:12:44 +0400 Subject: [PATCH 6/6] =?UTF-8?q?=D1=84=D0=B8=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/DrawningAirBomber.cs | 33 ++++++++++++----------------- AirBomber/EntityAirBomber.cs | 18 ++++++---------- AirBomber/FormAirBomber.Designer.cs | 1 - AirBomber/FormAirBomber.cs | 25 ---------------------- 4 files changed, 19 insertions(+), 58 deletions(-) diff --git a/AirBomber/DrawningAirBomber.cs b/AirBomber/DrawningAirBomber.cs index d732b16..f9f75e6 100644 --- a/AirBomber/DrawningAirBomber.cs +++ b/AirBomber/DrawningAirBomber.cs @@ -11,26 +11,20 @@ namespace AirBomber { public EntityAirBomber? EntityAirBomber { get; private set; } - private int _pictureWeigth; - + private int _pictureWidth; private int _pictureHeight; - private int _startPosX; - private int _startPosY; - private int _PlaneWidth = 160; - private int _PlaneHeight = 185; public bool Init(int speed, int weight, Color bodycolor, Color dopcolor, bool toplivo, bool rocket, int width, int height) { - //TODO: Продумать проверки - if (width < _pictureWeigth || height < _pictureHeight) + if (width < _pictureWidth || height < _pictureHeight) { return false; } - _pictureWeigth = width; + _pictureWidth = width; _pictureHeight = height; EntityAirBomber = new EntityAirBomber(); EntityAirBomber.Init(speed, weight, bodycolor, dopcolor, toplivo, rocket); @@ -39,13 +33,16 @@ namespace AirBomber public void SetPosition(int x, int y) { - - //TODO: Изменения x, y - if (x <= _pictureWeigth - _PlaneWidth && x >= 0 && y <= _pictureHeight - _PlaneHeight && y >= 0) + if (x < 0 || x + _PlaneWidth > _pictureWidth) { - _startPosX = x; - _startPosY = y; + x = _pictureWidth - _PlaneWidth; } + if (y < 0 || y + _PlaneWidth > _pictureHeight) + { + y = _pictureHeight - _PlaneWidth; + } + _startPosX = x; + _startPosY = y; } public void MoveTransport(Diraction diraction) @@ -70,13 +67,13 @@ namespace AirBomber } break; case Diraction.Right: - if (_startPosX + step + _PlaneWidth <= _pictureWeigth) + if (_startPosX + step + _PlaneWidth <= _pictureWidth) { _startPosX += step; } else { - _startPosX = _pictureWeigth - _PlaneWidth; + _startPosX = _pictureWidth - _PlaneWidth; } break; case Diraction.Up: @@ -102,7 +99,6 @@ namespace AirBomber } } - public void DrawCar(Graphics g) { if (EntityAirBomber == null) @@ -149,8 +145,6 @@ namespace AirBomber g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 150, 8, 10); g.FillRectangle(dopcolor, _startPosX + 82, _startPosY + 170, 8, 10); } - //g.DrawEllipse(pen, _startPosX + 90, _startPosY, 20, 20); - //g.DrawRectangle(pen, _startPosX + 90, _startPosY + 10,20, 40); //отрисовка крыла 1 GraphicsPath fly_1 = new GraphicsPath(); fly_1.AddLine(_startPosX + 80, _startPosY + 2, _startPosX + 80, _startPosY + 80); @@ -176,7 +170,6 @@ namespace AirBomber g.DrawPath(Pens.Black, fly_2); //отриосвка хвоста GraphicsPath wing = new GraphicsPath(); - //wing.AddLine(_startPosX, _startPosY, _startPosX, _startPosY); wing.AddLine(_startPosX + 135, _startPosY + 80, _startPosX + 135, _startPosY + 70); wing.AddLine(_startPosX + 135, _startPosY + 70, _startPosX + 150, _startPosY + 50); wing.AddLine(_startPosX + 150, _startPosY + 50, _startPosX + 150, _startPosY + 80); diff --git a/AirBomber/EntityAirBomber.cs b/AirBomber/EntityAirBomber.cs index 0c09897..0f7f1ef 100644 --- a/AirBomber/EntityAirBomber.cs +++ b/AirBomber/EntityAirBomber.cs @@ -8,18 +8,12 @@ namespace AirBomber { public class EntityAirBomber { - public int Speed { get; private set; } //скорость - - public int Weight { get; private set; } //вес грузовика - - public Color BodyColor { get; private set; } // основной цвет - - public Color DopColor { get; private set; } // доп цвет - - public bool Toplivo { get; private set; } // топливо - - public bool Rocket { get; private set; } //ракеты - + public int Speed { get; private set; } + public int Weight { get; private set; } + public Color BodyColor { get; private set; } + public Color DopColor { get; private set; } + public bool Toplivo { get; private set; } + public bool Rocket { get; private set; } public double Step => (double)Speed * 100 / Weight; public void Init(int speed, int weight, Color bodycolor, Color dopcolor, bool toplivo, bool ropcket) diff --git a/AirBomber/FormAirBomber.Designer.cs b/AirBomber/FormAirBomber.Designer.cs index c8bec02..950da2f 100644 --- a/AirBomber/FormAirBomber.Designer.cs +++ b/AirBomber/FormAirBomber.Designer.cs @@ -45,7 +45,6 @@ pictureBox.Size = new Size(800, 450); pictureBox.TabIndex = 0; pictureBox.TabStop = false; - pictureBox.Click += pictureBox_Click; // // buttonRight // diff --git a/AirBomber/FormAirBomber.cs b/AirBomber/FormAirBomber.cs index cfa29db..fcbc10d 100644 --- a/AirBomber/FormAirBomber.cs +++ b/AirBomber/FormAirBomber.cs @@ -8,10 +8,6 @@ namespace AirBomber InitializeComponent(); } - private void Form1_Load(object sender, EventArgs e) - { - - } private void Draw() { @@ -66,26 +62,5 @@ namespace AirBomber } Draw(); } - - private void pictureBox_Click(object sender, EventArgs e) - { - - } - - private void button3_Click(object sender, EventArgs e) - { - } - - private void button2_Click(object sender, EventArgs e) - { - } - - private void button5_Click(object sender, EventArgs e) - { - } - - private void button4_Click(object sender, EventArgs e) - { - } } } \ No newline at end of file -- 2.25.1