diff --git a/Lab1ContainersShip/Lab1ContainersShip.sln b/Lab1ContainersShip/Lab1ContainersShip.sln
new file mode 100644
index 0000000..80adb21
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33122.133
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab1ContainersShip", "Lab1ContainersShip\Lab1ContainersShip.csproj", "{AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F02369FD-F9A6-45C3-A628-4869EA7856C1}
+ EndGlobalSection
+EndGlobal
diff --git a/Lab1ContainersShip/Lab1ContainersShip/App.config b/Lab1ContainersShip/Lab1ContainersShip/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Direction.cs b/Lab1ContainersShip/Lab1ContainersShip/Direction.cs
new file mode 100644
index 0000000..c3a798c
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Direction.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lab1ContainersShip
+{
+ public enum Direction
+ {
+ ///
+ /// Вверх
+ ///
+ Up = 1,
+ ///
+ /// Вниз
+ ///
+ Down = 2,
+ ///
+ /// Влево
+ ///
+ Left = 3,
+ ///
+ /// Вправо
+ ///
+ Right = 4
+
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/DrawingContainerShip.cs b/Lab1ContainersShip/Lab1ContainersShip/DrawingContainerShip.cs
new file mode 100644
index 0000000..9e04681
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/DrawingContainerShip.cs
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lab1ContainersShip
+{
+ public class DrawingContainerShip
+ {
+ ///
+ /// Класс-сущность
+ ///
+ public EntityContainerShip EntityContainerShip { get; private set; }
+ ///
+ /// Ширина окна
+ ///
+ private int _pictureWidth;
+ ///
+ /// Высота окна
+ ///
+ private int _pictureHeight;
+ ///
+ /// Левая координата прорисовки автомобиля
+ ///
+ private int _startPosX;
+ ///
+ /// Верхняя кооридната прорисовки автомобиля
+ ///
+ private int _startPosY;
+ ///
+ /// Ширина прорисовки автомобиля
+ ///
+ private readonly int _shipWidth = 110;
+ ///
+ /// Высота прорисовки автомобиля
+ ///
+ private readonly int _shipHeight = 65;
+
+ /* public bool Init(int speed, double weight, Color bodyColor, Color
+additionalColor, bool crane, bool container, int width, int height)
+ {
+ // TODO: Продумать проверки
+ _pictureWidth = width;
+ _pictureHeight = height;
+ if (_pictureWidth < _shipWidth || _pictureHeight < _shipHeight)
+ {
+ return false;
+ }
+ EntityContainerShip = new EntityContainerShip();
+ EntityContainerShip.Init(speed, weight, bodyColor, additionalColor,
+ crane, container);
+
+ return true;
+ }*/
+ public bool Init(EntityContainerShip entcon, int wid, int hei)
+ {
+ _pictureWidth = wid;
+ _pictureHeight = hei;
+ if (_pictureWidth < _shipWidth || _pictureHeight < _shipHeight)
+ {
+ return false;
+ }
+ EntityContainerShip = entcon;
+ return true;
+
+ }
+
+
+ public void SetPosition(int x, int y)
+ {
+ // TODO: Изменение x, y
+ _startPosX = Math.Min(x, _pictureWidth - _shipWidth);
+ _startPosY = Math.Min(y, _pictureHeight - _shipHeight);
+ }
+ public void MoveTransport(Direction direction)
+ {
+ if (EntityContainerShip == null)
+ {
+ return;
+ }
+ switch (direction)
+ {
+ //влево
+ case Direction.Left:
+ if (_startPosX - EntityContainerShip.Step > 0)
+ {
+ _startPosX -= (int)EntityContainerShip.Step;
+ }
+ break;
+ //вверх
+ case Direction.Up:
+ if (_startPosY - EntityContainerShip.Step > 0)
+ {
+ _startPosY -= (int)EntityContainerShip.Step;
+ }
+ break;
+ // вправо
+ case Direction.Right:
+ // TODO: Продумать логику
+ if (_startPosX + EntityContainerShip.Step + _shipWidth < _pictureWidth)
+ {
+ _startPosX += (int)EntityContainerShip.Step;
+ }
+ break;
+ //вниз
+ case Direction.Down:
+ // TODO: Продумать логику
+ if (_startPosY + EntityContainerShip.Step + _shipHeight< _pictureHeight)
+ {
+ _startPosY += (int)EntityContainerShip.Step;
+ }
+ break;
+ }
+ }
+ public void DrawShip(Graphics g)
+ {
+ if (EntityContainerShip == null)
+ {
+ return;
+ }
+ Pen pen = new Pen(Color.Black);
+ Brush adbrush = new SolidBrush(EntityContainerShip.AdditionalColor);
+ Brush brBlue = new SolidBrush(Color.Blue);
+ // заполнение борта
+ g.FillPolygon(brBlue, new PointF[]
+ {
+ new PointF(_startPosX, _startPosY+45),
+ new PointF(_startPosX+20, _startPosY+65),
+ new PointF(_startPosX+90, _startPosY+65),
+ new PointF(_startPosX+110, _startPosY+45),
+ new PointF(_startPosX, _startPosY+45)
+ });
+ //борт корабля контур
+ g.DrawLines(pen, new Point[] {
+ new Point(_startPosX, _startPosY+45),
+ new Point(_startPosX+20, _startPosY+65),
+ new Point(_startPosX+90, _startPosY+65),
+ new Point(_startPosX+110, _startPosY+45),
+ new Point(_startPosX, _startPosY+45)});
+
+ //рисунок на борту
+ g.DrawLine(pen, _startPosX + 23, _startPosY + 60, _startPosX + 27, _startPosY + 60);
+ g.DrawLine(pen, _startPosX + 25, _startPosY + 50, _startPosX + 25, _startPosY + 60);
+ g.DrawLine(pen, _startPosX + 20, _startPosY + 55, _startPosX + 30, _startPosY + 55);
+
+ //контейнеры
+ if (EntityContainerShip.Conteiners)
+ {
+ g.FillRectangle(adbrush, _startPosX + 30, _startPosY + 35, 35, 10);
+ g.FillRectangle(adbrush, _startPosX + 65, _startPosY + 35, 20, 10);
+ g.FillRectangle(adbrush, _startPosX + 85, _startPosY + 30, 15, 15);
+ g.FillRectangle(adbrush, _startPosX + 30, _startPosY + 25, 15, 10);
+ g.FillRectangle(adbrush, _startPosX + 45, _startPosY + 25, 55, 5);
+ g.FillRectangle(adbrush, _startPosX + 45, _startPosY + 30, 40, 5);
+
+ g.DrawRectangle(pen, _startPosX + 30, _startPosY + 35, 35, 10);
+ g.DrawRectangle(pen, _startPosX + 65, _startPosY + 35, 20, 10);
+ g.DrawRectangle(pen, _startPosX + 85, _startPosY + 30, 15, 15);
+ g.DrawRectangle(pen, _startPosX + 30, _startPosY + 25, 15, 10);
+ g.DrawRectangle(pen, _startPosX + 45, _startPosY + 25, 55, 5);
+ g.DrawRectangle(pen, _startPosX + 45, _startPosY + 30, 40, 5);
+ }
+ //кран
+ if (EntityContainerShip.Crane)
+ {
+ g.FillRectangle(adbrush, _startPosX + 23, _startPosY, 5, 45);
+ g.FillRectangle(adbrush, _startPosX + 27, _startPosY + 10, 20, 3);
+ g.DrawRectangle(pen, _startPosX + 23, _startPosY, 5, 45);
+ g.DrawRectangle(pen, _startPosX + 27, _startPosY + 10, 20, 3);
+ g.DrawLine(pen, _startPosX + 27, _startPosY, _startPosX + 47, _startPosY + 10);
+ g.DrawLine(pen, _startPosX + 47, _startPosY + 13, _startPosX + 47, _startPosY + 25);
+ }
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/EntityContainerShip.cs b/Lab1ContainersShip/Lab1ContainersShip/EntityContainerShip.cs
new file mode 100644
index 0000000..21fee7c
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/EntityContainerShip.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lab1ContainersShip
+{
+ public class EntityContainerShip
+ {
+ ///
+ /// Скорость
+ ///
+ public int Speed { get; private set; }
+ ///
+ /// Вес
+ ///
+ public double Weight { get; private set; }
+ ///
+ /// Основной цвет
+ ///
+ public Color BodyColor { get; private set; }
+ ///
+ /// Дополнительный цвет (для опциональных элементов)
+ ///
+ public Color AdditionalColor { get; private set; }
+
+
+ ///
+ /// Признак (опция) наличия крана
+ ///
+ public bool Crane { get; private set; }
+ ///
+ /// Признак (опция) наличия контейнеров
+ ///
+ public bool Conteiners { get; private set; }
+ public double Step => (double)Speed * 100 / Weight;
+ public void Init(int speed, double weight, Color bodyColor, Color
+additionalColor, bool crane, bool containers)
+ {
+ Speed = speed;
+ Weight = weight;
+ BodyColor = bodyColor;
+ AdditionalColor = additionalColor;
+ Crane = crane;
+ Conteiners = containers;
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Form1.Designer.cs b/Lab1ContainersShip/Lab1ContainersShip/Form1.Designer.cs
new file mode 100644
index 0000000..e4820ff
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Form1.Designer.cs
@@ -0,0 +1,139 @@
+namespace Lab1ContainersShip
+{
+ partial class Form1
+ {
+ ///
+ /// Обязательная переменная конструктора.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Освободить все используемые ресурсы.
+ ///
+ /// истинно, если управляемый ресурс должен быть удален; иначе ложно.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Код, автоматически созданный конструктором форм Windows
+
+ ///
+ /// Требуемый метод для поддержки конструктора — не изменяйте
+ /// содержимое этого метода с помощью редактора кода.
+ ///
+ private void InitializeComponent()
+ {
+ this.buttonCreate = new System.Windows.Forms.Button();
+ this.buttonUp = new System.Windows.Forms.Button();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.buttonRight = new System.Windows.Forms.Button();
+ this.buttonLeft = new System.Windows.Forms.Button();
+ this.buttonDown = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // 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, 426);
+ this.buttonCreate.Name = "buttonCreate";
+ this.buttonCreate.Size = new System.Drawing.Size(75, 23);
+ this.buttonCreate.TabIndex = 1;
+ this.buttonCreate.Text = "создать";
+ this.buttonCreate.UseVisualStyleBackColor = true;
+ this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
+ //
+ // buttonUp
+ //
+ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonUp.BackgroundImage = global::Lab1ContainersShip.Properties.Resources.photo;
+ this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonUp.Location = new System.Drawing.Point(696, 339);
+ this.buttonUp.Name = "buttonUp";
+ this.buttonUp.Size = new System.Drawing.Size(30, 30);
+ this.buttonUp.TabIndex = 2;
+ this.buttonUp.UseVisualStyleBackColor = true;
+ this.buttonUp.Click += new System.EventHandler(this.buttonMove_Click);
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(884, 461);
+ this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBox1.TabIndex = 0;
+ this.pictureBox1.TabStop = false;
+ this.pictureBox1.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::Lab1ContainersShip.Properties.Resources.photo1;
+ this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonRight.Location = new System.Drawing.Point(730, 375);
+ this.buttonRight.Name = "buttonRight";
+ this.buttonRight.Size = new System.Drawing.Size(30, 30);
+ this.buttonRight.TabIndex = 3;
+ 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::Lab1ContainersShip.Properties.Resources.photo3;
+ this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonLeft.Location = new System.Drawing.Point(660, 375);
+ this.buttonLeft.Name = "buttonLeft";
+ this.buttonLeft.Size = new System.Drawing.Size(30, 30);
+ this.buttonLeft.TabIndex = 4;
+ this.buttonLeft.UseVisualStyleBackColor = true;
+ this.buttonLeft.Click += new System.EventHandler(this.buttonMove_Click);
+ //
+ // buttonDown
+ //
+ this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonDown.BackgroundImage = global::Lab1ContainersShip.Properties.Resources.photo2;
+ this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.buttonDown.Location = new System.Drawing.Point(696, 411);
+ this.buttonDown.Name = "buttonDown";
+ this.buttonDown.Size = new System.Drawing.Size(30, 30);
+ this.buttonDown.TabIndex = 5;
+ this.buttonDown.UseVisualStyleBackColor = true;
+ this.buttonDown.Click += new System.EventHandler(this.buttonMove_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(884, 461);
+ this.Controls.Add(this.buttonDown);
+ this.Controls.Add(this.buttonLeft);
+ this.Controls.Add(this.buttonRight);
+ this.Controls.Add(this.buttonUp);
+ this.Controls.Add(this.buttonCreate);
+ this.Controls.Add(this.pictureBox1);
+ this.Name = "Form1";
+ this.Text = "контейнеровоз";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.Button buttonCreate;
+ private System.Windows.Forms.Button buttonUp;
+ private System.Windows.Forms.Button buttonRight;
+ private System.Windows.Forms.Button buttonLeft;
+ private System.Windows.Forms.Button buttonDown;
+ }
+}
+
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Form1.cs b/Lab1ContainersShip/Lab1ContainersShip/Form1.cs
new file mode 100644
index 0000000..a26ed65
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Form1.cs
@@ -0,0 +1,98 @@
+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 Lab1ContainersShip
+{
+ public partial class Form1 : Form
+ {
+ private DrawingContainerShip _drawningShip;
+
+ public Form1()
+ {
+ InitializeComponent();
+ }
+ ///
+ /// Поле-объект для прорисовки объекта
+ ///
+
+ ///
+ /// Инициализация формы
+ ///
+
+ ///
+ /// Метод прорисовки машины
+ ///
+ private void Draw()
+ {
+ if (_drawningShip == null)
+ {
+ return;
+ }
+ Bitmap bmp = new Bitmap (pictureBox1.Width,
+ pictureBox1.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _drawningShip.DrawShip(gr);
+ pictureBox1.Image = bmp;
+ }
+
+
+ private void buttonCreate_Click(object sender, EventArgs e)
+ {
+ Random random = new Random();
+ _drawningShip = new DrawingContainerShip();
+ EntityContainerShip _entitycont = new EntityContainerShip();
+ _entitycont.Init(random.Next(100, 300),
+ random.Next(1000, 3000),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
+ random.Next(0, 256)),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
+ random.Next(0, 256)),
+ Convert.ToBoolean(random.Next(0, 2)),
+ Convert.ToBoolean(random.Next(0, 2)));
+ /*_drawningShip.Init(random.Next(100, 300),
+ random.Next(1000, 3000),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
+ random.Next(0, 256)),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
+ random.Next(0, 256)),
+ Convert.ToBoolean(random.Next(0, 2)),
+ Convert.ToBoolean(random.Next(0, 2)),
+ pictureBox1.Width, pictureBox1.Height);*/
+ _drawningShip.Init(_entitycont, pictureBox1.Width, pictureBox1.Height);
+ _drawningShip.SetPosition(random.Next(10, 100),
+ random.Next(10, 100));
+ Draw();
+ }
+ private void buttonMove_Click(object sender, EventArgs e)
+ {
+ if (_drawningShip == null)
+ {
+ return;
+ }
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ switch (name)
+ {
+ case "buttonUp":
+ _drawningShip.MoveTransport(Direction.Up);
+ break;
+ case "buttonDown":
+ _drawningShip.MoveTransport(Direction.Down);
+ break;
+ case "buttonLeft":
+ _drawningShip.MoveTransport(Direction.Left);
+ break;
+ case "buttonRight":
+ _drawningShip.MoveTransport(Direction.Right);
+ break;
+ }
+ Draw();
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Form1.resx b/Lab1ContainersShip/Lab1ContainersShip/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Lab1ContainersShip.csproj b/Lab1ContainersShip/Lab1ContainersShip/Lab1ContainersShip.csproj
new file mode 100644
index 0000000..4afc3bc
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Lab1ContainersShip.csproj
@@ -0,0 +1,99 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {AFA56719-1551-4DFA-9EC2-1FD7AB801A5E}
+ WinExe
+ Lab1ContainersShip
+ Lab1ContainersShip
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Program.cs b/Lab1ContainersShip/Lab1ContainersShip/Program.cs
new file mode 100644
index 0000000..c4c1a15
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Lab1ContainersShip
+{
+ internal static class Program
+ {
+ ///
+ /// Главная точка входа для приложения.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Properties/AssemblyInfo.cs b/Lab1ContainersShip/Lab1ContainersShip/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..70bb622
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
+// связанных со сборкой.
+[assembly: AssemblyTitle("Lab1ContainersShip")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Lab1ContainersShip")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// COM, следует установить атрибут ComVisible в TRUE для этого типа.
+[assembly: ComVisible(false)]
+
+// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
+[assembly: Guid("afa56719-1551-4dfa-9ec2-1fd7ab801a5e")]
+
+// Сведения о версии сборки состоят из указанных ниже четырех значений:
+//
+// Основной номер версии
+// Дополнительный номер версии
+// Номер сборки
+// Редакция
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Properties/Resources.Designer.cs b/Lab1ContainersShip/Lab1ContainersShip/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..82b82fb
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace Lab1ContainersShip.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("Lab1ContainersShip.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 photo {
+ get {
+ object obj = ResourceManager.GetObject("photo", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap photo1 {
+ get {
+ object obj = ResourceManager.GetObject("photo1", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap photo2 {
+ get {
+ object obj = ResourceManager.GetObject("photo2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap photo3 {
+ get {
+ object obj = ResourceManager.GetObject("photo3", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Properties/Resources.resx b/Lab1ContainersShip/Lab1ContainersShip/Properties/Resources.resx
new file mode 100644
index 0000000..c038a19
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/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\photo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\photo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\photo2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\photo3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
\ No newline at end of file
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.Designer.cs b/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..f574265
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Lab1ContainersShip.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.settings b/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/Lab1ContainersShip/Lab1ContainersShip/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Resources/photo.png b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo.png
new file mode 100644
index 0000000..3c4aefc
Binary files /dev/null and b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo.png differ
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Resources/photo1.png b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo1.png
new file mode 100644
index 0000000..2e7f642
Binary files /dev/null and b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo1.png differ
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Resources/photo2.png b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo2.png
new file mode 100644
index 0000000..9d1815e
Binary files /dev/null and b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo2.png differ
diff --git a/Lab1ContainersShip/Lab1ContainersShip/Resources/photo3.png b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo3.png
new file mode 100644
index 0000000..bde4fdd
Binary files /dev/null and b/Lab1ContainersShip/Lab1ContainersShip/Resources/photo3.png differ