From 18c757b9ec23bdf7b98b42c8039f6a271269d97f Mon Sep 17 00:00:00 2001 From: Oleg_Racheevsky Date: Wed, 27 Mar 2024 14:17:11 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D0=A0=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=20=E2=84=961?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LabOOP_1/LabOOP_1/DirectionType.cs | 32 +++ LabOOP_1/LabOOP_1/DrawningCatamaran.cs | 237 ++++++++++++++++++ LabOOP_1/LabOOP_1/EntityCatamaran.cs | 72 ++++++ LabOOP_1/LabOOP_1/Form1.Designer.cs | 39 --- LabOOP_1/LabOOP_1/Form1.cs | 10 - LabOOP_1/LabOOP_1/FormCatamaran.Designer.cs | 133 ++++++++++ LabOOP_1/LabOOP_1/FormCatamaran.cs | 91 +++++++ .../{Form1.resx => FormCatamaran.resx} | 50 ++-- LabOOP_1/LabOOP_1/LabOOP_1.csproj | 15 ++ LabOOP_1/LabOOP_1/Program.cs | 2 +- .../LabOOP_1/Properties/Resources.Designer.cs | 103 ++++++++ LabOOP_1/LabOOP_1/Properties/Resources.resx | 133 ++++++++++ LabOOP_1/LabOOP_1/Resources/down.png | Bin 0 -> 1474 bytes LabOOP_1/LabOOP_1/Resources/left.png | Bin 0 -> 1486 bytes LabOOP_1/LabOOP_1/Resources/right.png | Bin 0 -> 1464 bytes LabOOP_1/LabOOP_1/Resources/up.png | Bin 0 -> 1437 bytes ...{ProjectCanoe.sln => ProjectCatamaran.sln} | 0 17 files changed, 842 insertions(+), 75 deletions(-) create mode 100644 LabOOP_1/LabOOP_1/DirectionType.cs create mode 100644 LabOOP_1/LabOOP_1/DrawningCatamaran.cs create mode 100644 LabOOP_1/LabOOP_1/EntityCatamaran.cs delete mode 100644 LabOOP_1/LabOOP_1/Form1.Designer.cs delete mode 100644 LabOOP_1/LabOOP_1/Form1.cs create mode 100644 LabOOP_1/LabOOP_1/FormCatamaran.Designer.cs create mode 100644 LabOOP_1/LabOOP_1/FormCatamaran.cs rename LabOOP_1/LabOOP_1/{Form1.resx => FormCatamaran.resx} (93%) create mode 100644 LabOOP_1/LabOOP_1/Properties/Resources.Designer.cs create mode 100644 LabOOP_1/LabOOP_1/Properties/Resources.resx create mode 100644 LabOOP_1/LabOOP_1/Resources/down.png create mode 100644 LabOOP_1/LabOOP_1/Resources/left.png create mode 100644 LabOOP_1/LabOOP_1/Resources/right.png create mode 100644 LabOOP_1/LabOOP_1/Resources/up.png rename LabOOP_1/{ProjectCanoe.sln => ProjectCatamaran.sln} (100%) diff --git a/LabOOP_1/LabOOP_1/DirectionType.cs b/LabOOP_1/LabOOP_1/DirectionType.cs new file mode 100644 index 0000000..b2f3d36 --- /dev/null +++ b/LabOOP_1/LabOOP_1/DirectionType.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LabOOP_1 +{ + public enum DirectionType + { + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 + } +} + diff --git a/LabOOP_1/LabOOP_1/DrawningCatamaran.cs b/LabOOP_1/LabOOP_1/DrawningCatamaran.cs new file mode 100644 index 0000000..1a75fa1 --- /dev/null +++ b/LabOOP_1/LabOOP_1/DrawningCatamaran.cs @@ -0,0 +1,237 @@ +using LabOOP_1; +using System.Xml.Resolvers; + +namespace ProjectCatamaran; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningCatamaran +{ + /// + /// Класс-сущность + /// + public EntityCatamaran? EntityCatamaran { get; private set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки катамарана + /// + private int? _startPosX; + + /// + /// Верхняя кооридната прорисовки катамарана + /// + private int? _startPosY; + + /// + /// Ширина прорисовки катамарана + /// + private readonly int _drawningCatamaranWidth = 110; + + /// + /// Высота прорисовки катамарана + /// + private readonly int _drawningCatamaranHeight = 90; + + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия обвеса + /// Признак наличия мачты + /// Признак наличия поплавков + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool sail, bool floats) + { + EntityCatamaran = new EntityCatamaran(); + EntityCatamaran.Init(speed, weight, bodyColor, additionalColor, bodyKit, sail, floats); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + if (width > _drawningCatamaranWidth && height > _drawningCatamaranHeight) + { + _pictureWidth = width; + _pictureHeight = height; + if (_startPosX != null && _startPosY != null) + { + if (_startPosX.Value < 0) _startPosX = 0; + if (_startPosY.Value < 0) _startPosY = 0; + if (_startPosX.Value + _drawningCatamaranWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningCatamaranWidth; + } + if (_startPosY.Value + _drawningCatamaranHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningCatamaranHeight; + } + } + + return true; + } + return false; + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + + else + { + _startPosX = x; + _startPosY = y; + if (_startPosX.Value < 0) _startPosX = 0; + if (_startPosY.Value < 0) _startPosY = 0; + if (_startPosX.Value + _drawningCatamaranWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningCatamaranWidth; + } + if (_startPosY.Value + _drawningCatamaranHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningCatamaranHeight; + } + } + + + // TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах + _startPosX = x; + _startPosY = y; + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntityCatamaran == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntityCatamaran.Step > 0) + { + _startPosX -= (int)EntityCatamaran.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntityCatamaran.Step > 0) + { + _startPosY -= (int)EntityCatamaran.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + EntityCatamaran.Step + _drawningCatamaranWidth < _pictureWidth) + { + _startPosX += (int)EntityCatamaran.Step; + } + + return true; + //вниз + case DirectionType.Down: + if (_startPosY.Value + EntityCatamaran.Step + _drawningCatamaranHeight < _pictureHeight) + { + _startPosY += (int)EntityCatamaran.Step; + } + return true; + default: + return false; + } + } + + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntityCatamaran == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + pen.Width = 2; + Brush additionalBrush = new SolidBrush(EntityCatamaran.AdditionalColor); + + // палуба + if (EntityCatamaran.Deck) + { + g.FillEllipse(additionalBrush, _startPosX.Value + 15, _startPosY.Value + 40, 60, 20); + } + + + if (EntityCatamaran.Sail) + { + g.DrawLine(pen, _startPosX.Value + 40, _startPosY.Value + 50, _startPosX.Value + 75, _startPosY.Value + 30); + g.DrawLine(pen, _startPosX.Value + 75, _startPosY.Value + 30, _startPosX.Value + 110, _startPosY.Value + 35); + g.DrawLine(pen, _startPosX.Value + 110, _startPosY.Value + 35, _startPosX.Value + 50, _startPosY.Value + 40); + + + } + + + //границы судна + g.DrawLine(pen, _startPosX.Value + 10, _startPosY.Value + 60, _startPosX.Value + 80, _startPosY.Value + 60); + g.DrawLine(pen, _startPosX.Value + 10, _startPosY.Value + 60, _startPosX.Value + 10, _startPosY.Value + 40); + g.DrawLine(pen, _startPosX.Value + 10, _startPosY.Value + 40, _startPosX.Value + 80, _startPosY.Value + 40); + g.DrawLine(pen, _startPosX.Value + 80, _startPosY.Value + 40, _startPosX.Value + 100, _startPosY.Value + 50); + g.DrawLine(pen, _startPosX.Value + 80, _startPosY.Value + 60, _startPosX.Value + 100, _startPosY.Value + 50); + //отрисовка цвета палубы + g.DrawEllipse(pen, _startPosX.Value + 15, _startPosY.Value + 40, 60, 20); + /// g.FillEllipse(additionalBrush, _startPosX.Value + 15, _startPosY.Value + 40, 60, 20); + + // отрисовка поплавков + if (EntityCatamaran.Floats) + { + g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 60, _startPosX.Value + 45, _startPosY.Value + 75); + g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 40, _startPosX.Value + 45, _startPosY.Value + 25); + g.DrawEllipse(pen, _startPosX.Value + 0, _startPosY.Value + 75, 100, 15); + g.DrawEllipse(pen, _startPosX.Value + 0, _startPosY.Value + 10, 100, 15); + + g.FillEllipse(additionalBrush, _startPosX.Value + 0, _startPosY.Value + 75, 100, 15); + g.FillEllipse(additionalBrush, _startPosX.Value + 0, _startPosY.Value + 10, 100, 15); + + } + + + } +} \ No newline at end of file diff --git a/LabOOP_1/LabOOP_1/EntityCatamaran.cs b/LabOOP_1/LabOOP_1/EntityCatamaran.cs new file mode 100644 index 0000000..90870ce --- /dev/null +++ b/LabOOP_1/LabOOP_1/EntityCatamaran.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LabOOP_1; + +public class EntityCatamaran +{ + /// + /// Скорость + /// + 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 Deck { get; private set; } + + /// + /// Признак (опция) наличия + /// + public bool Sail { get; private set; } + + /// + /// Признак (опция) наличия мачты + /// + public bool Floats { get; private set; } + + /// + /// Шаг перемещения катамарана + /// + public double Step => Speed * 100 / Weight; + + /// + /// Инициализация полей объекта-класса катамарана + /// + /// Скорость + /// Вес катамарана + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия палубы + /// Признак наличия мачты + /// Признак наличия поплавков + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool deck, bool sail, bool floats) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Deck = deck; + Sail = sail; + Floats = floats; + } +} + diff --git a/LabOOP_1/LabOOP_1/Form1.Designer.cs b/LabOOP_1/LabOOP_1/Form1.Designer.cs deleted file mode 100644 index 454669e..0000000 --- a/LabOOP_1/LabOOP_1/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace LabOOP_1 -{ - 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 - } -} diff --git a/LabOOP_1/LabOOP_1/Form1.cs b/LabOOP_1/LabOOP_1/Form1.cs deleted file mode 100644 index 9e38387..0000000 --- a/LabOOP_1/LabOOP_1/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace LabOOP_1 -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/LabOOP_1/LabOOP_1/FormCatamaran.Designer.cs b/LabOOP_1/LabOOP_1/FormCatamaran.Designer.cs new file mode 100644 index 0000000..51942c9 --- /dev/null +++ b/LabOOP_1/LabOOP_1/FormCatamaran.Designer.cs @@ -0,0 +1,133 @@ +namespace LabOOP_1 +{ + partial class FormCatamaran + { + /// + /// 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() + { + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonDown = new Button(); + buttonUp = new Button(); + buttonRight = new Button(); + pictureBoxCatamaran = new PictureBox(); + ((System.ComponentModel.ISupportInitialize)pictureBoxCatamaran).BeginInit(); + SuspendLayout(); + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(12, 404); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(112, 34); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Заспавнить"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.left; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(641, 394); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.down; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(682, 394); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 3; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.up; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(682, 353); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 4; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.right; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(723, 394); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 5; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // pictureBoxCatamaran + // + pictureBoxCatamaran.Dock = DockStyle.Fill; + pictureBoxCatamaran.Location = new Point(0, 0); + pictureBoxCatamaran.Name = "pictureBoxCatamaran"; + pictureBoxCatamaran.Size = new Size(800, 450); + pictureBoxCatamaran.TabIndex = 6; + pictureBoxCatamaran.TabStop = false; + // + // FormCatamaran + // + AutoScaleDimensions = new SizeF(10F, 25F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(buttonRight); + Controls.Add(buttonUp); + Controls.Add(buttonDown); + Controls.Add(buttonLeft); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxCatamaran); + Name = "FormCatamaran"; + Text = "Катамаран"; + ((System.ComponentModel.ISupportInitialize)pictureBoxCatamaran).EndInit(); + ResumeLayout(false); + } + + #endregion + private Button buttonCreate; + private Button buttonLeft; + private Button buttonDown; + private Button buttonUp; + private Button buttonRight; + private PictureBox pictureBoxCatamaran; + } +} \ No newline at end of file diff --git a/LabOOP_1/LabOOP_1/FormCatamaran.cs b/LabOOP_1/LabOOP_1/FormCatamaran.cs new file mode 100644 index 0000000..5208354 --- /dev/null +++ b/LabOOP_1/LabOOP_1/FormCatamaran.cs @@ -0,0 +1,91 @@ +using ProjectCatamaran; +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 LabOOP_1 +{ + public partial class FormCatamaran : Form + { + private DrawningCatamaran? _drawningCatamaran; + + public FormCatamaran() + { + InitializeComponent(); + } + + private void Draw() + { + if (_drawningCatamaran == null) + { + return; + } + + Bitmap bmp = new(pictureBoxCatamaran.Width, pictureBoxCatamaran.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningCatamaran.DrawTransport(gr); + pictureBoxCatamaran.Image = bmp; + } + + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void buttonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningCatamaran = new DrawningCatamaran(); + _drawningCatamaran.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)), Convert.ToBoolean(random.Next(0, 2))); + _drawningCatamaran.SetPictureSize(pictureBoxCatamaran.Width, pictureBoxCatamaran.Height); + _drawningCatamaran.SetPosition(random.Next(10, 100), random.Next(10, 100)); + Draw(); + } + + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningCatamaran == null) + { + return; + } + + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningCatamaran.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningCatamaran.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningCatamaran.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningCatamaran.MoveTransport(DirectionType.Right); + break; + } + + if (result) + { + Draw(); + } + } + } + +} diff --git a/LabOOP_1/LabOOP_1/Form1.resx b/LabOOP_1/LabOOP_1/FormCatamaran.resx similarity index 93% rename from LabOOP_1/LabOOP_1/Form1.resx rename to LabOOP_1/LabOOP_1/FormCatamaran.resx index 1af7de1..af32865 100644 --- a/LabOOP_1/LabOOP_1/Form1.resx +++ b/LabOOP_1/LabOOP_1/FormCatamaran.resx @@ -1,17 +1,17 @@  - diff --git a/LabOOP_1/LabOOP_1/LabOOP_1.csproj b/LabOOP_1/LabOOP_1/LabOOP_1.csproj index e1a0735..244387d 100644 --- a/LabOOP_1/LabOOP_1/LabOOP_1.csproj +++ b/LabOOP_1/LabOOP_1/LabOOP_1.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/LabOOP_1/LabOOP_1/Program.cs b/LabOOP_1/LabOOP_1/Program.cs index 5274aa4..1352ff5 100644 --- a/LabOOP_1/LabOOP_1/Program.cs +++ b/LabOOP_1/LabOOP_1/Program.cs @@ -11,7 +11,7 @@ namespace LabOOP_1 // 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 FormCatamaran()); } } } \ No newline at end of file diff --git a/LabOOP_1/LabOOP_1/Properties/Resources.Designer.cs b/LabOOP_1/LabOOP_1/Properties/Resources.Designer.cs new file mode 100644 index 0000000..507e171 --- /dev/null +++ b/LabOOP_1/LabOOP_1/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace LabOOP_1.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("LabOOP_1.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/LabOOP_1/LabOOP_1/Properties/Resources.resx b/LabOOP_1/LabOOP_1/Properties/Resources.resx new file mode 100644 index 0000000..53ec0b4 --- /dev/null +++ b/LabOOP_1/LabOOP_1/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\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/LabOOP_1/LabOOP_1/Resources/down.png b/LabOOP_1/LabOOP_1/Resources/down.png new file mode 100644 index 0000000000000000000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!=lR8@2bKI-K($jd zR#OnaoL5;v)ZnCVK+RmJ3X3eDOGWND@IX1^qP65_TSWM>lf zF;G3~k;@n_=U{V$57V56o+7l+orba98p^i&OeA&buLGv)Sh1{f8C^G;Eebbjt!eJ|-q6NRmx<+H{d{ z4}QOvp^292o~MOKX#HoWY(;kZzl^YauR>*r{}Rz2^wZ}plM-IW0i*~05?*ilbkoRk zprmYmmwm+TZD}W)OSrGd_A4!J?j2h$&WKp(nZ=1^X@_O1-RuPu!=-n-0hcgi$ph$f z9elcyDNbpQi{a4GZ!q>Sz_fg^7Pv%TXNu!a!hhAN6=*XLsiK{=;V>~m3)^|5L=#ef_?kh=%CcZh8y0}jI!7SiZT_!5zUJXwPkFSgY4VG$z%jVOcyqB*?AHDuT-k6sTD{CrEIb}H6t>{wz zTqbFJub7}m*4sLd#5ayUFT)pGN2c1KHn(0_S}oG~-sIMo#l=lTR+F3Rrqc`uVGjmA Lp8nJtcRKffQhte* literal 0 HcmV?d00001 diff --git a/LabOOP_1/LabOOP_1/Resources/right.png b/LabOOP_1/LabOOP_1/Resources/right.png new file mode 100644 index 0000000000000000000000000000000000000000..2185deab9cdbeda7ca4bf6a7f6bd11032ce2263c GIT binary patch literal 1464 zcmX|BdoXch?*pMMiF2_(uHFjmjWm9r8VlZPcrp35~qt%{u zozRjr<4&7v$kq_KmRkl}jCDy(k<0AQKl_~XzVCUy_j#T_-ao!nFYSMAGm8>GrM(dW~ir7{_B&9#3nh7a(=w3W5eC4688_g@{j^ z3@<>U@FKKizA?5s{+zs8<#7Eej#2(tuWTY+szsn&Dqji!K2hm*tC2cmlf2nxYY$C$ za}<~)6S((S#W;kS9SFA_MPfOBjpVzWmP61CpF*Uyj6egU2AVK{2L0S zb~<-}9TiAAm`Q_ND@p|Jiv%lre0kpe!wE@PHwnez!-j+ zdGi-)INsfp2lhg(zkRtB;SYPa|pgQWUdJCOmfdz#Fm z_N0|=;?-`wFm;MTHH6@h5Q%$en71(7(T`BglC4HP>!rV4NmO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