From 27b30722703c4ebbc3690630ba536063c52e8716 Mon Sep 17 00:00:00 2001 From: "Valitov.Damir" Date: Fri, 17 Mar 2023 19:30:05 +0400 Subject: [PATCH] lab1 done --- Sailboat/Boat.cs | 43 +++++ Sailboat/BoatForm.Designer.cs | 185 ++++++++++++++++++++++ Sailboat/BoatForm.cs | 87 ++++++++++ Sailboat/BoatForm.resx | 63 ++++++++ Sailboat/Direction.cs | 20 +++ Sailboat/DrawingBoat.cs | 164 +++++++++++++++++++ Sailboat/Program.cs | 23 +++ Sailboat/Properties/Resources.Designer.cs | 103 ++++++++++++ Sailboat/Properties/Resources.resx | 133 ++++++++++++++++ Sailboat/Resources/down.png | Bin 0 -> 4564 bytes Sailboat/Resources/left.png | Bin 0 -> 4369 bytes Sailboat/Resources/right.png | Bin 0 -> 4448 bytes Sailboat/Resources/up.png | Bin 0 -> 2277 bytes Sailboat/Sailboat.csproj | 9 ++ Sailboat/Sailboat.sln | 25 +++ 15 files changed, 855 insertions(+) create mode 100644 Sailboat/Boat.cs create mode 100644 Sailboat/BoatForm.Designer.cs create mode 100644 Sailboat/BoatForm.cs create mode 100644 Sailboat/BoatForm.resx create mode 100644 Sailboat/Direction.cs create mode 100644 Sailboat/DrawingBoat.cs create mode 100644 Sailboat/Program.cs create mode 100644 Sailboat/Properties/Resources.Designer.cs create mode 100644 Sailboat/Properties/Resources.resx create mode 100644 Sailboat/Resources/down.png create mode 100644 Sailboat/Resources/left.png create mode 100644 Sailboat/Resources/right.png create mode 100644 Sailboat/Resources/up.png create mode 100644 Sailboat/Sailboat.csproj create mode 100644 Sailboat/Sailboat.sln diff --git a/Sailboat/Boat.cs b/Sailboat/Boat.cs new file mode 100644 index 0000000..55a7c3f --- /dev/null +++ b/Sailboat/Boat.cs @@ -0,0 +1,43 @@ +using System; +using System.Drawing; + +namespace Sailboat +{ + internal class Boat + { + /// + /// Скорость + /// + 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/Sailboat/BoatForm.Designer.cs b/Sailboat/BoatForm.Designer.cs new file mode 100644 index 0000000..861bbfe --- /dev/null +++ b/Sailboat/BoatForm.Designer.cs @@ -0,0 +1,185 @@ + +namespace Sailboat +{ + partial class BoatForm + { + /// + /// 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.toolStripLabel_speed = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripLabel_weight = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripLabel_color = new System.Windows.Forms.ToolStripStatusLabel(); + this.pictureBoxBoat = new System.Windows.Forms.PictureBox(); + this.btn_create = new System.Windows.Forms.Button(); + this.btn_right = new System.Windows.Forms.Button(); + this.btn_down = new System.Windows.Forms.Button(); + this.btn_up = new System.Windows.Forms.Button(); + this.btn_left = new System.Windows.Forms.Button(); + this.statusStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBoat)).BeginInit(); + this.SuspendLayout(); + // + // statusStrip1 + // + this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel_speed, + this.toolStripLabel_weight, + this.toolStripLabel_color}); + this.statusStrip1.Location = new System.Drawing.Point(0, 424); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(800, 26); + this.statusStrip1.TabIndex = 0; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripLabel_speed + // + this.toolStripLabel_speed.Name = "toolStripLabel_speed"; + this.toolStripLabel_speed.Size = new System.Drawing.Size(76, 20); + this.toolStripLabel_speed.Text = "Скорость:"; + // + // toolStripLabel_weight + // + this.toolStripLabel_weight.Name = "toolStripLabel_weight"; + this.toolStripLabel_weight.Size = new System.Drawing.Size(36, 20); + this.toolStripLabel_weight.Text = "Вес:"; + // + // toolStripLabel_color + // + this.toolStripLabel_color.Name = "toolStripLabel_color"; + this.toolStripLabel_color.Size = new System.Drawing.Size(45, 20); + this.toolStripLabel_color.Text = "Цвет:"; + // + // pictureBoxBoat + // + this.pictureBoxBoat.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxBoat.Location = new System.Drawing.Point(0, 0); + this.pictureBoxBoat.Name = "pictureBoxBoat"; + this.pictureBoxBoat.Size = new System.Drawing.Size(800, 424); + this.pictureBoxBoat.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBoxBoat.TabIndex = 1; + this.pictureBoxBoat.TabStop = false; + this.pictureBoxBoat.Resize += new System.EventHandler(this.btn_move_Click); + // + // btn_create + // + this.btn_create.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_create.Location = new System.Drawing.Point(13, 13); + this.btn_create.Name = "btn_create"; + this.btn_create.Size = new System.Drawing.Size(94, 29); + this.btn_create.TabIndex = 2; + this.btn_create.Text = "Создать"; + this.btn_create.UseVisualStyleBackColor = true; + this.btn_create.Click += new System.EventHandler(this.btn_create_Click); + // + // btn_right + // + this.btn_right.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_right.BackgroundImage = global::Sailboat.Properties.Resources.right; + this.btn_right.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btn_right.Location = new System.Drawing.Point(694, 392); + this.btn_right.Name = "btn_right"; + this.btn_right.Size = new System.Drawing.Size(94, 29); + this.btn_right.TabIndex = 4; + this.btn_right.UseVisualStyleBackColor = true; + this.btn_right.Click += new System.EventHandler(this.btn_move_Click); + // + // btn_down + // + this.btn_down.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_down.BackgroundImage = global::Sailboat.Properties.Resources.down; + this.btn_down.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btn_down.Location = new System.Drawing.Point(594, 392); + this.btn_down.Name = "btn_down"; + this.btn_down.Size = new System.Drawing.Size(94, 29); + this.btn_down.TabIndex = 5; + this.btn_down.UseVisualStyleBackColor = true; + this.btn_down.Click += new System.EventHandler(this.btn_move_Click); + // + // btn_up + // + this.btn_up.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_up.BackgroundImage = global::Sailboat.Properties.Resources.up; + this.btn_up.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btn_up.Location = new System.Drawing.Point(594, 357); + this.btn_up.Name = "btn_up"; + this.btn_up.Size = new System.Drawing.Size(94, 29); + this.btn_up.TabIndex = 6; + this.btn_up.UseVisualStyleBackColor = true; + this.btn_up.Click += new System.EventHandler(this.btn_move_Click); + // + // btn_left + // + this.btn_left.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_left.BackgroundImage = global::Sailboat.Properties.Resources.left; + this.btn_left.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btn_left.Location = new System.Drawing.Point(494, 391); + this.btn_left.Name = "btn_left"; + this.btn_left.Size = new System.Drawing.Size(94, 29); + this.btn_left.TabIndex = 7; + this.btn_left.UseVisualStyleBackColor = true; + this.btn_left.Click += new System.EventHandler(this.btn_move_Click); + // + // BoatForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.btn_left); + this.Controls.Add(this.btn_up); + this.Controls.Add(this.btn_down); + this.Controls.Add(this.btn_right); + this.Controls.Add(this.btn_create); + this.Controls.Add(this.pictureBoxBoat); + this.Controls.Add(this.statusStrip1); + this.Name = "BoatForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "BoatForm"; + this.Click += new System.EventHandler(this.btn_move_Click); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBoat)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripLabel_speed; + private System.Windows.Forms.ToolStripStatusLabel toolStripLabel_weight; + private System.Windows.Forms.ToolStripStatusLabel toolStripLabel_color; + private System.Windows.Forms.PictureBox pictureBoxBoat; + private System.Windows.Forms.Button btn_create; + private System.Windows.Forms.Button btn_right; + private System.Windows.Forms.Button btn_down; + private System.Windows.Forms.Button btn_up; + private System.Windows.Forms.Button btn_left; + } +} + diff --git a/Sailboat/BoatForm.cs b/Sailboat/BoatForm.cs new file mode 100644 index 0000000..2c1f6e1 --- /dev/null +++ b/Sailboat/BoatForm.cs @@ -0,0 +1,87 @@ +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 Sailboat +{ + public partial class BoatForm : Form + { + private DrawningBoat _boat; + public BoatForm() + { + InitializeComponent(); + } + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void btn_create_Click(object sender, EventArgs e) + { + Random rnd = new(); + _boat = new DrawningBoat(); + _boat.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), + Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + _boat.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), + pictureBoxBoat.Width, pictureBoxBoat.Height); + toolStripLabel_color.Text = $"Скорость: {_boat.Boat.Speed}"; + toolStripLabel_weight.Text = $"Вес: {_boat.Boat.Weight}"; + toolStripLabel_color.Text = $"Цвет: { _boat.Boat.BodyColor.Name}"; + Draw(); + } + /// + /// Изменение размеров формы + /// + /// + /// + private void btn_move_Click(object sender, EventArgs e) + { + //получаем имя кнопки + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "btn_up": + _boat?.MoveTransport(Direction.Up); + break; + case "btn_down": + _boat?.MoveTransport(Direction.Down); + break; + case "btn_left": + _boat?.MoveTransport(Direction.Left); + break; + case "btn_right": + _boat?.MoveTransport(Direction.Right); + break; + } + Draw(); + } + /// + /// Метод прорисовки машины + /// + private void Draw() + { + Bitmap bmp = new(pictureBoxBoat.Width, pictureBoxBoat.Height); + Graphics gr = Graphics.FromImage(bmp); + _boat?.DrawTransport(gr); + pictureBoxBoat.Image = bmp; + } + + + /// + /// Изменение размеров формы + /// + /// + /// + private void PictureBoxCar_Resize(object sender, EventArgs e) + { + _boat?.ChangeBorders(pictureBoxBoat.Width, pictureBoxBoat.Height); + Draw(); + } + } +} diff --git a/Sailboat/BoatForm.resx b/Sailboat/BoatForm.resx new file mode 100644 index 0000000..5cb320f --- /dev/null +++ b/Sailboat/BoatForm.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/Sailboat/Direction.cs b/Sailboat/Direction.cs new file mode 100644 index 0000000..f09407a --- /dev/null +++ b/Sailboat/Direction.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Sailboat +{ + /// + /// Направление перемещения + /// + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } + +} diff --git a/Sailboat/DrawingBoat.cs b/Sailboat/DrawingBoat.cs new file mode 100644 index 0000000..adc3de7 --- /dev/null +++ b/Sailboat/DrawingBoat.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Sailboat +{ + /// + /// Класс, отвечающий за прорисовку и перемещение объекта-сущности + /// + internal class DrawningBoat + { + /// + /// Класс-сущность + /// + public Boat Boat{ private set; get; } + /// ` + /// Левая координата отрисовки автомобиля + /// + private float _startPosX; + /// + /// Верхняя кооридната отрисовки автомобиля + /// + private float _startPosY; + /// + /// Ширина окна отрисовки + /// + private int? _pictureWidth = null; + /// + /// Высота окна отрисовки + /// + private int? _pictureHeight = null; + /// + /// Ширина отрисовки автомобиля + /// + private readonly int _boatWidth = 120; + /// + /// Высота отрисовки автомобиля + /// + private readonly int _boatHeight = 40; + /// + /// Инициализация свойств (метод инит принимал готовые параметры от боат + /// + /// Скорость + /// Вес автомобиля + /// Цвет кузова + public void Init(int speed, float weight, Color bodyColor) + { + Boat = new Boat(); + Boat.Init(speed, weight, bodyColor); + } + /// + /// Установка позиции автомобиля + /// + /// Координата X + /// Координата Y + /// Ширина картинки + /// Высота картинки + public void SetPosition(int x, int y, int width, int height) + { + if (x > 0 && y > 0 && x < width - _boatWidth && y < height - _boatHeight) + { + _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 + _boatWidth + ((int)Boat.Step) < _pictureWidth) + { + _startPosX += ((int)Boat.Step); + } + break; + //влево + case Direction.Left: + if (_startPosX > ((int)Boat.Step)) + { + _startPosX -= ((int)Boat.Step); + } + break; + //вверх + case Direction.Up: + if (_startPosY > ((int)Boat.Step)) + { + _startPosY -= ((int)Boat.Step); + } + break; + //вниз + case Direction.Down: + if (_startPosY + _boatHeight + ((int)Boat.Step) < _pictureHeight) + { + _startPosY += ((int)Boat.Step); + } + break; + } + } + /// + /// Отрисовка автомобиля + /// + /// + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + Pen pen = new(Color.Black); + //корма + g.DrawLine(pen, _startPosX, _startPosY, _startPosX + 70, _startPosY); + g.DrawLine(pen, _startPosX, _startPosY, _startPosX, _startPosY+40); + g.DrawLine(pen, _startPosX, _startPosY + 40, _startPosX + 70, _startPosY+40); + //нос + g.DrawLine(pen, _startPosX + 70, _startPosY + 40, _startPosX + 120, _startPosY+20); + g.DrawLine(pen, _startPosX + 70, _startPosY, _startPosX + 120, _startPosY+20); + //внутренность + Rectangle rect = new Rectangle((int)_startPosX + 5, (int)_startPosY + 5, 60, 30); + g.DrawRectangle(pen, rect); + Brush br = new SolidBrush(Boat.BodyColor); + g.FillRectangle(br, rect); + } + /// + /// Смена границ формы отрисовки + /// + /// Ширина картинки + /// Высота картинки + 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/Sailboat/Program.cs b/Sailboat/Program.cs new file mode 100644 index 0000000..1ab8bf2 --- /dev/null +++ b/Sailboat/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Sailboat +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new BoatForm()); + } + } +} diff --git a/Sailboat/Properties/Resources.Designer.cs b/Sailboat/Properties/Resources.Designer.cs new file mode 100644 index 0000000..076bcaa --- /dev/null +++ b/Sailboat/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace Sailboat.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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("Sailboat.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 up { + get { + object obj = ResourceManager.GetObject("up", 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)); + } + } + } +} diff --git a/Sailboat/Properties/Resources.resx b/Sailboat/Properties/Resources.resx new file mode 100644 index 0000000..0386372 --- /dev/null +++ b/Sailboat/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\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/Sailboat/Resources/down.png b/Sailboat/Resources/down.png new file mode 100644 index 0000000000000000000000000000000000000000..a84585d22d9761a1d609e6253ea6a8033ea63d16 GIT binary patch literal 4564 zcmds*iC0tC7RFCPDsjZ9>k(=YG|q@3XayC6LmLFep;d4sDuOr>1S?V{7i`613`1p5 zgwWcE77=_}s3;Jp02M@0kctQxD+Ex8CYZ*MynRl>`y>4-T9UNlip_3%QASj%66t~}(Z;DQmdc;#Y*t|ksOZ2JtZ z2MfJ7L?ATcF8-xegk20mh!whg+2U`aw!Uqy$$PhFONILA!i|m@sR`{#qt@(xT+Nsg zH!X;*h{ z%f_x4o#&A&UD2hjr5{WC%6jGooV&(rDSfy-%Nok~m;DUu{KsG9r`@c|mr0%bx2r0A z>ks+xqI4tC2yIDSlW))T{w1oFvYvEf@jbiFR#UL5z*l?BKi;S+^Ve@z9rEd!L6c|4 zlxS|sW~FvccHXzHxv*sC!6%(X;U}dt`ZuUj>*}oE7j>p;RVhmmm0#ax+Iwk#ZQbPN z_02^k;Rm~-sw;d<8#d~5vNo1pH~y;8k3yF(?e}fYXjO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>S*gIooSQ^`dX|-ZM0i1!a*>PO_DGs|3!Fzivq)%K4@4a8gcf<>YZP@N&RY z?y2#d!ps8e=*T4Do@F@e92*iYQTao;f~5xy27nV~ zekwaVTFI2{G(8~0O&X>diLX!)*btd1o15uJ-0Ci+-D(Z$%0bL4i@a@zSPZ-h8g^^& z9HL;sOxewui38KfOhak^hvQ z389JlX!^3ziT^oghO*iUh$TjlP+b;={moBibdt5uo={u8h@=2eZ7rLj7%!pkKGj;< z2$hGVi+7)0uGnX>&E=P#Eg*Xc05MhvM#U)_)-AN5NoM_cp;qL!EG#|JhEGehL-;n_ zv&}@bnEI#%Ekouq7;YOr`A(4y>8<1TR^^<@My+rD$($($oGunw*Q{J@oY7xA&_{+! zlS+RsEv@%-<1uNSKb*KTB4suq62JK;690omsa9S}OPi=JurvK5E&K02aE?AUO7t6a z+7#uea=X%7870+7HBC|}Q=01Ez996@qo|O%>gJD%%HKx6F(CH0oQ+>?;2rrl8EPHW literal 0 HcmV?d00001 diff --git a/Sailboat/Resources/right.png b/Sailboat/Resources/right.png new file mode 100644 index 0000000000000000000000000000000000000000..c7188ec82d1a89d76aaf43ff66374256ec15c5fa GIT binary patch literal 4448 zcmeHLYgAKL7Cs44LM^YsSqem8N-MRN0*aXM3Uo0<4N08VHJ~7(U^P=~qWAzAO~zKm zLP9MVltA!B!eRtr4G#r1L1a$lCkt zbN09I`S#iS=G@a8*$l^bJl+8SIIdq8^BDj{s1gBrAr!`ppQfQ8q<_Zv6jc34LE(V3 zE1DGzKuz8v%k~9u?7&~QIUN9}7W_xJ%PUU(?bZ# z2U-k+{`^hJf$rG&b289;_?UJyeTzq!KYY@Z@!M2?QSn|GbnTeFR~x)HbQ@$KWS8lp zlFnwf$j9+TpGVUD9gAc*HzChtD9YtNIPfLprQFoa<+dKEfpIov?b+fHxHTMxK3f$h zD3Pd{h4~OPw8?}O#xe_~Q2*$fRI-p+2+5-!X(+wb%`=gNxt(k=(3C&fH@QLigl?T0 z69qVAn2Zf*Q;*V4cs8j-;uSw!o%uVUsyM{!Ns>xpH=OEl1(anx!k)W(v!AZHWtl$w zer6b;hB^tqx{-B64*}qQtBVR*opIPy_LdtrmjTKG4yb?LiOeE89|eHce6SOSa+#>O@A~iz+~9|dC=TT45`_=}*~#8dG7ge~Pn+vQoQb!SZ%KH2 z65f`>+n(^>Hb(Cf;G=eZ*j0x{xPewGF?1R^fRR9uSSXgAvmL0endNx9z1q)Fg#D)V z`GpKj{v%#kIWuJxqdh&!R7YpoEn-x$A7OZ6ur)S`mbHMoyvbLSh%m1S7~SIv`8p@-m%e;s8D$Y6`_+woOwwvtG+n%K??D?aw#Z``j^`(kz7RKx>4% z0KAtg;HbTY5@re)u2l%APmQ-24M(bfj6r{u5)U+rKyX|04B&PavKG_MB3H`1!rjqpvH? z6)@&MPjf2I(xUk&w7FL9j@K~Ocj&v#Md=g%;7-+UNv zh#Aesd@eV)paVA+qn=3j(iKwp;4fDHOS_F;L%Mxd6hiAz7nl28K|5SqH-lp5xv(EY zG{!Ud=BR)6H?&O@u(`PfdAawm4uIBQBsuocqi5s!bny4yh{_uw{-S&*2%WMfUQxEM zd;4lDxH>d}bVs3lcY$X2l#Axjh}9TCiyX6$I?=;o(#wWk;m&Jx=OyY5h0yato6dyI zI%rzzvqqf3K`*J~By&lp*>2F=K7;j>bCJ8Kq-WT<$&N2n@AH zy+{FXXkW|6cUcI%#d&PzW%>9{s9p_VF|~3jZmoUE?msVyWw%2h@f}?Q5ng*mCDsV7 zv+7TohC%Z6OjrSz2g&Asd_j?~MhSt7NemSomx~!fgS{rE89FL=ZCgBYF{Cf^^>tIEa5a zkUI#^Zlz_NNSru{HlrQLE#wheg_@Ahk$gmpq$0W+nC7O@dI4B=RaE@zk}L1RuOeXm MAK5WgpQarDC&ETezW@LL literal 0 HcmV?d00001 diff --git a/Sailboat/Resources/up.png b/Sailboat/Resources/up.png new file mode 100644 index 0000000000000000000000000000000000000000..bbfbf4104bf99b952d021081a89f23ec45a46b50 GIT binary patch literal 2277 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&w@L)Zt|+Cx8@lv6E*A2M5RPhyD+MT+RZI z$YKTtiTfbT=(*DIJy1}x#5JNMI6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDFy~c z_W+*|*Z=?j1J#cL3PYf?r7sj{L{3SNUoZnB6Eh1d8yCNzkg$lTgtV-@qOyvrn!1Lr zfuWJHiM5TrqmyeuV0=PiQc7l4Zhk>wQE^FWS$RcE|HR32<}X^hY}MxNJ9q8gvv2=_ zgNIL^JAdKgr7PEN-n#wZ;iJb-o<4j2>do7C@4x@}`Rn(;>wX1J3=C{DJY5_^DsH{K zdwp6+sD#_awH*pux|ou}cse9E&p5h9;`SV6t~uZLe`AtVGP~fp=J2e~jAgwa*S}x1 zZq+feeEux&_B-o$H};;DowV&u{lC|lvzBH4`t|c~^qs}e4v1ft+-LDXN%MD~U%KV4 z^PyJne&+s~e*azB^saV)A8m_&3r?HZSkFDIxZU&n_J*o@?iHj_|1+!3yuI{Scfq~; zOt0ubEq_@!-JdiklI$l`4L~0{?JPkRgYa12|9`t(Y{I+!>HVxre)lIbzWpZ_@IIgM zD~w8h^Ya|jDY8RF{}j`_E478cqaF6{XT3re^j^ z_vC+PS^sRx?lC-e`d7I4hf@;CcglkPzhd&cXLqb3_WwJkIQit~oPT$7TWl*^~R_xI2Ls;~dx`Nx$&1vOUpE&)|GwBzIP{|o+0c+Y-qnoH-|s&MmW)~Pe-}jZ;lI}r4gWSr9?1H&z7lN0 z>eu^^ffcRU_Fux<{?h+T(Fb1rUY`h-%zkNqtgrve{w-n~w*6Zj1J)V!dwmu}@;y+J z|Lgt`u?_S7i9;lR{fbWjOTKm{YLc + + + WinExe + net5.0-windows + true + + + \ No newline at end of file diff --git a/Sailboat/Sailboat.sln b/Sailboat/Sailboat.sln new file mode 100644 index 0000000..14cbf0e --- /dev/null +++ b/Sailboat/Sailboat.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31911.196 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sailboat", "Sailboat.csproj", "{D137904C-BFCA-4389-B485-24E34C8B861A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D137904C-BFCA-4389-B485-24E34C8B861A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D137904C-BFCA-4389-B485-24E34C8B861A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D137904C-BFCA-4389-B485-24E34C8B861A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D137904C-BFCA-4389-B485-24E34C8B861A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EA90E930-2691-4BB1-A346-74B5662B0250} + EndGlobalSection +EndGlobal