diff --git a/ArmoredCar/ArmoredCar/ArmoredCar.csproj b/ArmoredCar/ArmoredCar/ArmoredCar.csproj
index 7108dcf..2f866a5 100644
--- a/ArmoredCar/ArmoredCar/ArmoredCar.csproj
+++ b/ArmoredCar/ArmoredCar/ArmoredCar.csproj
@@ -6,4 +6,19 @@
true
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file
diff --git a/ArmoredCar/ArmoredCar/Direction.cs b/ArmoredCar/ArmoredCar/Direction.cs
new file mode 100644
index 0000000..4bcfc42
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/Direction.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ArmoredCar
+{
+ enum Direction
+ {
+ Up = 1,
+ Down = 2,
+ Left = 3,
+ Right = 4
+ }
+}
diff --git a/ArmoredCar/ArmoredCar/DrawningArmoredCar.cs b/ArmoredCar/ArmoredCar/DrawningArmoredCar.cs
new file mode 100644
index 0000000..a0ae58b
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/DrawningArmoredCar.cs
@@ -0,0 +1,168 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ArmoredCar
+{
+ internal class DrawningArmoredCar
+ {
+ ///
+ /// Класс-сущность
+ ///
+ public EntityArmoredCar ArmoredCar { private set; get; }
+ ///
+ /// Левая координата отрисовки бронированной машины
+ ///
+ private float _startPosX;
+ ///
+ /// Верхняя кооридната отрисовки бронированной машины
+ ///
+ private float _startPosY;
+ ///
+ /// Ширина окна отрисовки
+ ///
+ private int? _pictureWidth = null;
+ ///
+ /// Высота окна отрисовки
+ ///
+ private int? _pictureHeight = null;
+ ///
+ /// Ширина отрисовки бронированной машины
+ ///
+ private readonly int _carWidth = 80;
+ ///
+ /// Высота отрисовки бронированной машины
+ ///
+ private readonly int _carHeight = 50;
+ ///
+ /// Инициализация свойств
+ ///
+ /// Скорость
+ /// Вес бронированной машины
+ /// Цвет кузова
+ public void Init(int speed, float weight, Color bodyColor)
+ {
+ ArmoredCar = new EntityArmoredCar();
+ ArmoredCar.Init(speed, weight, bodyColor);
+ }
+ ///
+ /// Установка позиции бронированной машины
+ ///
+ /// Координата X
+ /// Координата Y
+ /// Ширина картинки
+ /// Высота картинки
+ public void SetPosition(int x, int y, int width, int height)
+ {
+
+ if (x >= 0 && y >= 0 && x + _carWidth < width && y + _carHeight < height) {
+ _startPosX = x;
+ _startPosY = y;
+ _pictureWidth = width;
+ _pictureHeight = height;
+ }
+ }
+
+ ///
+ /// Изменение направления перемещения
+ ///
+ /// Направление
+ public void MoveTransport(Direction direction)
+ {
+ if (!_pictureWidth.HasValue || !_pictureHeight.HasValue)
+ {
+ return;
+ }
+ switch (direction)
+ {
+ // вправо
+ case Direction.Right:
+ if (_startPosX + _carWidth + ArmoredCar.Step < _pictureWidth)
+ {
+ _startPosX += ArmoredCar.Step;
+ }
+ break;
+ //влево
+ case Direction.Left:
+
+ if (_startPosX - ArmoredCar.Step > 0)
+ {
+ _startPosX -= ArmoredCar.Step;
+ }
+ break;
+ //вверх
+ case Direction.Up:
+
+ if (_startPosY - ArmoredCar.Step > 0)
+ {
+ _startPosY -= ArmoredCar.Step;
+ }
+ break;
+ //вниз
+ case Direction.Down:
+ if (_startPosY + _carHeight + ArmoredCar.Step < _pictureHeight)
+ {
+ _startPosY += ArmoredCar.Step;
+ }
+ break;
+ }
+ }
+ ///
+ /// Отрисовка бронированной машины
+ ///
+ ///
+ public void DrawTransport(Graphics g)
+ {
+ if (_startPosX < 0 || _startPosY < 0
+ || !_pictureHeight.HasValue || !_pictureWidth.HasValue)
+ {
+ return;
+ }
+ Pen pen = new(Color.Black);
+
+
+ Brush br = new SolidBrush(ArmoredCar?.BodyColor ?? Color.Black);
+ g.FillRectangle(br, _startPosX + 20, _startPosY, 40, 20);
+ g.FillRectangle(br, _startPosX, _startPosY + 20, 80, 20);
+
+ g.FillEllipse(br, _startPosX, _startPosY + 30, 20, 20);
+
+ g.FillEllipse(br, _startPosX + 80 - 20, _startPosY + 30, 20, 20);
+
+ g.FillRectangle(br, _startPosX + 15, _startPosY + 20, 60, 30);
+
+ Brush brGray = new SolidBrush(Color.LightGray);
+ g.FillEllipse(brGray, _startPosX, _startPosY + 30, 20, 20);
+ g.FillEllipse(brGray, _startPosX + 30, _startPosY + 30, 20, 20);
+ g.FillEllipse(brGray, _startPosX + 80 - 20, _startPosY + 30, 20, 20);
+ }
+ ///
+ /// Смена границ формы отрисовки
+ ///
+ /// Ширина картинки
+ /// Высота картинки
+ public void ChangeBorders(int width, int height)
+ {
+ _pictureWidth = width;
+ _pictureHeight = height;
+ if (_pictureWidth <= _carWidth || _pictureHeight <= _carHeight)
+ {
+ _pictureWidth = null;
+ _pictureHeight = null;
+ return;
+ }
+ if (_startPosX + _carWidth > _pictureWidth)
+ {
+ _startPosX = _pictureWidth.Value - _carWidth;
+ }
+ if (_startPosY + _carHeight > _pictureHeight)
+ {
+ _startPosY = _pictureHeight.Value - _carHeight;
+ }
+ }
+
+ }
+}
diff --git a/ArmoredCar/ArmoredCar/EntityArmoredCar.cs b/ArmoredCar/ArmoredCar/EntityArmoredCar.cs
new file mode 100644
index 0000000..a63e8c2
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/EntityArmoredCar.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Text;
+
+namespace ArmoredCar
+{
+ internal class EntityArmoredCar
+ {
+ ///
+ /// Скорость
+ ///
+ public int Speed { get; private set; }
+ ///
+ /// Вес
+ ///
+ public float Weight { get; private set; }
+ ///
+ /// Цвет кузова
+ ///
+ public Color BodyColor { get; private set; }
+ ///
+ /// Шаг перемещения бронированной машины
+ ///
+ public float Step => Speed * 100 / Weight;
+ ///
+ /// Инициализация полей объекта-класса бронированной машины
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void Init(int speed, float weight, Color bodyColor)
+ {
+ Random rnd = new();
+ Speed = speed <= 0 ? rnd.Next(50, 150) : speed;
+ Weight = weight <= 0 ? rnd.Next(40, 70) : weight;
+ BodyColor = bodyColor;
+ }
+ }
+}
diff --git a/ArmoredCar/ArmoredCar/Form1.Designer.cs b/ArmoredCar/ArmoredCar/Form1.Designer.cs
deleted file mode 100644
index 7124a9c..0000000
--- a/ArmoredCar/ArmoredCar/Form1.Designer.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-
-namespace ArmoredCar
-{
- 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
- }
-}
-
diff --git a/ArmoredCar/ArmoredCar/Form1.cs b/ArmoredCar/ArmoredCar/Form1.cs
deleted file mode 100644
index 7dbac09..0000000
--- a/ArmoredCar/ArmoredCar/Form1.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace ArmoredCar
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
-
- }
-}
diff --git a/ArmoredCar/ArmoredCar/FormCar.Designer.cs b/ArmoredCar/ArmoredCar/FormCar.Designer.cs
new file mode 100644
index 0000000..834216f
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/FormCar.Designer.cs
@@ -0,0 +1,183 @@
+
+namespace ArmoredCar
+{
+ partial class FormCar
+ {
+ ///
+ /// 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.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusLabelBodyColor = new System.Windows.Forms.ToolStripStatusLabel();
+ this.pictureBoxCar = new System.Windows.Forms.PictureBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.buttonUp = new System.Windows.Forms.Button();
+ this.buttonLeft = new System.Windows.Forms.Button();
+ this.buttonDown = new System.Windows.Forms.Button();
+ this.buttonRight = new System.Windows.Forms.Button();
+ this.statusStrip1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).BeginInit();
+ this.SuspendLayout();
+ //
+ // statusStrip1
+ //
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatusLabelSpeed,
+ this.toolStripStatusLabelWeight,
+ this.toolStripStatusLabelBodyColor});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 428);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Size = new System.Drawing.Size(800, 22);
+ this.statusStrip1.TabIndex = 0;
+ this.statusStrip1.Text = "statusStrip1";
+ //
+ // toolStripStatusLabelSpeed
+ //
+ this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed";
+ this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(62, 17);
+ this.toolStripStatusLabelSpeed.Text = "Скорость:";
+ //
+ // toolStripStatusLabelWeight
+ //
+ this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight";
+ this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(32, 17);
+ this.toolStripStatusLabelWeight.Text = "Вес: ";
+ //
+ // toolStripStatusLabelBodyColor
+ //
+ this.toolStripStatusLabelBodyColor.Name = "toolStripStatusLabelBodyColor";
+ this.toolStripStatusLabelBodyColor.Size = new System.Drawing.Size(36, 17);
+ this.toolStripStatusLabelBodyColor.Text = "Цвет:";
+ //
+ // pictureBoxCar
+ //
+ this.pictureBoxCar.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBoxCar.Location = new System.Drawing.Point(0, 0);
+ this.pictureBoxCar.Name = "pictureBoxCar";
+ this.pictureBoxCar.Size = new System.Drawing.Size(800, 428);
+ this.pictureBoxCar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBoxCar.TabIndex = 6;
+ this.pictureBoxCar.TabStop = false;
+ this.pictureBoxCar.Resize += new System.EventHandler(this.PictureBoxCar_Resize);
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.button1.Location = new System.Drawing.Point(42, 382);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 7;
+ this.button1.Text = "Создать";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.ButtonCreate_Click);
+ //
+ // buttonUp
+ //
+ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonUp.BackgroundImage = global::ArmoredCar.Properties.Resources.Up;
+ this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonUp.Location = new System.Drawing.Point(692, 324);
+ this.buttonUp.Name = "buttonUp";
+ this.buttonUp.Size = new System.Drawing.Size(30, 30);
+ this.buttonUp.TabIndex = 8;
+ this.buttonUp.UseVisualStyleBackColor = true;
+ this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonLeft
+ //
+ this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonLeft.BackgroundImage = global::ArmoredCar.Properties.Resources.Left;
+ this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonLeft.Location = new System.Drawing.Point(656, 360);
+ this.buttonLeft.Name = "buttonLeft";
+ this.buttonLeft.Size = new System.Drawing.Size(30, 30);
+ this.buttonLeft.TabIndex = 9;
+ this.buttonLeft.UseVisualStyleBackColor = true;
+ this.buttonLeft.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::ArmoredCar.Properties.Resources.Down;
+ this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonDown.Location = new System.Drawing.Point(692, 360);
+ this.buttonDown.Name = "buttonDown";
+ this.buttonDown.Size = new System.Drawing.Size(30, 30);
+ this.buttonDown.TabIndex = 10;
+ this.buttonDown.UseVisualStyleBackColor = true;
+ this.buttonDown.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::ArmoredCar.Properties.Resources.Right;
+ this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonRight.Location = new System.Drawing.Point(728, 360);
+ this.buttonRight.Name = "buttonRight";
+ this.buttonRight.Size = new System.Drawing.Size(30, 30);
+ this.buttonRight.TabIndex = 11;
+ this.buttonRight.UseVisualStyleBackColor = true;
+ this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // FormCar
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.buttonRight);
+ this.Controls.Add(this.buttonDown);
+ this.Controls.Add(this.buttonLeft);
+ this.Controls.Add(this.buttonUp);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.pictureBoxCar);
+ this.Controls.Add(this.statusStrip1);
+ this.Name = "FormCar";
+ this.Text = "Бронированная машина";
+ this.statusStrip1.ResumeLayout(false);
+ this.statusStrip1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.StatusStrip statusStrip1;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelSpeed;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelWeight;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelBodyColor;
+ private System.Windows.Forms.PictureBox pictureBoxCar;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button buttonUp;
+ private System.Windows.Forms.Button buttonLeft;
+ private System.Windows.Forms.Button buttonDown;
+ private System.Windows.Forms.Button buttonRight;
+ }
+}
+
diff --git a/ArmoredCar/ArmoredCar/FormCar.cs b/ArmoredCar/ArmoredCar/FormCar.cs
new file mode 100644
index 0000000..9f5049c
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/FormCar.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ArmoredCar
+{
+ public partial class FormCar : Form
+ {
+ private DrawningArmoredCar _car;
+
+ public FormCar()
+ {
+ InitializeComponent();
+ }
+ ///
+ /// Метод прорисовки машины
+ ///
+ private void Draw()
+ {
+ Bitmap bmp = new(pictureBoxCar.Width, pictureBoxCar.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _car?.DrawTransport(gr);
+ pictureBoxCar.Image = bmp;
+ }
+ ///
+ /// Обработка нажатия кнопки "Создать"
+ ///
+ ///
+ ///
+ private void ButtonCreate_Click(object sender, EventArgs e)
+ {
+ Random rnd = new();
+ _car = new DrawningArmoredCar();
+ _car.Init(rnd.Next(100, 300), rnd.Next(1000, 2000),
+ Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
+ _car.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxCar.Width, pictureBoxCar.Height);
+
+ toolStripStatusLabelSpeed.Text = $"Скорость: {_car.ArmoredCar.Speed}";
+ toolStripStatusLabelWeight.Text = $"Вес: {_car.ArmoredCar.Weight}";
+ toolStripStatusLabelBodyColor.Text = $"Цвет: { _car.ArmoredCar.BodyColor.Name}";
+ Draw();
+ }
+ ///
+ /// Изменение размеров формы
+ ///
+ ///
+ ///
+ private void ButtonMove_Click(object sender, EventArgs e)
+ {
+ //получаем имя кнопки
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ switch (name)
+ {
+ case "buttonUp":
+ _car?.MoveTransport(Direction.Up);
+ break;
+ case "buttonDown":
+ _car?.MoveTransport(Direction.Down);
+ break;
+ case "buttonLeft":
+ _car?.MoveTransport(Direction.Left);
+ break;
+ case "buttonRight":
+ _car?.MoveTransport(Direction.Right);
+ break;
+ }
+ Draw();
+ }
+ ///
+ /// Изменение размеров формы
+ ///
+ ///
+ ///
+ private void PictureBoxCar_Resize(object sender, EventArgs e)
+ {
+ _car?.ChangeBorders(pictureBoxCar.Width, pictureBoxCar.Height);
+ Draw();
+ }
+ }
+}
diff --git a/ArmoredCar/ArmoredCar/FormCar.resx b/ArmoredCar/ArmoredCar/FormCar.resx
new file mode 100644
index 0000000..5cb320f
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/FormCar.resx
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/ArmoredCar/ArmoredCar/Program.cs b/ArmoredCar/ArmoredCar/Program.cs
index 830c888..d8b6012 100644
--- a/ArmoredCar/ArmoredCar/Program.cs
+++ b/ArmoredCar/ArmoredCar/Program.cs
@@ -17,7 +17,7 @@ namespace ArmoredCar
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
+ Application.Run(new FormCar());
}
}
}
diff --git a/ArmoredCar/ArmoredCar/Properties/Resources.Designer.cs b/ArmoredCar/ArmoredCar/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..9ee6e7c
--- /dev/null
+++ b/ArmoredCar/ArmoredCar/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace ArmoredCar.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("ArmoredCar.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 {
+ get {
+ object obj = ResourceManager.GetObject("Right", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap Up {
+ get {
+ object obj = ResourceManager.GetObject("Up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/ArmoredCar/ArmoredCar/Form1.resx b/ArmoredCar/ArmoredCar/Properties/Resources.resx
similarity index 84%
rename from ArmoredCar/ArmoredCar/Form1.resx
rename to ArmoredCar/ArmoredCar/Properties/Resources.resx
index 1af7de1..885b37b 100644
--- a/ArmoredCar/ArmoredCar/Form1.resx
+++ b/ArmoredCar/ArmoredCar/Properties/Resources.resx
@@ -117,4 +117,17 @@
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\Down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/ArmoredCar/ArmoredCar/Resources/Down.png b/ArmoredCar/ArmoredCar/Resources/Down.png
new file mode 100644
index 0000000..6097b20
Binary files /dev/null and b/ArmoredCar/ArmoredCar/Resources/Down.png differ
diff --git a/ArmoredCar/ArmoredCar/Resources/Left.png b/ArmoredCar/ArmoredCar/Resources/Left.png
new file mode 100644
index 0000000..ed93e34
Binary files /dev/null and b/ArmoredCar/ArmoredCar/Resources/Left.png differ
diff --git a/ArmoredCar/ArmoredCar/Resources/Right.png b/ArmoredCar/ArmoredCar/Resources/Right.png
new file mode 100644
index 0000000..e175b8b
Binary files /dev/null and b/ArmoredCar/ArmoredCar/Resources/Right.png differ
diff --git a/ArmoredCar/ArmoredCar/Resources/Up.png b/ArmoredCar/ArmoredCar/Resources/Up.png
new file mode 100644
index 0000000..0edecb5
Binary files /dev/null and b/ArmoredCar/ArmoredCar/Resources/Up.png differ