diff --git a/AntiAirCraftGun/AntiAirCraftGun/AntiAirCraftGun.csproj b/AntiAirCraftGun/AntiAirCraftGun/AntiAirCraftGun.csproj
index b57c89e..13ee123 100644
--- a/AntiAirCraftGun/AntiAirCraftGun/AntiAirCraftGun.csproj
+++ b/AntiAirCraftGun/AntiAirCraftGun/AntiAirCraftGun.csproj
@@ -8,4 +8,19 @@
enable
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun.sln b/AntiAirCraftGun/AntiAirCraftGun/AntiAircraftGun.sln
similarity index 55%
rename from AntiAirCraftGun/AntiAirCraftGun.sln
rename to AntiAirCraftGun/AntiAirCraftGun/AntiAircraftGun.sln
index 53fb493..22b9abd 100644
--- a/AntiAirCraftGun/AntiAirCraftGun.sln
+++ b/AntiAirCraftGun/AntiAirCraftGun/AntiAircraftGun.sln
@@ -1,9 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
-VisualStudioVersion = 17.4.33110.190
+VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntiAirCraftGun", "AntiAirCraftGun\AntiAirCraftGun.csproj", "{FB18B709-9154-45E0-8BD8-28822B29FB4B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntiAircraftGun", "AntiAircraftGun.csproj", "{40C43023-14E0-4146-82EE-7A5A7384992F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,15 +11,15 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FB18B709-9154-45E0-8BD8-28822B29FB4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FB18B709-9154-45E0-8BD8-28822B29FB4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FB18B709-9154-45E0-8BD8-28822B29FB4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FB18B709-9154-45E0-8BD8-28822B29FB4B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {40C43023-14E0-4146-82EE-7A5A7384992F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {40C43023-14E0-4146-82EE-7A5A7384992F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {40C43023-14E0-4146-82EE-7A5A7384992F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {40C43023-14E0-4146-82EE-7A5A7384992F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {EB48B08E-3934-47B3-94AF-DF58D18CDB32}
+ SolutionGuid = {990D8FF3-8567-49C7-90F4-1811AB7EB423}
EndGlobalSection
EndGlobal
diff --git a/AntiAirCraftGun/AntiAirCraftGun/DirectionType.cs b/AntiAirCraftGun/AntiAirCraftGun/DirectionType.cs
new file mode 100644
index 0000000..4a2f95d
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/DirectionType.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AntiAircraftGun
+{
+ public enum DirectionType
+ {
+ ///
+ /// Вверх
+ ///
+ Up = 1,
+ ///
+ /// Вниз
+ ///
+ Down = 2,
+ ///
+ /// Влево
+ ///
+ Left = 3,
+ ///
+ /// Вправо
+ ///
+ Right = 4
+
+ }
+}
diff --git a/AntiAirCraftGun/AntiAirCraftGun/DrawingAntiAirCraftGun.cs b/AntiAirCraftGun/AntiAirCraftGun/DrawingAntiAirCraftGun.cs
new file mode 100644
index 0000000..dc404a8
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/DrawingAntiAirCraftGun.cs
@@ -0,0 +1,171 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing.Drawing2D;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static System.Windows.Forms.AxHost;
+
+namespace AntiAircraftGun
+{
+ public class DrawingAntiAirCraftGun
+
+ {
+ private Point[] points = new Point[4];
+ ///
+ /// Класс-сущность
+ ///
+ public EntityAntiAircraftGun? AntiAircraftGun { get; private set; }
+ ///
+ /// Ширина окна
+ ///
+ private int _pictureWidth;
+ ///
+ /// Высота окна
+ ///
+ private int _pictureHeight;
+ ///
+ /// Левая координата прорисовки автомобиля
+ ///
+ private int _startPosX;
+ ///
+ /// Верхняя кооридната прорисовки автомобиля
+ ///
+ private int _startPosY;
+ ///
+ /// Ширина прорисовки автомобиля
+ ///
+ private readonly int _zenitWidth = 110;
+ ///
+ /// Высота прорисовки автомобиля
+ ///
+ private readonly int _zenitHeight = 60;
+ ///
+ /// Инициализация свойств
+ ///
+ /// Скорость
+ /// Вес
+ /// Цвет кузова
+
+ /// Ширина картинки
+ /// Высота картинки
+ /// true - объект создан, false - проверка не пройдена,
+ ///нельзя создать объект в этих размерах
+ public bool Init(int speed, double weight, Color bodyColor, Color
+ additionalColor, Color dopColor, bool rocket, bool radar, int width, int height)
+ {
+ if (width <= _zenitWidth || height <= _zenitHeight) return false;
+
+ _pictureWidth = width;
+ _pictureHeight = height;
+ AntiAircraftGun = new EntityAntiAircraftGun();
+ AntiAircraftGun.Init(speed, weight, bodyColor, additionalColor,dopColor,rocket,radar);
+ return true;
+ }
+ ///
+ /// Установка позиции
+ ///
+ /// Координата X
+ /// Координата Y
+ public void SetPosition(int x, int y)
+ {
+ if (AntiAircraftGun == null) return;
+ _startPosX = x;
+ _startPosY = y;
+ if (x < 0 || y < 0 ||x + _zenitWidth >= _pictureWidth || y + _zenitHeight>= _pictureHeight)
+ {
+ _startPosX = 1;
+ _startPosY = 1;
+ }
+ }
+ ///
+ /// Изменение направления перемещения
+ ///
+ /// Направление
+ public void MoveTransport(DirectionType direction)
+ {
+ if (AntiAircraftGun == null)
+ {
+ return;
+ }
+ switch (direction)
+ {
+ //влево
+ case DirectionType.Left:
+ if (_startPosX - AntiAircraftGun.Step > 0)
+ {
+ _startPosX -= (int)AntiAircraftGun.Step;
+ }
+ break;
+ //вверх
+ case DirectionType.Up:
+ if (_startPosY - AntiAircraftGun.Step > 0)
+ {
+ _startPosY -= (int)AntiAircraftGun.Step;
+ }
+ break;
+ // вправо
+ case DirectionType.Right:
+ if (_startPosX + AntiAircraftGun.Step + _zenitWidth < _pictureWidth)
+ {
+ _startPosX += (int)AntiAircraftGun.Step;
+ }
+ break;
+ //вниз
+ case DirectionType.Down:
+ if (_startPosY + AntiAircraftGun.Step + _zenitHeight < _pictureHeight)
+ {
+ _startPosY += (int)AntiAircraftGun.Step;
+ }
+ break;
+ }
+ }
+ ///
+ /// Прорисовка объекта
+ ///
+ ///
+ public void DrawTransport(Graphics g)
+ {
+ if (AntiAircraftGun == null)
+ {
+ return;
+ }
+ Pen pen = new(Color.Black);
+ Brush bodyBrush = new SolidBrush(AntiAircraftGun.BodyColor);
+ Brush additionalBrush = new SolidBrush(AntiAircraftGun.AdditionalColor);
+
+
+ g.FillEllipse(additionalBrush, _startPosX, _startPosY+40, 110, 10);
+ g.DrawEllipse(pen, _startPosX, _startPosY+40, 110, 10);
+ g.FillRectangle(bodyBrush, _startPosX, _startPosY+30, 110, 10);
+ g.DrawRectangle(pen, _startPosX, _startPosY+30, 110, 10);
+ g.FillRectangle(bodyBrush, _startPosX+80, _startPosY+10, 30, 20);
+ g.DrawRectangle(pen, _startPosX+80, _startPosY+10, 30, 20);
+ for (int i = 0; i < 4; i++)
+ {
+ Rectangle trackRect = new Rectangle(_startPosX+20 + i*19, _startPosY+40, 10, 10);
+ g.DrawEllipse(pen, trackRect);
+ g.FillEllipse(Brushes.Black, trackRect);
+ }
+ Brush dopBrush = new SolidBrush(AntiAircraftGun.DopColor);
+ Pen dopPen = new Pen(AntiAircraftGun.DopColor);
+ if (AntiAircraftGun.Rocket)
+ {
+ points[0] = new Point(_startPosX, _startPosY + 30);
+ points[1] = new Point(_startPosX + 95, _startPosY + 5);
+ points[2] = new Point(_startPosX + 92, _startPosY);
+ points[3] = new Point(_startPosX, _startPosY + 25);
+ g.FillPolygon(dopBrush, points);
+ g.DrawPolygon(pen, points);
+ }
+ if (AntiAircraftGun.Radar)
+ {
+ g.DrawLine(dopPen, _startPosX + 105, _startPosY + 20, _startPosX +105, _startPosY + 5);
+ g.FillPie(dopBrush, _startPosX + 81, _startPosY-15, 30, 30, -45, 180);
+ g.DrawLine(dopPen, _startPosX + 98, _startPosY, _startPosX + 93, _startPosY + 10);
+ g.FillEllipse(dopBrush, _startPosX + 88, _startPosY -10, 10, 10);
+ }
+ }
+ }
+}
+
diff --git a/AntiAirCraftGun/AntiAirCraftGun/EntityAntiAircraftGun.cs b/AntiAirCraftGun/AntiAirCraftGun/EntityAntiAircraftGun.cs
new file mode 100644
index 0000000..c6c6b17
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/EntityAntiAircraftGun.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AntiAircraftGun
+{
+ public class EntityAntiAircraftGun
+ {
+ ///
+ /// Скорость
+ ///
+ public int Speed { get; private set; }
+ ///
+ /// Вес
+ ///
+ public double Weight { get; private set; }
+ ///
+ /// Основной цвет
+ ///
+ public Color BodyColor { get; private set; }
+ ///
+ /// Дополнительный цвет (для опциональных элементов)
+ ///
+ public Color AdditionalColor { get; private set; }
+ ///
+ /// Шаг перемещения автомобиля
+ ///
+ public double Step => (double)Speed * 100 / Weight;
+ ///
+ /// Цвет для доп. деталей
+ ///
+ public Color DopColor { get; private set; }
+ ///
+ /// Ракета
+ ///
+ public bool Rocket { get; private set; }
+ ///
+ /// Радар
+ ///
+ public bool Radar { get; private set; }
+ ///
+ /// Инициализация полей объекта-класса спортивного автомобиля
+ ///
+ /// Скорость
+ /// Вес автомобиля
+ /// Основной цвет
+
+ public void Init(int speed, double weight, Color bodyColor, Color additionalColor, Color dopColor, bool rocket, bool radar)
+ {
+ Speed = speed;
+ Weight = weight;
+ BodyColor = bodyColor;
+ AdditionalColor = additionalColor;
+ DopColor = dopColor;
+ Rocket = rocket;
+ Radar = radar;
+ }
+ }
+}
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Form1.Designer.cs b/AntiAirCraftGun/AntiAirCraftGun/Form1.Designer.cs
deleted file mode 100644
index 17bdc19..0000000
--- a/AntiAirCraftGun/AntiAirCraftGun/Form1.Designer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace AntiAirCraftGun
-{
- 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/AntiAirCraftGun/AntiAirCraftGun/Form1.cs b/AntiAirCraftGun/AntiAirCraftGun/Form1.cs
deleted file mode 100644
index d6bdcce..0000000
--- a/AntiAirCraftGun/AntiAirCraftGun/Form1.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace AntiAirCraftGun
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.Designer.cs b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.Designer.cs
new file mode 100644
index 0000000..347ee34
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.Designer.cs
@@ -0,0 +1,138 @@
+namespace AntiAircraftGun
+{
+ partial class FormAntiAirCraftGun
+ {
+ ///
+ /// 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.pictureBoxAntiAircraftGun = new System.Windows.Forms.PictureBox();
+ this.buttonCreate = new System.Windows.Forms.Button();
+ this.buttonLeft = new System.Windows.Forms.Button();
+ this.buttonUp = new System.Windows.Forms.Button();
+ this.buttonRight = new System.Windows.Forms.Button();
+ this.buttonDown = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAntiAircraftGun)).BeginInit();
+ this.SuspendLayout();
+ //
+ // pictureBoxAntiAircraftGun
+ //
+ this.pictureBoxAntiAircraftGun.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBoxAntiAircraftGun.Location = new System.Drawing.Point(0, 0);
+ this.pictureBoxAntiAircraftGun.Name = "pictureBoxAntiAircraftGun";
+ this.pictureBoxAntiAircraftGun.Size = new System.Drawing.Size(1491, 628);
+ this.pictureBoxAntiAircraftGun.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBoxAntiAircraftGun.TabIndex = 0;
+ this.pictureBoxAntiAircraftGun.TabStop = false;
+ //
+ // buttonCreate
+ //
+ this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.buttonCreate.Location = new System.Drawing.Point(32, 577);
+ this.buttonCreate.Name = "buttonCreate";
+ this.buttonCreate.Size = new System.Drawing.Size(75, 23);
+ this.buttonCreate.TabIndex = 1;
+ this.buttonCreate.Text = "Создать";
+ this.buttonCreate.UseVisualStyleBackColor = true;
+ this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
+ //
+ // buttonLeft
+ //
+ this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonLeft.BackgroundImage = global::AntiAircraftGun.Properties.Resources.strelkaLeft;
+ this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonLeft.Location = new System.Drawing.Point(1265, 562);
+ this.buttonLeft.Name = "buttonLeft";
+ this.buttonLeft.Size = new System.Drawing.Size(30, 30);
+ this.buttonLeft.TabIndex = 2;
+ this.buttonLeft.UseVisualStyleBackColor = true;
+ this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonUp
+ //
+ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonUp.BackgroundImage = global::AntiAircraftGun.Properties.Resources.strelkaTop;
+ this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonUp.Location = new System.Drawing.Point(1301, 526);
+ this.buttonUp.Name = "buttonUp";
+ this.buttonUp.Size = new System.Drawing.Size(30, 30);
+ this.buttonUp.TabIndex = 3;
+ this.buttonUp.UseVisualStyleBackColor = true;
+ this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonRight
+ //
+ this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonRight.BackgroundImage = global::AntiAircraftGun.Properties.Resources.strelkaRight;
+ this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonRight.Location = new System.Drawing.Point(1337, 562);
+ this.buttonRight.Name = "buttonRight";
+ this.buttonRight.Size = new System.Drawing.Size(30, 30);
+ this.buttonRight.TabIndex = 4;
+ this.buttonRight.UseVisualStyleBackColor = true;
+ this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonDown
+ //
+ this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonDown.BackgroundImage = global::AntiAircraftGun.Properties.Resources.strelkaDown;
+ this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonDown.Location = new System.Drawing.Point(1301, 562);
+ this.buttonDown.Name = "buttonDown";
+ this.buttonDown.Size = new System.Drawing.Size(30, 30);
+ this.buttonDown.TabIndex = 5;
+ this.buttonDown.UseVisualStyleBackColor = true;
+ this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // FormAntiAirCraftGun
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1491, 628);
+ this.Controls.Add(this.buttonDown);
+ this.Controls.Add(this.buttonRight);
+ this.Controls.Add(this.buttonUp);
+ this.Controls.Add(this.buttonLeft);
+ this.Controls.Add(this.buttonCreate);
+ this.Controls.Add(this.pictureBoxAntiAircraftGun);
+ this.Name = "FormAntiAirCraftGun";
+ this.Text = "Form1";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAntiAircraftGun)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private PictureBox pictureBoxAntiAircraftGun;
+ private Button buttonCreate;
+ private Button buttonLeft;
+ private Button buttonUp;
+ private Button buttonRight;
+ private Button buttonDown;
+
+ }
+}
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs
new file mode 100644
index 0000000..c5c8fea
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs
@@ -0,0 +1,75 @@
+namespace AntiAircraftGun
+{
+ public partial class FormAntiAirCraftGun : Form
+ {
+ ///
+ /// -
+ ///
+ private DrawingAntiAirCraftGun? _drawingAntiAirCraftGun;
+ public FormAntiAirCraftGun()
+ {
+ InitializeComponent();
+ }
+ ///
+ ///
+ ///
+ private void Draw()
+ {
+ if (_drawingAntiAirCraftGun == null)
+ {
+ return;
+ }
+ Bitmap bmp = new(pictureBoxAntiAircraftGun.Width,pictureBoxAntiAircraftGun.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _drawingAntiAirCraftGun.DrawTransport(gr);
+ pictureBoxAntiAircraftGun.Image = bmp;
+ }
+ private void ButtonMove_Click(object sender, EventArgs e)
+ {
+ if (_drawingAntiAirCraftGun == null)
+ {
+ return;
+ }
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ switch (name)
+ {
+ case "buttonUp":
+ _drawingAntiAirCraftGun.MoveTransport(DirectionType.Up);
+ break;
+ case "buttonDown":
+ _drawingAntiAirCraftGun.MoveTransport(DirectionType.Down);
+ break;
+ case "buttonLeft":
+ _drawingAntiAirCraftGun.MoveTransport(DirectionType.Left);
+ break;
+ case "buttonRight":
+ _drawingAntiAirCraftGun.MoveTransport(DirectionType.Right);
+ break;
+ }
+ Draw();
+ }
+ private void buttonCreate_Click(object sender, EventArgs e)
+ {
+ Random random = new();
+ _drawingAntiAirCraftGun = new DrawingAntiAirCraftGun();
+ _drawingAntiAirCraftGun.Init(random.Next(100, 300),//c
+ 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)),
+
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), // . 2
+ Convert.ToBoolean(random.Next(2)), // Rocket
+ Convert.ToBoolean(random.Next(2)), // Radar
+
+ pictureBoxAntiAircraftGun.Width, pictureBoxAntiAircraftGun.Height);
+ _drawingAntiAirCraftGun.SetPosition(random.Next(10, 100),
+ random.Next(10, 100));
+
+
+ Draw();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.resx b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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/AntiAirCraftGun/AntiAirCraftGun/Program.cs b/AntiAirCraftGun/AntiAirCraftGun/Program.cs
index 17037d6..2be25a2 100644
--- a/AntiAirCraftGun/AntiAirCraftGun/Program.cs
+++ b/AntiAirCraftGun/AntiAirCraftGun/Program.cs
@@ -1,17 +1,17 @@
-namespace AntiAirCraftGun
+namespace AntiAircraftGun
{
- 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());
- }
- }
+ 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 FormAntiAirCraftGun());
+ }
+ }
}
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.Designer.cs b/AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..417c06d
--- /dev/null
+++ b/AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace AntiAircraftGun.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("AntiAircraftGun.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 strelkaDown {
+ get {
+ object obj = ResourceManager.GetObject("strelkaDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap strelkaLeft {
+ get {
+ object obj = ResourceManager.GetObject("strelkaLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap strelkaRight {
+ get {
+ object obj = ResourceManager.GetObject("strelkaRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap strelkaTop {
+ get {
+ object obj = ResourceManager.GetObject("strelkaTop", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Form1.resx b/AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.resx
similarity index 83%
rename from AntiAirCraftGun/AntiAirCraftGun/Form1.resx
rename to AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.resx
index 1af7de1..6d5810c 100644
--- a/AntiAirCraftGun/AntiAirCraftGun/Form1.resx
+++ b/AntiAirCraftGun/AntiAirCraftGun/Properties/Resources.resx
@@ -117,4 +117,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\strelkaDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\strelkaTop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\strelkaLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\strelkaRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaDown.png b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaDown.png
new file mode 100644
index 0000000..d9ad0dd
Binary files /dev/null and b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaDown.png differ
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaLeft.png b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaLeft.png
new file mode 100644
index 0000000..bd2eee7
Binary files /dev/null and b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaLeft.png differ
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaRight.png b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaRight.png
new file mode 100644
index 0000000..69bd44f
Binary files /dev/null and b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaRight.png differ
diff --git a/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaTop.png b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaTop.png
new file mode 100644
index 0000000..300de92
Binary files /dev/null and b/AntiAirCraftGun/AntiAirCraftGun/Resources/strelkaTop.png differ