From 83aacea763f8b1f1e8639f19f71c33fbb0ba5a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D1=82=D1=8F=20=D0=98=D1=85=D0=BE=D0=BD=D0=BA?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0?= Date: Thu, 8 Sep 2022 22:40:02 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MotorBoat/MotorBoat/Direction.cs | 16 ++ MotorBoat/MotorBoat/DrawningMotorBoat.cs | 123 +++++++++++++ MotorBoat/MotorBoat/EntityMotorBoat.cs | 24 +++ MotorBoat/MotorBoat/Form1.Designer.cs | 39 ---- MotorBoat/MotorBoat/Form1.cs | 10 - MotorBoat/MotorBoat/FormMotorBoat.Designer.cs | 174 ++++++++++++++++++ MotorBoat/MotorBoat/FormMotorBoat.cs | 66 +++++++ MotorBoat/MotorBoat/FormMotorBoat.resx | 63 +++++++ MotorBoat/MotorBoat/MotorBoat.csproj | 15 ++ MotorBoat/MotorBoat/Program.cs | 2 +- .../Properties/Resources.Designer.cs | 103 +++++++++++ .../{Form1.resx => Properties/Resources.resx} | 13 ++ MotorBoat/MotorBoat/Resources/d.png | Bin 0 -> 407 bytes MotorBoat/MotorBoat/Resources/left.png | Bin 0 -> 463 bytes MotorBoat/MotorBoat/Resources/r.png | Bin 0 -> 413 bytes MotorBoat/MotorBoat/Resources/up.png | Bin 0 -> 446 bytes 16 files changed, 598 insertions(+), 50 deletions(-) create mode 100644 MotorBoat/MotorBoat/Direction.cs create mode 100644 MotorBoat/MotorBoat/DrawningMotorBoat.cs create mode 100644 MotorBoat/MotorBoat/EntityMotorBoat.cs delete mode 100644 MotorBoat/MotorBoat/Form1.Designer.cs delete mode 100644 MotorBoat/MotorBoat/Form1.cs create mode 100644 MotorBoat/MotorBoat/FormMotorBoat.Designer.cs create mode 100644 MotorBoat/MotorBoat/FormMotorBoat.cs create mode 100644 MotorBoat/MotorBoat/FormMotorBoat.resx create mode 100644 MotorBoat/MotorBoat/Properties/Resources.Designer.cs rename MotorBoat/MotorBoat/{Form1.resx => Properties/Resources.resx} (84%) create mode 100644 MotorBoat/MotorBoat/Resources/d.png create mode 100644 MotorBoat/MotorBoat/Resources/left.png create mode 100644 MotorBoat/MotorBoat/Resources/r.png create mode 100644 MotorBoat/MotorBoat/Resources/up.png diff --git a/MotorBoat/MotorBoat/Direction.cs b/MotorBoat/MotorBoat/Direction.cs new file mode 100644 index 0000000..f98bc7f --- /dev/null +++ b/MotorBoat/MotorBoat/Direction.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MotorBoat +{ + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/MotorBoat/MotorBoat/DrawningMotorBoat.cs b/MotorBoat/MotorBoat/DrawningMotorBoat.cs new file mode 100644 index 0000000..1764659 --- /dev/null +++ b/MotorBoat/MotorBoat/DrawningMotorBoat.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MotorBoat +{ + class DrawningMotorBoat + { + public EntityMotorBoat Boat { get; private set; } + + private float _startPosX; + private float _startPosY; + + private int? _pictureWidth = null; + private int? _pictureHeight = null; + + private readonly int _boatWidth = 70; + private readonly int _boatHeight = 40; + public void Init(int speed, float weight, Color bodyColor) + { + Boat = new EntityMotorBoat(); + Boat.Init(speed, weight, bodyColor); + } + public void SetPosition(int x, int y, int width, int height) + { + // TODO checks + _startPosX = x; + _startPosY = y; + _pictureWidth = width; + _pictureHeight = height; + if (_startPosX + _boatWidth > _pictureWidth) { _startPosX = 10; } + if (_startPosY - _boatHeight < 0) { _startPosY = _boatHeight + 10; } + if (_startPosY + _boatHeight > _pictureHeight) { _startPosY -= _boatHeight; } + } + public void MoveBoats(Direction direction) + { + if (!_pictureWidth.HasValue || !_pictureHeight.HasValue) + { + return; + } + switch (direction) + { + // вправо + case Direction.Right: + if (_startPosX + _boatWidth + Boat.Step < _pictureWidth) + { + _startPosX += Boat.Step; + } + break; + //влево + case Direction.Left: + if (_startPosX - Boat.Step > 0) + { + _startPosX -= Boat.Step; + } + break; + //вверх + case Direction.Up: + if (_startPosY - _boatHeight - Boat.Step > 0) + { + _startPosY -= Boat.Step; + } + break; + //вниз + case Direction.Down: + if (_startPosY + _boatHeight + Boat.Step < _pictureHeight) + { + _startPosY += Boat.Step; + } + break; + } + } + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + Pen pen = new Pen(Color.Black); + //границы лодки + Point[] points = new Point[5] + { + new Point(Convert.ToInt32(_startPosX),Convert.ToInt32(_startPosY)), + new Point(Convert.ToInt32(_startPosX + 50),Convert.ToInt32(_startPosY)), + new Point(Convert.ToInt32(_startPosX + 70),Convert.ToInt32(_startPosY - 20)), + new Point(Convert.ToInt32(_startPosX + 50),Convert.ToInt32(_startPosY - 40)), + new Point(Convert.ToInt32(_startPosX),Convert.ToInt32(_startPosY-40)), + }; + + g.DrawPolygon(pen, points); + Brush brBody = new SolidBrush(Boat?.BodyColor ?? Color.Black); + g.FillPolygon(brBody, points); + + g.DrawEllipse(pen, _startPosX + 5, _startPosY - 30, 50, 20); + Brush brYellow = new SolidBrush(Color.Yellow); + g.FillEllipse(brYellow, _startPosX + 5, _startPosY - 30, 50, 20); + + } + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_pictureWidth <= _boatWidth || _pictureHeight <= _boatHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + if (_startPosX + _boatWidth > _pictureWidth) + { + _startPosX = _pictureWidth.Value - _boatWidth; + } + if (_startPosY + _boatHeight > _pictureHeight) + { + _startPosY = _pictureHeight.Value - _boatHeight; + } + } + } +} diff --git a/MotorBoat/MotorBoat/EntityMotorBoat.cs b/MotorBoat/MotorBoat/EntityMotorBoat.cs new file mode 100644 index 0000000..c9daad9 --- /dev/null +++ b/MotorBoat/MotorBoat/EntityMotorBoat.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MotorBoat +{ + class EntityMotorBoat + { + 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, 150) : speed; + Weight = weight <= 0 ? rnd.Next(40, 70) : weight; + BodyColor = bodyColor; + } + } +} diff --git a/MotorBoat/MotorBoat/Form1.Designer.cs b/MotorBoat/MotorBoat/Form1.Designer.cs deleted file mode 100644 index 4b86bb4..0000000 --- a/MotorBoat/MotorBoat/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace MotorBoat -{ - 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/MotorBoat/MotorBoat/Form1.cs b/MotorBoat/MotorBoat/Form1.cs deleted file mode 100644 index 240dc5e..0000000 --- a/MotorBoat/MotorBoat/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace MotorBoat -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/MotorBoat/MotorBoat/FormMotorBoat.Designer.cs b/MotorBoat/MotorBoat/FormMotorBoat.Designer.cs new file mode 100644 index 0000000..7864291 --- /dev/null +++ b/MotorBoat/MotorBoat/FormMotorBoat.Designer.cs @@ -0,0 +1,174 @@ +namespace MotorBoat +{ + partial class FormMotorBoat + { + /// + /// 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.pictureBoxMotorBoat = new System.Windows.Forms.PictureBox(); + 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.buttonUp = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMotorBoat)).BeginInit(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // pictureBoxMotorBoat + // + this.pictureBoxMotorBoat.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxMotorBoat.Location = new System.Drawing.Point(0, 0); + this.pictureBoxMotorBoat.Name = "pictureBoxMotorBoat"; + this.pictureBoxMotorBoat.Size = new System.Drawing.Size(800, 428); + this.pictureBoxMotorBoat.TabIndex = 0; + this.pictureBoxMotorBoat.TabStop = false; + // + // 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 = 1; + 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(29, 17); + this.toolStripStatusLabelWeight.Text = "Вес:"; + // + // toolStripStatusLabelBodyColor + // + this.toolStripStatusLabelBodyColor.Name = "toolStripStatusLabelBodyColor"; + this.toolStripStatusLabelBodyColor.Size = new System.Drawing.Size(36, 17); + this.toolStripStatusLabelBodyColor.Text = "Цвет:"; + // + // buttonUp + // + this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUp.Image = global::MotorBoat.Properties.Resources.r; + this.buttonUp.Location = new System.Drawing.Point(681, 327); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(40, 40); + this.buttonUp.TabIndex = 2; + 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.Image = global::MotorBoat.Properties.Resources.up; + this.buttonRight.Location = new System.Drawing.Point(727, 373); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(40, 40); + this.buttonRight.TabIndex = 3; + 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.Image = global::MotorBoat.Properties.Resources.d; + this.buttonDown.Location = new System.Drawing.Point(681, 373); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(40, 40); + this.buttonDown.TabIndex = 4; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click); + // + // 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(8, 390); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(75, 23); + this.buttonCreate.TabIndex = 6; + 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.Image = global::MotorBoat.Properties.Resources.left; + this.buttonLeft.Location = new System.Drawing.Point(635, 373); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(40, 40); + this.buttonLeft.TabIndex = 2; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click); + // + // FormMotorBoat + // + 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.buttonCreate); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.pictureBoxMotorBoat); + this.Controls.Add(this.statusStrip1); + this.Name = "FormMotorBoat"; + this.Text = "Моторная лодка"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMotorBoat)).EndInit(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private PictureBox pictureBoxMotorBoat; + private StatusStrip statusStrip1; + private ToolStripStatusLabel toolStripStatusLabelSpeed; + private ToolStripStatusLabel toolStripStatusLabelWeight; + private ToolStripStatusLabel toolStripStatusLabelBodyColor; + private Button buttonUp; + private Button buttonRight; + private Button buttonDown; + private Button buttonCreate; + private Button buttonLeft; + } +} \ No newline at end of file diff --git a/MotorBoat/MotorBoat/FormMotorBoat.cs b/MotorBoat/MotorBoat/FormMotorBoat.cs new file mode 100644 index 0000000..191ebe1 --- /dev/null +++ b/MotorBoat/MotorBoat/FormMotorBoat.cs @@ -0,0 +1,66 @@ +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 MotorBoat +{ + public partial class FormMotorBoat : Form + { + private DrawningMotorBoat _boat; + public FormMotorBoat() + { + InitializeComponent(); + } + + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random rnd = new Random(); + _boat = new DrawningMotorBoat(); + _boat.Init(rnd.Next(100, 300), rnd.Next(100, 200), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + _boat.SetPosition(rnd.Next(10, 100), rnd.Next(pictureBoxMotorBoat.Height - 100, pictureBoxMotorBoat.Height), pictureBoxMotorBoat.Width, pictureBoxMotorBoat.Height); + toolStripStatusLabelSpeed.Text = $": {_boat.Boat.Speed}"; + toolStripStatusLabelWeight.Text = $": {_boat.Boat.Weight}"; + toolStripStatusLabelBodyColor.Text = $": {_boat.Boat.BodyColor.Name}"; + Draw(); + } + private void Draw() + { + Bitmap bmp = new Bitmap(pictureBoxMotorBoat.Width, pictureBoxMotorBoat.Height); + Graphics gr = Graphics.FromImage(bmp); + _boat?.DrawTransport(gr); + pictureBoxMotorBoat.Image = bmp; + } + private void ButtonMove_Click(object sender, EventArgs e) + { + // + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _boat?.MoveBoats(Direction.Up); + break; + case "buttonDown": + _boat?.MoveBoats(Direction.Down); + break; + case "buttonLeft": + _boat?.MoveBoats(Direction.Left); + break; + case "buttonRight": + _boat?.MoveBoats(Direction.Right); + break; + } + Draw(); + } + private void PictureBoxCar_Resize(object sender, EventArgs e) + { + _boat?.ChangeBorders(pictureBoxMotorBoat.Width, pictureBoxMotorBoat.Height); + Draw(); + } + } +} diff --git a/MotorBoat/MotorBoat/FormMotorBoat.resx b/MotorBoat/MotorBoat/FormMotorBoat.resx new file mode 100644 index 0000000..5cb320f --- /dev/null +++ b/MotorBoat/MotorBoat/FormMotorBoat.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/MotorBoat/MotorBoat/MotorBoat.csproj b/MotorBoat/MotorBoat/MotorBoat.csproj index b57c89e..13ee123 100644 --- a/MotorBoat/MotorBoat/MotorBoat.csproj +++ b/MotorBoat/MotorBoat/MotorBoat.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/MotorBoat/MotorBoat/Program.cs b/MotorBoat/MotorBoat/Program.cs index 974f0ab..83aea91 100644 --- a/MotorBoat/MotorBoat/Program.cs +++ b/MotorBoat/MotorBoat/Program.cs @@ -11,7 +11,7 @@ namespace MotorBoat // 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 FormMotorBoat()); } } } \ No newline at end of file diff --git a/MotorBoat/MotorBoat/Properties/Resources.Designer.cs b/MotorBoat/MotorBoat/Properties/Resources.Designer.cs new file mode 100644 index 0000000..bdea466 --- /dev/null +++ b/MotorBoat/MotorBoat/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace MotorBoat.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("MotorBoat.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 d { + get { + object obj = ResourceManager.GetObject("d", 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 r { + get { + object obj = ResourceManager.GetObject("r", 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/MotorBoat/MotorBoat/Form1.resx b/MotorBoat/MotorBoat/Properties/Resources.resx similarity index 84% rename from MotorBoat/MotorBoat/Form1.resx rename to MotorBoat/MotorBoat/Properties/Resources.resx index 1af7de1..bf205f7 100644 --- a/MotorBoat/MotorBoat/Form1.resx +++ b/MotorBoat/MotorBoat/Properties/Resources.resx @@ -117,4 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\d.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\r.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 + \ No newline at end of file diff --git a/MotorBoat/MotorBoat/Resources/d.png b/MotorBoat/MotorBoat/Resources/d.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e74ad26da962539bbc909637518ea6f876350e GIT binary patch literal 407 zcmV;I0cie-P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0W3*GK~z{r-IzfR zf-n$8iwos4UV%$^A@^LvYp~#2CPe4!Z>$1krlk>m$%I;_!%MLRt!{$b06QMPj%h}! zs$$EA<`U)^IZL3dHnbGIHCG-r6cst}sG<0mwP_l*;uII@`<|^h#YME3M2hZx*heg2 zh%8|=7Q<5hH*bvv>mL07GXmt+v$f1NX9Q2zsR-%1jx9UU+Rw%F0$o_17n}+L{XR6y zH_S(%&&S^P1-ySENYd^VDe)-*#yvt^*N@~9GE)*@x|ggiGbaJ&&j@YXJ_fHLgF3@7 zu<{tmih}~VGQLKP_*s%8qmcm186-tUD*<#_#3Eyn0QyX#k+DhuTQ-Twq(}h!2r?&= zA_1~~g!_k<$hf1#Ng}me)@wj`(Hse|k-sIJy8{~6Dc&11rpo{T002ovPDHLkV1n6A BqO|}3 literal 0 HcmV?d00001 diff --git a/MotorBoat/MotorBoat/Resources/left.png b/MotorBoat/MotorBoat/Resources/left.png new file mode 100644 index 0000000000000000000000000000000000000000..2ec2c67a64604d70524350b264ba2f685d82f4f1 GIT binary patch literal 463 zcmV;=0WkiFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0c1%;K~z{r&6Znk zgD?<94L=e4=sNgeVQs%zOP9dDP$ZQ44h#xo#@Not$&s#j`Ef7?+&nz4kfv$e3)K&_ z+cq0WSduN$bsb6kY{yn)i_G&(5?||~9hf62jN^#O@bD6t6_kwXmn5}>4y6QARYa4Z z7!qwQCSf@mKy58L5qKDxAA;RDg(H@6YM7P9#rj`Vviqw=q&P3>OVLpJ^bG1aBBiQ_5w^Ful5A1IZ ztu3%qfwK|W|Gv0@0?0c!ECbl`9WudsBvpn-Po|X9g;A;u%5fMe_ME$qhPpyam0_Nx zWct3RGB+Qsy~|ZR|9fO1oV}=;g*qY(cP8(|PGRLz1VCn4mOzF_%Yq~k(6%iJ*>!y+ zS%hI3Ogu}nMF3=CuVM*BB7i5c6~!XJQsyNQOFl%zxqodq<>j|csbByA002ovPDHLk FV1o2Qx$*!2 literal 0 HcmV?d00001 diff --git a/MotorBoat/MotorBoat/Resources/r.png b/MotorBoat/MotorBoat/Resources/r.png new file mode 100644 index 0000000000000000000000000000000000000000..8fceff9519e5004103da2be36dbe6a05909befd0 GIT binary patch literal 413 zcmV;O0b>4%P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0WwKMK~z{r-IzfR zf-n$8!G+-<-h%}flQn1Y2yD2O3!*b+hCnUtblN81OMYl@TArm^wEh6q3AoWwMP1ib z55Z$9Y7xBni`q!C4BnbpOt(#*5ImH_J zx~`+vf@^HdmZayAoQOqoJpA~$-i#pnRTJhkGlHvEgeesUKfPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0aHmtK~z{r#gm#)sPXZ}I^NC#>lQ_Hwa0_3=ka6E~s6K`< zLK3G50I8NMajJmupb&{B0-qG`TbD}0nC=NdiK*GbzyN zNhNZVgKB~O?2jY|ssfUHo@X9SQ~geer{_-X7X=AmLO7g_%71|*ABMqvKY~gHKL1eMRf##mH+?%07*qoM6N<$g26$tSO5S3 literal 0 HcmV?d00001