From 0002354055e2b8cb79f0fd1a4bc05277f21af593 Mon Sep 17 00:00:00 2001 From: crum61kg Date: Sun, 2 Oct 2022 21:12:23 +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 --- WarmlyShip/WarmlyShip/Direction.cs | 19 ++ WarmlyShip/WarmlyShip/DrawningShip.cs | 191 ++++++++++++++++++ WarmlyShip/WarmlyShip/EntityShip.cs | 46 +++++ WarmlyShip/WarmlyShip/Form1.Designer.cs | 39 ---- WarmlyShip/WarmlyShip/Form1.cs | 10 - WarmlyShip/WarmlyShip/FormShip.Designer.cs | 181 +++++++++++++++++ WarmlyShip/WarmlyShip/FormShip.cs | 76 +++++++ WarmlyShip/WarmlyShip/FormShip.resx | 63 ++++++ WarmlyShip/WarmlyShip/Program.cs | 2 +- .../Properties/Resources.Designer.cs | 103 ++++++++++ .../{Form1.resx => Properties/Resources.resx} | 13 ++ WarmlyShip/WarmlyShip/Resources/Down.png | Bin 0 -> 1356 bytes WarmlyShip/WarmlyShip/Resources/Left.png | Bin 0 -> 1388 bytes WarmlyShip/WarmlyShip/Resources/Right.png | Bin 0 -> 1356 bytes WarmlyShip/WarmlyShip/Resources/Up.png | Bin 0 -> 1356 bytes WarmlyShip/WarmlyShip/WarmlyShip.csproj | 15 ++ 16 files changed, 708 insertions(+), 50 deletions(-) create mode 100644 WarmlyShip/WarmlyShip/Direction.cs create mode 100644 WarmlyShip/WarmlyShip/DrawningShip.cs create mode 100644 WarmlyShip/WarmlyShip/EntityShip.cs delete mode 100644 WarmlyShip/WarmlyShip/Form1.Designer.cs delete mode 100644 WarmlyShip/WarmlyShip/Form1.cs create mode 100644 WarmlyShip/WarmlyShip/FormShip.Designer.cs create mode 100644 WarmlyShip/WarmlyShip/FormShip.cs create mode 100644 WarmlyShip/WarmlyShip/FormShip.resx create mode 100644 WarmlyShip/WarmlyShip/Properties/Resources.Designer.cs rename WarmlyShip/WarmlyShip/{Form1.resx => Properties/Resources.resx} (84%) create mode 100644 WarmlyShip/WarmlyShip/Resources/Down.png create mode 100644 WarmlyShip/WarmlyShip/Resources/Left.png create mode 100644 WarmlyShip/WarmlyShip/Resources/Right.png create mode 100644 WarmlyShip/WarmlyShip/Resources/Up.png diff --git a/WarmlyShip/WarmlyShip/Direction.cs b/WarmlyShip/WarmlyShip/Direction.cs new file mode 100644 index 0000000..31f6e76 --- /dev/null +++ b/WarmlyShip/WarmlyShip/Direction.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WarmlyShip +{ + /// + /// Направление перемещения + /// + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/WarmlyShip/WarmlyShip/DrawningShip.cs b/WarmlyShip/WarmlyShip/DrawningShip.cs new file mode 100644 index 0000000..17629e9 --- /dev/null +++ b/WarmlyShip/WarmlyShip/DrawningShip.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WarmlyShip +{ + /// + /// Класс, отвечающий за прорисовку и перемещение объекта-сущности + /// + internal class DrawningShip + { + /// > + /// Класс-сущность + /// + public EntityShip Ship { get; private set; } + /// + /// Левая координата отрисовки корабля + /// + private float _startPosX; + /// + /// Верхняя кооридната отрисовки корабля + /// + private float _startPosY; + /// + /// Ширина окна отрисовки + /// + private int? _pictureWidth = null; + /// + /// Высота окна отрисовки + /// + private int? _pictureHeight = null; + /// + /// Ширина отрисовки корабля + /// + private readonly int _shipWidth = 100; + /// + /// Высота отрисовки корабля + /// + private readonly int _shipHeight = 40; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес корабля + /// Цвет палубы + public void Init(int speed, float weight, Color bodyColor) + { + Ship = new EntityShip(); + Ship.Init(speed, weight, bodyColor); + } + + /// + /// Установка позиции корабля + /// + /// Координата X + /// Координата Y + /// Ширина картинки + /// Высота картинки + public void SetPosition(int x, int y, int width, int height) + { + if (x < 0 || y < 0 || width < x + _shipWidth || height < y + _shipHeight) + { + _pictureHeight = null; + _pictureWidth = null; + return; + } + _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 + _shipWidth + Ship.Step < _pictureWidth) + { + _startPosX += Ship.Step; + } + break; + //влево + case Direction.Left: + if (_startPosX - Ship.Step > 0) + { + _startPosX -= Ship.Step; + } + break; + //вверх + case Direction.Up: + if (_startPosY - Ship.Step > 0 ) + { + _startPosY -= Ship.Step; + } + break; + //вниз + case Direction.Down: + if (_startPosY + _shipHeight + Ship.Step < _pictureHeight) + { + _startPosY += Ship.Step; + } + break; + } + } + /// + /// Отрисовка корабля + /// + /// + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + + //нижняя часть + PointF[] P = + { + new Point((int)(_startPosX + 20),(int) _startPosY + 40), + new Point((int)_startPosX, (int)_startPosY + 20), + new Point( (int) _startPosX + 100,(int) _startPosY + 20), + new Point((int) _startPosX + 80, (int) _startPosY + 40), + new Point((int) _startPosX+ 20, (int) _startPosY + 40), + + }; + Brush br = new SolidBrush(Ship?.BodyColor ?? Color.Black); + g.FillPolygon(br, P); + + //верхняя часть + Brush brBlue = new SolidBrush(Color.LightBlue); + g.FillRectangle(brBlue, _startPosX + 20, _startPosY + 5, 70, 15); + + Pen pen = new(Color.Black); + //границы коробля + g.DrawRectangle(pen, _startPosX + 20, _startPosY + 5, 70, 15); + g.DrawLine(pen, _startPosX + 20, _startPosY + 40, _startPosX + 80, _startPosY + 40); + g.DrawLine(pen, _startPosX, _startPosY + 20, _startPosX + 20, _startPosY + 40); + g.DrawLine(pen, _startPosX, _startPosY + 20, _startPosX + 100, _startPosY + 20); + g.DrawLine(pen, _startPosX + 100, _startPosY + 20, _startPosX + 80, _startPosY + 40); + + //якорь + g.DrawLine(pen, _startPosX + 18, _startPosY + 25, _startPosX + 18, _startPosY + 31); + g.DrawLine(pen, _startPosX + 15, _startPosY + 28, _startPosX + 21, _startPosY + 28); + g.DrawLine(pen, _startPosX + 16, _startPosY + 31, _startPosX + 20, _startPosY + 31); + } + /// + /// Смена границ формы отрисовки + /// + /// Ширина картинки + /// Высота картинки + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_pictureWidth <= _shipWidth || _pictureHeight <= _shipHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + if (_startPosX + _shipWidth > _pictureWidth) + { + _startPosX = _pictureWidth.Value - _shipWidth; + } + if (_startPosY + _shipHeight > _pictureHeight) + { + _startPosY = _pictureHeight.Value - _shipHeight; + } + } + /// + /// Получение текущей позиции объекта + /// + /// + public (float Left, float Right, float Top, float Bottom) GetCurrentPosition() + { + return (_startPosX, _startPosY, _startPosX + _shipWidth, _startPosY + _shipHeight); + } + } +} diff --git a/WarmlyShip/WarmlyShip/EntityShip.cs b/WarmlyShip/WarmlyShip/EntityShip.cs new file mode 100644 index 0000000..0907d72 --- /dev/null +++ b/WarmlyShip/WarmlyShip/EntityShip.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WarmlyShip +{ + /// + /// Класс - сущность "Корабль" + /// + + internal class EntityShip + { + /// + /// Скорость + /// + 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/WarmlyShip/WarmlyShip/Form1.Designer.cs b/WarmlyShip/WarmlyShip/Form1.Designer.cs deleted file mode 100644 index 3873b6f..0000000 --- a/WarmlyShip/WarmlyShip/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace WarmlyShip -{ - 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/WarmlyShip/WarmlyShip/Form1.cs b/WarmlyShip/WarmlyShip/Form1.cs deleted file mode 100644 index bca3f86..0000000 --- a/WarmlyShip/WarmlyShip/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WarmlyShip -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/FormShip.Designer.cs b/WarmlyShip/WarmlyShip/FormShip.Designer.cs new file mode 100644 index 0000000..8f471d2 --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShip.Designer.cs @@ -0,0 +1,181 @@ +namespace WarmlyShip +{ + partial class FormShip + { + /// + /// 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.pictureBoxShip = 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.buttonCreate = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonUp = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxShip)).BeginInit(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // pictureBoxShip + // + this.pictureBoxShip.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxShip.Location = new System.Drawing.Point(0, 0); + this.pictureBoxShip.Name = "pictureBoxShip"; + this.pictureBoxShip.Size = new System.Drawing.Size(824, 440); + this.pictureBoxShip.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBoxShip.TabIndex = 0; + this.pictureBoxShip.TabStop = false; + this.pictureBoxShip.Click += new System.EventHandler(this.ButtonMove_Click); + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabelSpeed, + this.toolStripStatusLabelWeight, + this.toolStripStatusLabelBodyColor}); + this.statusStrip1.Location = new System.Drawing.Point(0, 440); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(824, 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 = "Цвет:"; + // + // 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(12, 403); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(75, 23); + this.buttonCreate.TabIndex = 2; + this.buttonCreate.Text = "Создать"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.ButtonCreate_Click); + // + // buttonDown + // + this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonDown.BackgroundImage = global::WarmlyShip.Properties.Resources.Down; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonDown.Location = new System.Drawing.Point(746, 396); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(30, 30); + this.buttonDown.TabIndex = 3; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.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.BackColor = System.Drawing.SystemColors.Control; + this.buttonUp.BackgroundImage = global::WarmlyShip.Properties.Resources.Up; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonUp.Location = new System.Drawing.Point(746, 360); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(30, 30); + this.buttonUp.TabIndex = 4; + this.buttonUp.UseVisualStyleBackColor = false; + 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::WarmlyShip.Properties.Resources.Right; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonRight.Location = new System.Drawing.Point(782, 396); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(30, 30); + this.buttonRight.TabIndex = 5; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.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::WarmlyShip.Properties.Resources.Left; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonLeft.Location = new System.Drawing.Point(710, 396); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(30, 30); + this.buttonLeft.TabIndex = 6; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click); + // + // FormShip + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(824, 462); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.pictureBoxShip); + this.Controls.Add(this.statusStrip1); + this.Name = "FormShip"; + this.Text = "Корабль"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxShip)).EndInit(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private PictureBox pictureBoxShip; + private StatusStrip statusStrip1; + private ToolStripStatusLabel toolStripStatusLabelSpeed; + private ToolStripStatusLabel toolStripStatusLabelWeight; + private ToolStripStatusLabel toolStripStatusLabelBodyColor; + private Button buttonCreate; + private Button buttonDown; + private Button buttonUp; + private Button buttonRight; + private Button buttonLeft; + } +} \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/FormShip.cs b/WarmlyShip/WarmlyShip/FormShip.cs new file mode 100644 index 0000000..d52fa61 --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShip.cs @@ -0,0 +1,76 @@ +using System.Windows.Forms; + +namespace WarmlyShip +{ + public partial class FormShip : Form + { + private DrawningShip _ship; + + public FormShip() + { + InitializeComponent(); + } + /// + /// + /// + private void Draw() + { + Bitmap bmp = new(pictureBoxShip.Width, pictureBoxShip.Height); + Graphics gr = Graphics.FromImage(bmp); + _ship?.DrawTransport(gr); + pictureBoxShip.Image = bmp; + } + /// + /// "" + /// + /// + /// + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random rnd = new(); + _ship = new DrawningShip(); + _ship.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + _ship.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxShip.Width, pictureBoxShip.Height); + toolStripStatusLabelSpeed.Text = $": {_ship.Ship.Speed}"; + toolStripStatusLabelWeight.Text = $": {_ship.Ship.Weight}"; + toolStripStatusLabelBodyColor.Text = $": {_ship.Ship.BodyColor.Name}"; + Draw(); + } + /// + /// + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + // + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _ship?.MoveTransport(Direction.Up); + break; + case "buttonDown": + _ship?.MoveTransport(Direction.Down); + break; + case "buttonLeft": + _ship?.MoveTransport(Direction.Left); + break; + case "buttonRight": + _ship?.MoveTransport(Direction.Right); + break; + } + Draw(); + } + /// + /// + /// + /// + /// + private void PictureBoxShip_Resize(object sender, EventArgs e) + { + _ship?.ChangeBorders(pictureBoxShip.Width, pictureBoxShip.Height); + Draw(); + } + } +} \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/FormShip.resx b/WarmlyShip/WarmlyShip/FormShip.resx new file mode 100644 index 0000000..5cb320f --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShip.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/WarmlyShip/WarmlyShip/Program.cs b/WarmlyShip/WarmlyShip/Program.cs index 341c406..876d476 100644 --- a/WarmlyShip/WarmlyShip/Program.cs +++ b/WarmlyShip/WarmlyShip/Program.cs @@ -11,7 +11,7 @@ namespace WarmlyShip // 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 FormShip()); } } } \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/Properties/Resources.Designer.cs b/WarmlyShip/WarmlyShip/Properties/Resources.Designer.cs new file mode 100644 index 0000000..6f5139b --- /dev/null +++ b/WarmlyShip/WarmlyShip/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace WarmlyShip.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("WarmlyShip.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/WarmlyShip/WarmlyShip/Form1.resx b/WarmlyShip/WarmlyShip/Properties/Resources.resx similarity index 84% rename from WarmlyShip/WarmlyShip/Form1.resx rename to WarmlyShip/WarmlyShip/Properties/Resources.resx index 1af7de1..38bb323 100644 --- a/WarmlyShip/WarmlyShip/Form1.resx +++ b/WarmlyShip/WarmlyShip/Properties/Resources.resx @@ -117,4 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Down.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\Right.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/WarmlyShip/WarmlyShip/Resources/Down.png b/WarmlyShip/WarmlyShip/Resources/Down.png new file mode 100644 index 0000000000000000000000000000000000000000..21bda4b90649af6140970b23688f20b79db2aa19 GIT binary patch literal 1356 zcmeAS@N?(olHy`uVBq!ia0vp^mx1^_2Q!e2PZYETQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`GXs1=T>t<74`jN!x-M9-VB5BBOP4PF^XJcv8#fj&Uc6?_njb%Yq@<*L z{`~p*^XCc*3fkJ*_4W0qPMzAYVZ-Cck7HtDjvP6Xo143L?_Nns$q5rC`1||Y+S(cz z7!(&5U%7H+)~s3K;o+vHrmd~5i8l%jfHrX!ctjR6Fz_7)VaDV6D^h?C^YL_X45^5F zd*@})V*>$}1bqR8JKt;f|956unAquQC6}$z8}#?D(#GV~tINEve!95y#*gWz+0F&b zGm6xhte(0lK+XSD%0i!cQ%*X~w9%a0YE&7d#+~|UiI3Q+C!RBPrktESxD{$wY#0>&8#u@^(^;bcK@*}_4tWTZyD}y&*6`(o0IIk+wR$| zed;+`S98|A-F@tsS*)__c{Q``8RC-vEDrL$wRCJ^)!X2m{mt-S>${D?(G|^i_8rXA zwLJ7-dS>A}+XFYIXRTM#n=|9t+@$MabCT{{5wYI>a5+oS_8WUy_j@Unx5^(e4`zS8j9QeDY^{diNBEbGwzqv>NB+yVe{G)c(Au>ql4e zwP%rn+|wM+tydD$ZJZPCsuROxIsZFD$_}9!haTH9c+cltqx#pDVdgrPWgfNs4oihj zEZxh#;NI+_6;r-5T+wcf@p4@g!L;+E=*BG0C&$8$2=>QKFrr&sHMwi3_mZEQ6 z5{p=hu31+!O>uZ9+AO>5&eQ`U+qxu{u@p_~l32k~bXYrSh0qD!wH-&-vn-Pc6V#63 z^f6qb6t+`nMpCIOPbAaMP*KAS&L_@44tw&*q9+0-SG zbMR_fp=-^tYi_!`n$;gPtv-9-x?+=URiNL0zIio3H(lP{tp0ql_|r4z_x7IKTDyOG zI}?>DPw&(Hq-E&9#Y)l;HgzTZ`Tr7Q1s q!0~CIQjo#Z)z4*}Q$mw_g6QslhU*+xulvuSxj*l9<+gb&$npT5)N>dB literal 0 HcmV?d00001 diff --git a/WarmlyShip/WarmlyShip/Resources/Left.png b/WarmlyShip/WarmlyShip/Resources/Left.png new file mode 100644 index 0000000000000000000000000000000000000000..a20d0a87c35401772b13bb32e8c7d789f9cb8c3f GIT binary patch literal 1388 zcmV-y1(W)TP)Px#1ZP1_K>z@;j|==^1poj5X;4g5MgRZ*0000*MMa>XptiQQrKP3({QTJ1*rTJP ztgNi~`1oXGWb^a$=jZ1jARsF%D}R4~%F4>Hu(0Ff<6K-^#KgpHZEd~1y%`x9kdTm1 zPftBPJuomZb8~al)YO`qnpam>H8nMbg@s|*aWDV?010qNS#tmY4#NNd4#NS*Z>VGd z00fLlL_t(|Uge!@PuoBgL_>i>D3q2K`hNcZA6X|EjGgQCK8%WI=6s6OwBiV<&e`3& z*}M!l_juvK#mO07S#W=1<$Hc&<@>kOHS&G4)AjLvwbym=y?%SpHSzrbTNB@(knM2r z{RGz?2EM0I-J|dO4yFg>eLq4Ji2J_&2G2*deXl=5vq#$Z0+Iuiec!`z$Q}MnkS!EP z==y$v;TT!p2M8Xa>iZRb$7uRq-$E}S>3ajY2^4(?`440 zQ1d;?zkrr+$iIM;Z_K}dlJ7+R1%!O3@-Lv{JDGn08Q?HCpAmW?Kzkr1A zRWknq3cfS>7ZC8B%fA4>?`-}B=zV`dq!4!BO#TJPeSbrv7;4{q{sowQ3-T{O?E7@+ zrUG8yqWlZc`rbjHl1uz`HVX4EKfay0emv-NA4wn&^(8cdkJ7P3r6lGfYJ>8$h`!RO2eIh0azs=&%Xe) zQn2S=0A2~`^Dh9gY54Om0JBM|58V&|wF$2N;4M->E~1ft0oVmZ@-G0rV^s1l0KX$- z@-G0vF*^AdfZ+(C{0l&Fh*JIq;P`}A{smy!Bl_6wf#xGsGZ&1&6UgOX0HO!<@-G0> zJ&O=R^H#*GLuk6+*7Y}_B0MSRx z_808-kGco3!c;~YSPt>p|Lri_-?uxzVRt^q?);VA`8vDvlgn<$Suc>A#OwTXhuQh| z_S?(W3&c`1-cGk(;FUxz5TTXEY`)BHez3!9KD5JZ{#R+G7D72L@pgLPlSO5v7CL#% z?%%MxUqxhq5-w#31R_idF}wdtAQ0hE40|9#qa3sQ3GMEme5OF;xnH#783K{(`xll6 zBH8`Vi+2#&?)P50gUIH)bO({n*X@4(g@H)uyJ!cI(RaxOx}3i4fk^7x9EhyGt$|4E z+Zc$vzHNa>?AtW!!R*^I>p|_?FzZ3?TfKwG?pyl>Q1rf)JBa+gb%7}0TNQ{3zBPd; z;ad@iBEFjk_~cOWEe%8&-@-uD@huBPA>X1vRPrqeL@D2bK-BWh2cnv9E)eB>Gl8h* zJ0FOGzO%C)ioSD!DCs-%6^)v{=|EKVO$DN?Zz2$NeK%Vuju7^p3`Aw$sg+u3--#op z+P?9Ksk-m+5mR~Jqd?U69nT;d_>Kb6!FTvvvhW=QqKEHOAe#90foS84K=koF1fr4e uJ`kOJce5T=zTJb^%Xf3L#f$&TX7dl1=Wgrq#W4E-0000&%sUr literal 0 HcmV?d00001 diff --git a/WarmlyShip/WarmlyShip/Resources/Right.png b/WarmlyShip/WarmlyShip/Resources/Right.png new file mode 100644 index 0000000000000000000000000000000000000000..1c58503a820d234fc5d8f9dce8aaa19f51c82007 GIT binary patch literal 1356 zcmV-S1+)5zP)_+(^c^YioP=jR|GAS){?e}8|<%F3{? zu;b(7TwGkl#KdiFZN0s{85tRnkdRMLPdz<7FfcH4b92*$zoGGnQ=GFOu#L@b2NX!?P{> z=m^953+M-fIHnKi2tzq0x<+Rh$$wv3qeBej(U5k!+7?kALtyTc=4sP zkLV<0c=aX9@gaWm&G8}L@}*mJm;r42(kVJke|CK7937`SyT0@Zou@Z@zVr?qs5AS% z^z}13QdgL7@bA)uFMUIY>d2ID-0{(jRoV z4lMabEQpJ~bc~K?&a!X3f>`jSD|A3(O1|{-JvyQ(MPK?Jsvwqqi7wG04UzapDu^Oq zxFd5AYJI&I zM76K;f~fcPT@WjLT^GbEU&jTp&ev~2tn_tT5NmzuH#&J8)xJ&(V!f}=g4p2evLH73 zIxL87zW!!C8hz;mEuf^;mmbgtI+}f*9Wgy=_N_c(`VPZcyKmhQQ-hz2qoN?9Be$V1 zi0H(Ps0$)Ga4Xt^h|b%LvLK@4wzEm*OMf*55gpb9ML|SIwLxAG(MgRE?;xUsS|Oc5 zMCUX^xPyp}X@{&JqEi|oDv0QimPiUBI-@P+f{0FNOmWr&9nhLmK}6>>r%({l@$6YH zi0E`3*d+5^+(ATV>%)9OL?`RSY(Yc^>&4s-B05($W_A$KvHCH+gNRPmk;#IH4%L&X zf{4!4l`~!t(UCgCKE&uiz1c5_=sexIP3BAY$$WQLYSCdvaFxt=d)5OTWejh#9_S>a zxJ>5zdXxtpV;rkwzRw?Gbcm6hC-Z%5#OMfPxy$97?DzYS>)&s(|DTh6f0O-vmFw^4 zWc?^v|4p{Ok!<}c+4|%v*ZOm^{e@inM-vA~(UE$RZ2vde{(iFa8_CY+Bs+hV?0j9W z^OH*hl;~_7*v#8T^i6iY{eDq5obPH`H=1wpf(mp%TXM~pC7T~iHXoX7{#SSb7&@jE z(hJ_uIgJos;D-)sL$dofa^0_@dZG~>wjJFCy6CjcB)k8rQ2(O&mg-+H-(>d_R@^`7 z_#+VY$Cnbq`o)kphgINz1Ba* zTBN&1$23Fa>$m47{`$?nJnCe<9x~NdR;b-X_CX$5mbyDx&+NEdSNO>xsG9RS(!)8bdjQ+ zq*-Z_WWMyWjI{UAPFlpb-(qMfvQuk5VT zgm(u07T#6uW^TSBb*Zqv#@z~&*ypE54DB}BP7Q5;RGvLJ+(?T1us`4Mjm0Q@ky&71 z{ACrs=zG^P%zOT8`||7g zc7}Ly;XR>j$bMvAnzv<`Mpmgthk4B?`zoTaf1B!3cz1y83;2fj*%-*1p^g#q^+Il^ z?NIHam+qymbYMNCyj)&H z19Thi6f6zGw|pm>mxt4IGri*O9piAJWd>7p@6Da-L_5)+UN#Q}MwXS@3`+Pc?7laSJsLqI}(1O?uJZpqSZRYVgd zMSaCRUziAOEQt!H0Tvi6R~9k+l?!Ksw+#_ZYXY{7V{9$igq;j1R@!Pk#ww`vH3Z}V z=O`ur%=qBL$h^gJ8ersrX)$OFpj*I4H(`uJz1|ETVJkeB<6E2*o+Hiz)k%eCD86OG zg-bc*KfSyT0kULrr5g{ui>cKVIzm9!QhSV{`8SuvqOSm5(A}puTB*TGe~(f;FwbN;S8_j?CZ6+GU77eigLj8jpr;{-JECenable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file