diff --git a/GasolineTanker/GasolineTanker/Direction.cs b/GasolineTanker/GasolineTanker/Direction.cs
new file mode 100644
index 0000000..8fd3c1c
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/Direction.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GasolineTanker
+{
+ internal enum Direction
+ {
+ Up = 1,
+ Down = 2,
+ Left = 3,
+ Right = 4,
+ }
+}
diff --git a/GasolineTanker/GasolineTanker/DrawingGasolineTanker.cs b/GasolineTanker/GasolineTanker/DrawingGasolineTanker.cs
new file mode 100644
index 0000000..20b1dea
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/DrawingGasolineTanker.cs
@@ -0,0 +1,125 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GasolineTanker
+{
+ internal class DrawingGasolineTanker
+ {
+ public EnityGasolineTanker GasolineTanker { get; private set; }
+ private float _startPosX;
+ private float _startPosY;
+ private int? _pictureWidth = null;
+ private int? _pictureHeight = null;
+ private readonly int _gasolineTankerWidth = 160;
+ private readonly int _gasolineTankerHeight = 55;
+
+ public void Init(int speed, float weight, Color bodyColor)
+ {
+ GasolineTanker = new EnityGasolineTanker();
+ GasolineTanker.Init(speed, weight, bodyColor);
+ }
+
+ public void SetPosition(int x, int y, int width, int height)
+ {
+ if (x >= 0 && x + _gasolineTankerWidth <= width && y >= 0 && y + _gasolineTankerHeight <= 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 + _gasolineTankerWidth + GasolineTanker.Step < _pictureWidth)
+ {
+ _startPosX += GasolineTanker.Step;
+ }
+ break;
+ //влево
+ case Direction.Left:
+ if (_startPosX - GasolineTanker.Step > 0)
+ {
+ _startPosX -= GasolineTanker.Step;
+ }
+ break;
+ //вверх
+ case Direction.Up:
+ if (_startPosY - GasolineTanker.Step > 0)
+ {
+ _startPosY -= GasolineTanker.Step;
+ }
+ break;
+ //вниз
+ case Direction.Down:
+ if (_startPosY + _gasolineTankerHeight + GasolineTanker.Step < _pictureHeight)
+ {
+ _startPosY += GasolineTanker.Step;
+ }
+ break;
+ }
+ }
+ public void DrawTransport(Graphics g)
+ {
+ if (_startPosX < 0 || _startPosY < 0
+ || !_pictureHeight.HasValue || !_pictureWidth.HasValue)
+ {
+ return;
+ }
+ Pen pen = new(Color.Black);
+
+ Brush brBlack = new SolidBrush(Color.Black);
+ g.FillEllipse(brBlack, _startPosX + 130, _startPosY + 35, 20, 20);
+ g.FillEllipse(brBlack, _startPosX + 10, _startPosY + 35, 20, 20);
+ g.FillEllipse(brBlack, _startPosX + 30, _startPosY + 35, 20, 20);
+
+ Brush brRed = new SolidBrush(Color.Red);
+ g.FillEllipse(brRed, _startPosX+5, _startPosY + 35, 10, 10);
+
+ Brush brYellow = new SolidBrush(Color.Yellow);
+ g.FillEllipse(brYellow, _startPosX + 140, _startPosY + 30, 10, 10);
+
+ Brush br = new SolidBrush(GasolineTanker?.BodyColor ?? Color.Black);
+ g.FillRectangle(br, _startPosX + 115, _startPosY+5, 40, 40);
+ g.FillRectangle(br, _startPosX + 10, _startPosY + 35, 140, 10);
+
+ Brush brBlue = new SolidBrush(Color.LightBlue);
+ g.FillRectangle(brBlue, _startPosX + 120, _startPosY + 10, 25, 25);
+
+ g.DrawRectangle(pen, _startPosX + 120, _startPosY + 10, 25, 25);
+ g.DrawRectangle(pen, _startPosX + 115, _startPosY + 5, 40, 40);
+ g.DrawRectangle(pen, _startPosX + 10, _startPosY + 35, 105, 10);
+ }
+ public void ChangeBorders(int width, int height)
+ {
+ _pictureWidth = width;
+ _pictureHeight = height;
+ if (_pictureWidth <= _gasolineTankerWidth || _pictureHeight <= _gasolineTankerHeight)
+ {
+ _pictureWidth = null;
+ _pictureHeight = null;
+ return;
+ }
+ if (_startPosX + _gasolineTankerWidth > _pictureWidth)
+ {
+ _startPosX = _pictureWidth.Value - _gasolineTankerWidth;
+ }
+ if (_startPosY + _gasolineTankerHeight > _pictureHeight)
+ {
+ _startPosY = _pictureHeight.Value - _gasolineTankerHeight;
+ }
+ }
+ }
+}
diff --git a/GasolineTanker/GasolineTanker/EnityGasolineTanker.cs b/GasolineTanker/GasolineTanker/EnityGasolineTanker.cs
new file mode 100644
index 0000000..e3f5b3b
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/EnityGasolineTanker.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GasolineTanker
+{
+ internal class EnityGasolineTanker
+ {
+ 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 Random();
+ Speed = speed <= 0 ? rnd.Next(50, 100) : speed;
+ Weight = weight <= 0 ? rnd.Next(30, 60) : weight;
+ BodyColor = bodyColor;
+ }
+ }
+}
diff --git a/GasolineTanker/GasolineTanker/Form1.Designer.cs b/GasolineTanker/GasolineTanker/Form1.Designer.cs
deleted file mode 100644
index 521f5d0..0000000
--- a/GasolineTanker/GasolineTanker/Form1.Designer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace GasolineTanker
-{
- 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/GasolineTanker/GasolineTanker/Form1.cs b/GasolineTanker/GasolineTanker/Form1.cs
deleted file mode 100644
index da846e9..0000000
--- a/GasolineTanker/GasolineTanker/Form1.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace GasolineTanker
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/FormGasolineTanker.Designer.cs b/GasolineTanker/GasolineTanker/FormGasolineTanker.Designer.cs
new file mode 100644
index 0000000..462148b
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/FormGasolineTanker.Designer.cs
@@ -0,0 +1,187 @@
+namespace GasolineTanker
+{
+ partial class FormGasolineTanker
+ {
+ ///
+ /// 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.pictureBoxGasolineTanker = new System.Windows.Forms.PictureBox();
+ this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.toolStripStatusSpeed = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusWeight = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusBodyColor = new System.Windows.Forms.ToolStripStatusLabel();
+ this.buttonCreate = new System.Windows.Forms.Button();
+ this.keyDown = new System.Windows.Forms.Button();
+ this.keyUp = new System.Windows.Forms.Button();
+ this.keyLeft = new System.Windows.Forms.Button();
+ this.keyRight = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxGasolineTanker)).BeginInit();
+ this.statusStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // pictureBoxGasolineTanker
+ //
+ this.pictureBoxGasolineTanker.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBoxGasolineTanker.Location = new System.Drawing.Point(0, 0);
+ this.pictureBoxGasolineTanker.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.pictureBoxGasolineTanker.Name = "pictureBoxGasolineTanker";
+ this.pictureBoxGasolineTanker.Size = new System.Drawing.Size(922, 574);
+ this.pictureBoxGasolineTanker.TabIndex = 0;
+ this.pictureBoxGasolineTanker.TabStop = false;
+ //
+ // statusStrip1
+ //
+ this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatusSpeed,
+ this.toolStripStatusWeight,
+ this.toolStripStatusBodyColor});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 574);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
+ this.statusStrip1.Size = new System.Drawing.Size(922, 26);
+ this.statusStrip1.TabIndex = 1;
+ this.statusStrip1.Text = "statusStrip1";
+ //
+ // toolStripStatusSpeed
+ //
+ this.toolStripStatusSpeed.Name = "toolStripStatusSpeed";
+ this.toolStripStatusSpeed.Size = new System.Drawing.Size(51, 20);
+ this.toolStripStatusSpeed.Text = "Speed";
+ //
+ // toolStripStatusWeight
+ //
+ this.toolStripStatusWeight.Name = "toolStripStatusWeight";
+ this.toolStripStatusWeight.Size = new System.Drawing.Size(56, 20);
+ this.toolStripStatusWeight.Text = "Weight";
+ //
+ // toolStripStatusBodyColor
+ //
+ this.toolStripStatusBodyColor.Name = "toolStripStatusBodyColor";
+ this.toolStripStatusBodyColor.Size = new System.Drawing.Size(45, 20);
+ this.toolStripStatusBodyColor.Text = "Color";
+ //
+ // 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(14, 524);
+ this.buttonCreate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.buttonCreate.Name = "buttonCreate";
+ this.buttonCreate.Size = new System.Drawing.Size(86, 31);
+ this.buttonCreate.TabIndex = 2;
+ this.buttonCreate.Text = "Create";
+ this.buttonCreate.UseVisualStyleBackColor = true;
+ this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click_1);
+ //
+ // keyDown
+ //
+ this.keyDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.keyDown.BackgroundImage = global::GasolineTanker.Properties.Resources.KeyDown;
+ this.keyDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.keyDown.Location = new System.Drawing.Point(827, 515);
+ this.keyDown.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.keyDown.Name = "keyDown";
+ this.keyDown.Size = new System.Drawing.Size(34, 40);
+ this.keyDown.TabIndex = 3;
+ this.keyDown.UseVisualStyleBackColor = true;
+ this.keyDown.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // keyUp
+ //
+ this.keyUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.keyUp.BackgroundImage = global::GasolineTanker.Properties.Resources.KeyUp;
+ this.keyUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.keyUp.Location = new System.Drawing.Point(827, 467);
+ this.keyUp.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.keyUp.Name = "keyUp";
+ this.keyUp.Size = new System.Drawing.Size(34, 40);
+ this.keyUp.TabIndex = 4;
+ this.keyUp.UseVisualStyleBackColor = true;
+ this.keyUp.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // keyLeft
+ //
+ this.keyLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.keyLeft.BackgroundImage = global::GasolineTanker.Properties.Resources.KeyLeft;
+ this.keyLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.keyLeft.Location = new System.Drawing.Point(786, 515);
+ this.keyLeft.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.keyLeft.Name = "keyLeft";
+ this.keyLeft.Size = new System.Drawing.Size(34, 40);
+ this.keyLeft.TabIndex = 5;
+ this.keyLeft.UseVisualStyleBackColor = true;
+ this.keyLeft.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // keyRight
+ //
+ this.keyRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.keyRight.BackgroundImage = global::GasolineTanker.Properties.Resources.KeyRight;
+ this.keyRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.keyRight.Location = new System.Drawing.Point(868, 515);
+ this.keyRight.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.keyRight.Name = "keyRight";
+ this.keyRight.Size = new System.Drawing.Size(34, 40);
+ this.keyRight.TabIndex = 6;
+ this.keyRight.UseVisualStyleBackColor = true;
+ this.keyRight.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // FormGasolineTanker
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(922, 600);
+ this.Controls.Add(this.keyRight);
+ this.Controls.Add(this.keyLeft);
+ this.Controls.Add(this.keyUp);
+ this.Controls.Add(this.keyDown);
+ this.Controls.Add(this.buttonCreate);
+ this.Controls.Add(this.pictureBoxGasolineTanker);
+ this.Controls.Add(this.statusStrip1);
+ this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.Name = "FormGasolineTanker";
+ this.Text = "Gasoline tanker";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxGasolineTanker)).EndInit();
+ this.statusStrip1.ResumeLayout(false);
+ this.statusStrip1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private PictureBox pictureBoxGasolineTanker;
+ private StatusStrip statusStrip1;
+ private ToolStripStatusLabel toolStripStatusSpeed;
+ private ToolStripStatusLabel toolStripStatusWeight;
+ private ToolStripStatusLabel toolStripStatusBodyColor;
+ private Button buttonCreate;
+ private Button keyDown;
+ private Button keyUp;
+ private Button keyLeft;
+ private Button keyRight;
+ }
+}
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/FormGasolineTanker.cs b/GasolineTanker/GasolineTanker/FormGasolineTanker.cs
new file mode 100644
index 0000000..46d150d
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/FormGasolineTanker.cs
@@ -0,0 +1,63 @@
+namespace GasolineTanker
+{
+ public partial class FormGasolineTanker : Form
+ {
+ private DrawingGasolineTanker _gasolineTanker;
+ public FormGasolineTanker()
+ {
+ InitializeComponent();
+ }
+ private void Draw()
+ {
+ Bitmap bmp = new(pictureBoxGasolineTanker.Width, pictureBoxGasolineTanker.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _gasolineTanker?.DrawTransport(gr);
+ pictureBoxGasolineTanker.Image = bmp;
+ }
+ private void PictureBoxCar_Resize(object sender, EventArgs e)
+ {
+ _gasolineTanker?.ChangeBorders(pictureBoxGasolineTanker.Width, pictureBoxGasolineTanker.Height);
+ Draw();
+ }
+
+ private void buttonCreate_Click_1(object sender, EventArgs e)
+ {
+ Random rnd = new();
+ _gasolineTanker = new DrawingGasolineTanker();
+ _gasolineTanker.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
+ _gasolineTanker.SetPosition(rnd.Next(10, 100),rnd.Next(50, 100), pictureBoxGasolineTanker.Width, pictureBoxGasolineTanker.Height);
+ toolStripStatusSpeed.Text = $"Speed {_gasolineTanker.GasolineTanker.Speed}";
+ toolStripStatusWeight.Text = $"Weight {_gasolineTanker.GasolineTanker.Weight}";
+ toolStripStatusBodyColor.Text = $"Color {_gasolineTanker.GasolineTanker.BodyColor.Name}";
+ Draw();
+ }
+
+ private void ButtonMove_Click(object sender, EventArgs e)
+ {
+ //
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ switch (name)
+ {
+ case "keyUp":
+ _gasolineTanker?.MoveTransport(Direction.Up);
+ break;
+ case "keyDown":
+ _gasolineTanker?.MoveTransport(Direction.Down);
+ break;
+ case "keyLeft":
+ _gasolineTanker?.MoveTransport(Direction.Left);
+ break;
+ case "keyRight":
+ _gasolineTanker?.MoveTransport(Direction.Right);
+ break;
+ }
+ Draw();
+ }
+
+ private void PictureBoxGasolineTanker_Resize(object sender, EventArgs e)
+ {
+ _gasolineTanker?.ChangeBorders(pictureBoxGasolineTanker.Width, pictureBoxGasolineTanker.Height);
+ Draw();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/FormGasolineTanker.resx b/GasolineTanker/GasolineTanker/FormGasolineTanker.resx
new file mode 100644
index 0000000..5cb320f
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/FormGasolineTanker.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/GasolineTanker/GasolineTanker/GasolineTanker.csproj b/GasolineTanker/GasolineTanker/GasolineTanker.csproj
index b57c89e..13ee123 100644
--- a/GasolineTanker/GasolineTanker/GasolineTanker.csproj
+++ b/GasolineTanker/GasolineTanker/GasolineTanker.csproj
@@ -8,4 +8,19 @@
enable
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/Program.cs b/GasolineTanker/GasolineTanker/Program.cs
index feb86c7..1b6a3e0 100644
--- a/GasolineTanker/GasolineTanker/Program.cs
+++ b/GasolineTanker/GasolineTanker/Program.cs
@@ -11,7 +11,7 @@ namespace GasolineTanker
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
- Application.Run(new Form1());
+ Application.Run(new FormGasolineTanker());
}
}
}
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/Properties/Resources.Designer.cs b/GasolineTanker/GasolineTanker/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..af947f3
--- /dev/null
+++ b/GasolineTanker/GasolineTanker/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace GasolineTanker.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("GasolineTanker.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 KeyDown {
+ get {
+ object obj = ResourceManager.GetObject("KeyDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap KeyLeft {
+ get {
+ object obj = ResourceManager.GetObject("KeyLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap KeyRight {
+ get {
+ object obj = ResourceManager.GetObject("KeyRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap KeyUp {
+ get {
+ object obj = ResourceManager.GetObject("KeyUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/GasolineTanker/GasolineTanker/Form1.resx b/GasolineTanker/GasolineTanker/Properties/Resources.resx
similarity index 83%
rename from GasolineTanker/GasolineTanker/Form1.resx
rename to GasolineTanker/GasolineTanker/Properties/Resources.resx
index 1af7de1..3cca124 100644
--- a/GasolineTanker/GasolineTanker/Form1.resx
+++ b/GasolineTanker/GasolineTanker/Properties/Resources.resx
@@ -117,4 +117,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\KeyDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\KeyLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\KeyRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\KeyUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/GasolineTanker/GasolineTanker/Resources/KeyDown.png b/GasolineTanker/GasolineTanker/Resources/KeyDown.png
new file mode 100644
index 0000000..ff09b70
Binary files /dev/null and b/GasolineTanker/GasolineTanker/Resources/KeyDown.png differ
diff --git a/GasolineTanker/GasolineTanker/Resources/KeyLeft.png b/GasolineTanker/GasolineTanker/Resources/KeyLeft.png
new file mode 100644
index 0000000..b64110a
Binary files /dev/null and b/GasolineTanker/GasolineTanker/Resources/KeyLeft.png differ
diff --git a/GasolineTanker/GasolineTanker/Resources/KeyRight.png b/GasolineTanker/GasolineTanker/Resources/KeyRight.png
new file mode 100644
index 0000000..478e541
Binary files /dev/null and b/GasolineTanker/GasolineTanker/Resources/KeyRight.png differ
diff --git a/GasolineTanker/GasolineTanker/Resources/KeyUp.png b/GasolineTanker/GasolineTanker/Resources/KeyUp.png
new file mode 100644
index 0000000..0e4bf6f
Binary files /dev/null and b/GasolineTanker/GasolineTanker/Resources/KeyUp.png differ