From b05d49640882468e187fe2eac95901884707e353 Mon Sep 17 00:00:00 2001 From: devil_1nc Date: Tue, 13 Feb 2024 14:51:17 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D1=87=D0=B0=D1=81=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectSeaplane/DirectionType.cs | 26 ++ .../ProjectSeaplane/DrawningSeaplane.cs | 268 ++++++++++++++++++ .../ProjectSeaplane/EntitySeaplane.cs | 68 +++++ .../ProjectSeaplane/Form1.Designer.cs | 39 --- ProjectSeaplane/ProjectSeaplane/Form1.cs | 10 - .../ProjectSeaplane/FormSeaplane.Designer.cs | 130 +++++++++ .../ProjectSeaplane/FormSeaplane.cs | 40 +++ .../{Form1.resx => FormSeaplane.resx} | 50 ++-- ProjectSeaplane/ProjectSeaplane/Program.cs | 2 +- .../ProjectSeaplane/ProjectSeaplane.csproj | 15 + .../Properties/Resources.Designer.cs | 103 +++++++ .../ProjectSeaplane/Properties/Resources.resx | 133 +++++++++ .../ProjectSeaplane/Resources/arrow_down.png | Bin 0 -> 7619 bytes .../ProjectSeaplane/Resources/arrow_left.png | Bin 0 -> 8208 bytes .../ProjectSeaplane/Resources/arrow_right.png | Bin 0 -> 7698 bytes .../ProjectSeaplane/Resources/arrow_up.png | Bin 0 -> 8048 bytes 16 files changed, 809 insertions(+), 75 deletions(-) create mode 100644 ProjectSeaplane/ProjectSeaplane/DirectionType.cs create mode 100644 ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs create mode 100644 ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs delete mode 100644 ProjectSeaplane/ProjectSeaplane/Form1.Designer.cs delete mode 100644 ProjectSeaplane/ProjectSeaplane/Form1.cs create mode 100644 ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs create mode 100644 ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs rename ProjectSeaplane/ProjectSeaplane/{Form1.resx => FormSeaplane.resx} (93%) create mode 100644 ProjectSeaplane/ProjectSeaplane/Properties/Resources.Designer.cs create mode 100644 ProjectSeaplane/ProjectSeaplane/Properties/Resources.resx create mode 100644 ProjectSeaplane/ProjectSeaplane/Resources/arrow_down.png create mode 100644 ProjectSeaplane/ProjectSeaplane/Resources/arrow_left.png create mode 100644 ProjectSeaplane/ProjectSeaplane/Resources/arrow_right.png create mode 100644 ProjectSeaplane/ProjectSeaplane/Resources/arrow_up.png diff --git a/ProjectSeaplane/ProjectSeaplane/DirectionType.cs b/ProjectSeaplane/ProjectSeaplane/DirectionType.cs new file mode 100644 index 0000000..ef50542 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/DirectionType.cs @@ -0,0 +1,26 @@ +namespace ProjectSeaplane; +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 +} \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs new file mode 100644 index 0000000..d1bd771 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs @@ -0,0 +1,268 @@ +namespace ProjectSeaplane; +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningSeaplane +{ + /// + /// Класс-сущность + /// + public EntitySeaplane? EntitySportCar { get; private set; } + /// + /// Ширина окна + /// + private int? _pictureWidth; + /// + /// Высота окна + /// + private int? _pictureHeight; + /// + /// Левая координата прорисовки автомобиля + /// + private int? _startPosX; + /// + /// Верхняя кооридната прорисовки автомобиля + /// + private int? _startPosY; + /// + /// Ширина прорисовки автомобиля + /// + private readonly int _drawningCarWidth = 110; + /// + /// Высота прорисовки автомобиля + /// + private readonly int _drawningCarHeight = 60; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия обвеса + /// Признак наличия антикрыла + /// Признак наличия гоночной полосы + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool wing, bool sportLine) + { + EntitySportCar = new EntitySeaplane(); + EntitySportCar.Init(speed, weight, bodyColor, additionalColor, + bodyKit, wing, sportLine); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // TODO проверка, что объект "влезает" в размеры поля + // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена + _pictureWidth = width; + _pictureHeight = height; + return true; + } + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + // TODO если при установке объекта в эти координаты, он будет + "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах +12 + _startPosX = x; + _startPosY = y; + } + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение + невозможно +public bool MoveTransport(DirectionType direction) + { + if (EntitySportCar == null || !_startPosX.HasValue || + !_startPosY.HasValue) + { + return false; + } + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntitySportCar.Step > 0) + { + _startPosX -= (int)EntitySportCar.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntitySportCar.Step > 0) + { + _startPosY -= (int)EntitySportCar.Step; + } + return true; + // вправо + case DirectionType.Right: + //TODO прописать логику сдвига в право + return true; + //вниз + case DirectionType.Down: + //TODO прописать логику сдвига в вниз + return true; + default: + return false; + } + } + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntitySportCar == null || !_startPosX.HasValue || + !_startPosY.HasValue) + { + return; + } + Pen pen = new(Color.Black); + Brush additionalBrush = new + SolidBrush(EntitySportCar.AdditionalColor); + // обвесы + 13 + if (EntitySportCar.BodyKit) + { + g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value, + 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + + 40, 20, 20); + g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + + 10, 20, 40); + g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value, + 15, 15); + g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + + 45, 15, 15); + g.FillEllipse(additionalBrush, _startPosX.Value + 90, + _startPosY.Value, 20, 20); + g.FillEllipse(additionalBrush, _startPosX.Value + 90, + _startPosY.Value + 40, 20, 20); + g.FillRectangle(additionalBrush, _startPosX.Value + 90, + _startPosY.Value + 10, 20, 40); + g.FillRectangle(additionalBrush, _startPosX.Value + 90, + _startPosY.Value + 1, 15, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 90, + _startPosY.Value + 45, 15, 15); + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value, 20, + 20); + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 40, + 20, 20); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 10, + 20, 40); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value, + 14, 15); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + + 45, 14, 15); + g.FillEllipse(additionalBrush, _startPosX.Value, + _startPosY.Value, 20, 20); + g.FillEllipse(additionalBrush, _startPosX.Value, + _startPosY.Value + 40, 20, 20); + g.FillRectangle(additionalBrush, _startPosX.Value + 1, + _startPosY.Value + 10, 25, 40); + g.FillRectangle(additionalBrush, _startPosX.Value + 5, + _startPosY.Value + 1, 15, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 5, + _startPosY.Value + 45, 15, 15); + g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value, + 39, 15); + g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + + 45, 39, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 35, + _startPosY.Value + 1, 40, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 35, + _startPosY.Value + 45, 40, 15); + } + //границы автомобиля + g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 5, 20, + 20); + g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 35, 20, + 20); + g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 5, 20, + 20); + 14 + g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 35, 20, + 20); + g.DrawRectangle(pen, _startPosX.Value + 9, _startPosY.Value + 15, 10, + 30); + g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + 15, + 10, 30); + g.DrawRectangle(pen, _startPosX.Value + 20, _startPosY.Value + 4, 70, + 52); + //задние фары + Brush brRed = new SolidBrush(Color.Red); + g.FillEllipse(brRed, _startPosX.Value + 10, _startPosY.Value + 5, 20, + 20); + g.FillEllipse(brRed, _startPosX.Value + 10, _startPosY.Value + 35, + 20, 20); + //передние фары + Brush brYellow = new SolidBrush(Color.Yellow); + g.FillEllipse(brYellow, _startPosX.Value + 80, _startPosY.Value + 5, + 20, 20); + g.FillEllipse(brYellow, _startPosX.Value + 80, _startPosY.Value + 35, + 20, 20); + //кузов + Brush br = new SolidBrush(EntitySportCar.BodyColor); + g.FillRectangle(br, _startPosX.Value + 10, _startPosY.Value + 15, 10, + 30); + g.FillRectangle(br, _startPosX.Value + 90, _startPosY.Value + 15, 10, + 30); + g.FillRectangle(br, _startPosX.Value + 20, _startPosY.Value + 5, 70, + 50); + //стекла + Brush brBlue = new SolidBrush(Color.LightBlue); + g.FillRectangle(brBlue, _startPosX.Value + 70, _startPosY.Value + 10, + 5, 40); + g.FillRectangle(brBlue, _startPosX.Value + 30, _startPosY.Value + 10, + 5, 40); + g.FillRectangle(brBlue, _startPosX.Value + 35, _startPosY.Value + 8, + 35, 2); + g.FillRectangle(brBlue, _startPosX.Value + 35, _startPosY.Value + 51, + 35, 2); + //выделяем рамкой крышу + g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 10, + 35, 40); + g.DrawRectangle(pen, _startPosX.Value + 75, _startPosY.Value + 15, + 25, 30); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 15, + 15, 30); + // спортивная линия + if (EntitySportCar.SportLine) + { + g.FillRectangle(additionalBrush, _startPosX.Value + 75, + _startPosY.Value + 23, 25, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 35, + _startPosY.Value + 23, 35, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 10, + _startPosY.Value + 23, 20, 15); + } + // крыло + if (EntitySportCar.Wing) + 15 + { + g.FillRectangle(additionalBrush, _startPosX.Value, + _startPosY.Value + 5, 10, 50); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 5, + 10, 50); + } + } +} \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs b/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs new file mode 100644 index 0000000..3503966 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs @@ -0,0 +1,68 @@ +namespace ProjectSeaplane; +/// +/// Класс-сущность "Спортивный автомобиль" +/// +public class EntitySeaplane +{ + /// + /// Скорость + /// + 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 BodyKit { get; private set; } + + /// + /// Признак (опция) наличия антикрыла + /// + public bool Wing { get; private set; } + + /// + /// Признак (опция) наличия гоночной полосы + /// + public bool SportLine { get; private set; } + + /// + /// Шаг перемещения автомобиля + /// + public double Step => Speed * 100 / Weight; + + /// + /// Инициализация полей объекта-класса спортивного автомобиля + /// + /// Скорость + /// Вес автомобиля + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия обвеса + /// Признак наличия антикрыла + /// Признак наличия гоночной полосы + public void Init(int speed, double weight, Color bodyColor, Color + additionalColor, bool bodyKit, bool wing, bool sportLine) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + BodyKit = bodyKit; + Wing = wing; + SportLine = sportLine; + } +} diff --git a/ProjectSeaplane/ProjectSeaplane/Form1.Designer.cs b/ProjectSeaplane/ProjectSeaplane/Form1.Designer.cs deleted file mode 100644 index 8e222d3..0000000 --- a/ProjectSeaplane/ProjectSeaplane/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectSeaplane -{ - 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/ProjectSeaplane/ProjectSeaplane/Form1.cs b/ProjectSeaplane/ProjectSeaplane/Form1.cs deleted file mode 100644 index 4a978b3..0000000 --- a/ProjectSeaplane/ProjectSeaplane/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectSeaplane -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs new file mode 100644 index 0000000..7ef955e --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs @@ -0,0 +1,130 @@ +namespace ProjectSeaplane +{ + partial class FormSeaplane + { + /// + /// 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() + { + pictureBoxSeaplane = new PictureBox(); + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonDown = new Button(); + buttonRight = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxSeaplane).BeginInit(); + SuspendLayout(); + // + // pictureBoxSeaplane + // + pictureBoxSeaplane.Dock = DockStyle.Fill; + pictureBoxSeaplane.Location = new Point(0, 0); + pictureBoxSeaplane.Name = "pictureBoxSeaplane"; + pictureBoxSeaplane.Size = new Size(850, 539); + pictureBoxSeaplane.TabIndex = 0; + pictureBoxSeaplane.TabStop = false; + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(12, 504); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(75, 23); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.arrow_left; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(718, 490); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.arrow_up; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(758, 450); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 3; + buttonUp.UseVisualStyleBackColor = true; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.arrow_down; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(758, 490); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 4; + buttonDown.UseVisualStyleBackColor = true; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.arrow_right; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(799, 490); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 5; + buttonRight.UseVisualStyleBackColor = true; + // + // FormSeaplane + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(850, 539); + Controls.Add(buttonRight); + Controls.Add(buttonDown); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxSeaplane); + Name = "FormSeaplane"; + Text = "Гидросамолёт"; + ((System.ComponentModel.ISupportInitialize)pictureBoxSeaplane).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBoxSeaplane; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonUp; + private Button buttonDown; + private Button buttonRight; + } +} \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs new file mode 100644 index 0000000..86c3f21 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs @@ -0,0 +1,40 @@ +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 ProjectSeaplane +{ + public partial class FormSeaplane : Form + { + private DrawningSeaplane? _drawningSeaplane; + + public FormSeaplane() + { + InitializeComponent(); + } + + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningSeaplane = new DrawningSeaplane(); + _drawningSeaplane.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))); + _drawningSeaplane.SetPictureSize(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); + _drawningSeaplane.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Bitmap bmp = new(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningSeaplane.DrawTransport(gr); + pictureBoxSeaplane.Image = bmp; + + } + } +} diff --git a/ProjectSeaplane/ProjectSeaplane/Form1.resx b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.resx similarity index 93% rename from ProjectSeaplane/ProjectSeaplane/Form1.resx rename to ProjectSeaplane/ProjectSeaplane/FormSeaplane.resx index 1af7de1..af32865 100644 --- a/ProjectSeaplane/ProjectSeaplane/Form1.resx +++ b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.resx @@ -1,17 +1,17 @@  - diff --git a/ProjectSeaplane/ProjectSeaplane/Program.cs b/ProjectSeaplane/ProjectSeaplane/Program.cs index bcf84b2..4e58da8 100644 --- a/ProjectSeaplane/ProjectSeaplane/Program.cs +++ b/ProjectSeaplane/ProjectSeaplane/Program.cs @@ -11,7 +11,7 @@ namespace ProjectSeaplane // 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 FormSeaplane()); } } } \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj b/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj index e1a0735..244387d 100644 --- a/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj +++ b/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/Properties/Resources.Designer.cs b/ProjectSeaplane/ProjectSeaplane/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ff77389 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectSeaplane.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("ProjectSeaplane.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 arrow_down { + get { + object obj = ResourceManager.GetObject("arrow_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrow_left { + get { + object obj = ResourceManager.GetObject("arrow_left", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrow_right { + get { + object obj = ResourceManager.GetObject("arrow_right", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrow_up { + get { + object obj = ResourceManager.GetObject("arrow_up", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ProjectSeaplane/ProjectSeaplane/Properties/Resources.resx b/ProjectSeaplane/ProjectSeaplane/Properties/Resources.resx new file mode 100644 index 0000000..47aca23 --- /dev/null +++ b/ProjectSeaplane/ProjectSeaplane/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\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrow_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrow_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/ProjectSeaplane/ProjectSeaplane/Resources/arrow_down.png b/ProjectSeaplane/ProjectSeaplane/Resources/arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..769dc0c8f55edbdb6a4e66541c0a10b2ecce1f5a GIT binary patch literal 7619 zcmdUU`9IWM*#DWa4niZ#U6z!|HbtcnWm3|RH3^k9Sy~XHgi(VmZL&m`p)6%rqQp!y z2y=%lsnFOm5oWS9wlUwM@BRGn{0YzJ_3|>G>%7l(-q$(jbI$u*C(hc^bc4ud5dgpj z{PCl<03hK{BoG#a|K>w`mf=7CKx4d}Fnn$bpT7g&5rMX*#-OZSeqz1Q>#)UP04nc` zuDS`pca;Be$3OtY8`u93DVpM208luNKYG|M)OmU^{DG%umXd$_bhb>sknWk*=800f zZMIuPPd{wW>hqOrQu|U~BtNlRJMPQLu~^ftb38eo?|ZTsxovAh<*huzVvKlk z0;^auvUZcF5<(#zsbK)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7I1d7$iw;=rzFYHErH6Dl3lpiIVSO@U7a&ktxE0|XIx z*}$Rt9}z}&Xq6=%b67BvUNhjqoR4{T9N2FP2=NBI)j1bw#g-c4#J!QW&VyaBFD%OY z>b8Hz30xNi8Z+;QOtfy;G@x@tif3Iue(;FY4vnQTzp)v=mFfm(&NX33FM=^?ZIgVxKa=eT>#-cd@sUx1P`vb|Wc_M;axP%RX_e@nq`qFaUhBvW1T4wBe>;C~$>}MSS literal 0 HcmV?d00001 diff --git a/ProjectSeaplane/ProjectSeaplane/Resources/arrow_left.png b/ProjectSeaplane/ProjectSeaplane/Resources/arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..2460900445e78085f89dab5719af5ac4afe291c9 GIT binary patch literal 8208 zcmdsc`9IX%`~R6S)hJ~vgiKk|UDlGQ&|~vo0KGE zDQTv%R1~r|1`#IvzK(f)ujze%ACJ!upTFSa@#rD1bIx_nxz2T-*YkRw+h!&Pn>UJY zLmJTieCxKNe3_B?TMs>$yD^FF1dyp!AWP zmdN`r4JnsDS*Q^5j9&N49k(xDd^-Eg$~Ysga8Sm4*yJPA^bL+Q%yZ%D z&>mRU|A8M3-L?r~Dz4On`KqRlL}42~dT{+yPa$P()SRgvru0)A$MVU}&aNwEjL+^% z{Pd)gGlQAS>kiKDj9zhS{cM#qerq@`utySG{^(S4zcyW48cw+A`}gnvF(8G_1*v|> zNRs{NkX4$ep{X|A+bcOgTjFYUW(5`@E{mVThPS5OXi85>xme^_pLD4*#E8BR zA)lQdZ2ou&Ow?fsGbeAjwlusKjzu(}aPa3!B2_N_ES2Z)BQCJht)TEtA1O+JWGf97F(^8 z3L$GR^$M4B?nDds>F}asy_V%3%ziPpvc^QkfPeKun(7keu?8+2Ryy~()U89xy0F8x zB4lwQbjnuBulEb?xh)r}1y4b#<{=X`Aao+O(~R-{oPH?1x7x!?ksF6jcv)VQ*!CC+7&~g63~Vv0h=C}6?V+hXc_#RdwPnWSLtj)M71h$ZF>?@ z6N@RrB-oEP_w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kE`Q@CpV+zmcn;DJ%K>MsJ{n<_8n3GQ-p|ZMQ$1m0lQ+q?p1*vIQ_Q2fE-*N+ zKDj;(J4*Sova;AR`f(Xps?}`!JBVQOQu*NJgdn#EjPCZJ(ML!K`Nf)lZBOEsmZ2E2 z$H_Ck`PaXZ@{DgpaXL+k9pDotWO?H4V(`A!um k2>svxZnoA(e`Fa!(bcbAW1WDFC;V8QusdF6>VEV80IQUG-~a#s literal 0 HcmV?d00001 -- 2.25.1 From a1e7d192d88721f508ea794c1cb5bf0d33f8a1f1 Mon Sep 17 00:00:00 2001 From: ShuryginDima Date: Mon, 26 Feb 2024 22:32:27 +0300 Subject: [PATCH 2/3] =?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=D1=80=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 --- .../ProjectSeaplane/DrawningSeaplane.cs | 482 ++++++++---------- .../ProjectSeaplane/EntitySeaplane.cs | 30 +- .../ProjectSeaplane/FormSeaplane.Designer.cs | 40 +- .../ProjectSeaplane/FormSeaplane.cs | 111 ++-- 4 files changed, 327 insertions(+), 336 deletions(-) diff --git a/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs index d1bd771..72eba68 100644 --- a/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs +++ b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs @@ -1,268 +1,214 @@ -namespace ProjectSeaplane; -/// -/// Класс, отвечающий за прорисовку и перемещение объекта-сущности -/// -public class DrawningSeaplane -{ - /// - /// Класс-сущность - /// - public EntitySeaplane? EntitySportCar { get; private set; } - /// - /// Ширина окна - /// - private int? _pictureWidth; - /// - /// Высота окна - /// - private int? _pictureHeight; - /// - /// Левая координата прорисовки автомобиля - /// - private int? _startPosX; - /// - /// Верхняя кооридната прорисовки автомобиля - /// - private int? _startPosY; - /// - /// Ширина прорисовки автомобиля - /// - private readonly int _drawningCarWidth = 110; - /// - /// Высота прорисовки автомобиля - /// - private readonly int _drawningCarHeight = 60; - /// - /// Инициализация свойств - /// - /// Скорость - /// Вес - /// Основной цвет - /// Дополнительный цвет - /// Признак наличия обвеса - /// Признак наличия антикрыла - /// Признак наличия гоночной полосы - public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool wing, bool sportLine) - { - EntitySportCar = new EntitySeaplane(); - EntitySportCar.Init(speed, weight, bodyColor, additionalColor, - bodyKit, wing, sportLine); - _pictureWidth = null; - _pictureHeight = null; - _startPosX = null; - _startPosY = null; - } - /// - /// Установка границ поля - /// - /// Ширина поля - /// Высота поля - /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах - public bool SetPictureSize(int width, int height) - { - // TODO проверка, что объект "влезает" в размеры поля - // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена - _pictureWidth = width; - _pictureHeight = height; - return true; - } - /// - /// Установка позиции - /// - /// Координата X - /// Координата Y - public void SetPosition(int x, int y) - { - if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) - { - return; - } - // TODO если при установке объекта в эти координаты, он будет - "выходить" за границы формы - // то надо изменить координаты, чтобы он оставался в этих границах -12 - _startPosX = x; - _startPosY = y; - } - /// - /// Изменение направления перемещения - /// - /// Направление - /// true - перемещене выполнено, false - перемещение - невозможно -public bool MoveTransport(DirectionType direction) - { - if (EntitySportCar == null || !_startPosX.HasValue || - !_startPosY.HasValue) - { - return false; - } - switch (direction) - { - //влево - case DirectionType.Left: - if (_startPosX.Value - EntitySportCar.Step > 0) - { - _startPosX -= (int)EntitySportCar.Step; - } - return true; - //вверх - case DirectionType.Up: - if (_startPosY.Value - EntitySportCar.Step > 0) - { - _startPosY -= (int)EntitySportCar.Step; - } - return true; - // вправо - case DirectionType.Right: - //TODO прописать логику сдвига в право - return true; - //вниз - case DirectionType.Down: - //TODO прописать логику сдвига в вниз - return true; - default: - return false; - } - } - /// - /// Прорисовка объекта - /// - /// - public void DrawTransport(Graphics g) - { - if (EntitySportCar == null || !_startPosX.HasValue || - !_startPosY.HasValue) - { - return; - } - Pen pen = new(Color.Black); - Brush additionalBrush = new - SolidBrush(EntitySportCar.AdditionalColor); - // обвесы - 13 - if (EntitySportCar.BodyKit) - { - g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value, - 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + - 40, 20, 20); - g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + - 10, 20, 40); - g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value, - 15, 15); - g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + - 45, 15, 15); - g.FillEllipse(additionalBrush, _startPosX.Value + 90, - _startPosY.Value, 20, 20); - g.FillEllipse(additionalBrush, _startPosX.Value + 90, - _startPosY.Value + 40, 20, 20); - g.FillRectangle(additionalBrush, _startPosX.Value + 90, - _startPosY.Value + 10, 20, 40); - g.FillRectangle(additionalBrush, _startPosX.Value + 90, - _startPosY.Value + 1, 15, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 90, - _startPosY.Value + 45, 15, 15); - g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value, 20, - 20); - g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 40, - 20, 20); - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 10, - 20, 40); - g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value, - 14, 15); - g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + - 45, 14, 15); - g.FillEllipse(additionalBrush, _startPosX.Value, - _startPosY.Value, 20, 20); - g.FillEllipse(additionalBrush, _startPosX.Value, - _startPosY.Value + 40, 20, 20); - g.FillRectangle(additionalBrush, _startPosX.Value + 1, - _startPosY.Value + 10, 25, 40); - g.FillRectangle(additionalBrush, _startPosX.Value + 5, - _startPosY.Value + 1, 15, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 5, - _startPosY.Value + 45, 15, 15); - g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value, - 39, 15); - g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + - 45, 39, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 35, - _startPosY.Value + 1, 40, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 35, - _startPosY.Value + 45, 40, 15); - } - //границы автомобиля - g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 5, 20, - 20); - g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 35, 20, - 20); - g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 5, 20, - 20); - 14 - g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 35, 20, - 20); - g.DrawRectangle(pen, _startPosX.Value + 9, _startPosY.Value + 15, 10, - 30); - g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + 15, - 10, 30); - g.DrawRectangle(pen, _startPosX.Value + 20, _startPosY.Value + 4, 70, - 52); - //задние фары - Brush brRed = new SolidBrush(Color.Red); - g.FillEllipse(brRed, _startPosX.Value + 10, _startPosY.Value + 5, 20, - 20); - g.FillEllipse(brRed, _startPosX.Value + 10, _startPosY.Value + 35, - 20, 20); - //передние фары - Brush brYellow = new SolidBrush(Color.Yellow); - g.FillEllipse(brYellow, _startPosX.Value + 80, _startPosY.Value + 5, - 20, 20); - g.FillEllipse(brYellow, _startPosX.Value + 80, _startPosY.Value + 35, - 20, 20); - //кузов - Brush br = new SolidBrush(EntitySportCar.BodyColor); - g.FillRectangle(br, _startPosX.Value + 10, _startPosY.Value + 15, 10, - 30); - g.FillRectangle(br, _startPosX.Value + 90, _startPosY.Value + 15, 10, - 30); - g.FillRectangle(br, _startPosX.Value + 20, _startPosY.Value + 5, 70, - 50); - //стекла - Brush brBlue = new SolidBrush(Color.LightBlue); - g.FillRectangle(brBlue, _startPosX.Value + 70, _startPosY.Value + 10, - 5, 40); - g.FillRectangle(brBlue, _startPosX.Value + 30, _startPosY.Value + 10, - 5, 40); - g.FillRectangle(brBlue, _startPosX.Value + 35, _startPosY.Value + 8, - 35, 2); - g.FillRectangle(brBlue, _startPosX.Value + 35, _startPosY.Value + 51, - 35, 2); - //выделяем рамкой крышу - g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 10, - 35, 40); - g.DrawRectangle(pen, _startPosX.Value + 75, _startPosY.Value + 15, - 25, 30); - g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 15, - 15, 30); - // спортивная линия - if (EntitySportCar.SportLine) - { - g.FillRectangle(additionalBrush, _startPosX.Value + 75, - _startPosY.Value + 23, 25, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 35, - _startPosY.Value + 23, 35, 15); - g.FillRectangle(additionalBrush, _startPosX.Value + 10, - _startPosY.Value + 23, 20, 15); - } - // крыло - if (EntitySportCar.Wing) - 15 - { - g.FillRectangle(additionalBrush, _startPosX.Value, - _startPosY.Value + 5, 10, 50); - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 5, - 10, 50); - } - } -} \ No newline at end of file +namespace ProjectSeaplane; +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningSeaplane +{ + /// + /// Класс-сущность + /// + public EntitySeaplane? EntitySeaplane { get; private set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки гидросамолёта + /// + private int? _startPosX; + + /// + /// Верхняя кооридната прорисовки гидросамолёта + /// + private int? _startPosY; + + /// + /// Ширина прорисовки гидросамолёта + /// + private readonly int _drawningSeaplaneWidth = 130; + + /// + /// Высота прорисовки гидросамолёта + /// + private readonly int _drawningSeaplaneHeight = 50; + + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия поплавков + /// Признак наличия лодки + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool floats, bool boat) + { + EntitySeaplane = new EntitySeaplane(); + EntitySeaplane.Init(speed, weight, bodyColor, additionalColor, floats, boat); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // TODO проверка, что объект "влезает" в размеры поля + // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена + _pictureWidth = width; + _pictureHeight = height; + return true; + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + // TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах + + _startPosX = x; + _startPosY = y; + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntitySeaplane == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntitySeaplane.Step > 0) + { + _startPosX -= (int)EntitySeaplane.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntitySeaplane.Step > 0) + { + _startPosY -= (int)EntitySeaplane.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + _drawningSeaplaneWidth + EntitySeaplane.Step < _pictureWidth) + { + _startPosX += (int)EntitySeaplane.Step; + } + return true; + //вниз + case DirectionType.Down: + + if (_startPosY.Value + _drawningSeaplaneHeight + EntitySeaplane.Step < _pictureHeight) + { + _startPosY += (int)EntitySeaplane.Step; + } + return true; + default: + return false; + } + } + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntitySeaplane == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + Pen pen = new(Color.Black, 2); + Brush additionalBrush = new SolidBrush(EntitySeaplane.AdditionalColor); + + + + //Отрисовка основных частей самолёта + Brush br = new SolidBrush(EntitySeaplane.BodyColor); + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 20, 20, 20); + g.FillEllipse(br, _startPosX.Value, _startPosY.Value + 20, 20, 20); + Point point1 = new Point(_startPosX.Value + 10, _startPosY.Value); + Point point2 = new Point(_startPosX.Value + 40, _startPosY.Value + 20); + Point point3 = new Point(_startPosX.Value + 100, _startPosY.Value + 20); + Point point4 = new Point(_startPosX.Value + 130, _startPosY.Value + 30); + Point point5 = new Point(_startPosX.Value + 100, _startPosY.Value + 40); + Point point6 = new Point(_startPosX.Value + 10, _startPosY.Value + 40); + Point[] points = { point1, point2, point3, point4, point5, point6 }; + g.FillPolygon(br, points); + g.DrawPolygon(pen, points); + g.DrawLine(pen, _startPosX.Value + 10, _startPosY.Value + 20, _startPosX.Value + 40, _startPosY.Value + 20); + g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 100, _startPosY.Value + 40); + g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 30, _startPosX.Value + 130, _startPosY.Value + 30); + + //Крылья + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 20, 25, 5); + g.FillEllipse(br, _startPosX.Value, _startPosY.Value + 20, 25, 5); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 25, 40, 10); + g.FillEllipse(br, _startPosX.Value + 30, _startPosY.Value + 25, 40, 10); + + + //Шасси + g.DrawRectangle(pen, _startPosX.Value + 38, _startPosY.Value + 40, 4, 5); + g.DrawRectangle(pen, _startPosX.Value + 88, _startPosY.Value + 40, 4, 5); + g.DrawEllipse(pen, _startPosX.Value + 35, _startPosY.Value + 45, 5, 5); + g.DrawEllipse(pen, _startPosX.Value + 42, _startPosY.Value + 45, 5, 5); + g.DrawEllipse(pen, _startPosX.Value + 87, _startPosY.Value + 45, 5, 5); + + g.FillRectangle(br, _startPosX.Value + 38, _startPosY.Value + 40, 4, 5); + g.FillRectangle(br, _startPosX.Value + 88, _startPosY.Value + 40, 4, 5); + g.FillEllipse(br, _startPosX.Value + 35, _startPosY.Value + 45, 5, 5); + g.FillEllipse(br, _startPosX.Value + 42, _startPosY.Value + 45, 5, 5); + g.FillEllipse(br, _startPosX.Value + 87, _startPosY.Value + 45, 5, 5); + + + //Надувнвя лодка + if (EntitySeaplane.Boat) + { + g.DrawEllipse(pen, _startPosX.Value + 50, _startPosY.Value + 15, 30, 10); + g.FillEllipse(additionalBrush, _startPosX.Value + 50, _startPosY.Value + 15, 30, 10); + + } + + //Поплавки + if (EntitySeaplane.Floats) + { + g.DrawRectangle(pen, _startPosX.Value + 30, _startPosY.Value + 30, 4, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 30, _startPosY.Value + 30, 4, 15); + g.DrawRectangle(pen, _startPosX.Value + 66, _startPosY.Value + 30, 4, 15); + g.FillRectangle(additionalBrush, _startPosX.Value + 66, _startPosY.Value + 30, 4, 15); + g.DrawEllipse(pen, _startPosX.Value + 20, _startPosY.Value + 40, 70, 10); + g.FillEllipse(additionalBrush, _startPosX.Value + 20, _startPosY.Value + 40, 70, 10); + + } + } +} diff --git a/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs b/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs index 3503966..625ccfc 100644 --- a/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs +++ b/ProjectSeaplane/ProjectSeaplane/EntitySeaplane.cs @@ -1,6 +1,6 @@ namespace ProjectSeaplane; /// -/// Класс-сущность "Спортивный автомобиль" +/// Класс-сущность "Гидросамолёт" /// public class EntitySeaplane { @@ -24,45 +24,39 @@ public class EntitySeaplane /// public Color AdditionalColor { get; private set; } - /// - /// Признак (опция) наличия обвеса - /// - public bool BodyKit { get; private set; } /// - /// Признак (опция) наличия антикрыла + /// Признак (опция) наличия поплавков /// - public bool Wing { get; private set; } + public bool Floats { get; private set; } /// - /// Признак (опция) наличия гоночной полосы + /// Признак (опция) наличия лодки /// - public bool SportLine { get; private set; } + public bool Boat { get; private set; } /// - /// Шаг перемещения автомобиля + /// Шаг перемещения гидросамолёта /// public double Step => Speed * 100 / Weight; /// - /// Инициализация полей объекта-класса спортивного автомобиля + /// Инициализация полей объекта-класса гидросамолёта /// /// Скорость /// Вес автомобиля /// Основной цвет /// Дополнительный цвет - /// Признак наличия обвеса - /// Признак наличия антикрыла - /// Признак наличия гоночной полосы + /// Признак наличия поплавков + /// Признак наличия лодки public void Init(int speed, double weight, Color bodyColor, Color - additionalColor, bool bodyKit, bool wing, bool sportLine) + additionalColor, bool floats, bool boat) { Speed = speed; Weight = weight; BodyColor = bodyColor; AdditionalColor = additionalColor; - BodyKit = bodyKit; - Wing = wing; - SportLine = sportLine; + Floats = floats; + Boat = boat; } } diff --git a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs index 7ef955e..fde1660 100644 --- a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs +++ b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.Designer.cs @@ -29,7 +29,7 @@ private void InitializeComponent() { pictureBoxSeaplane = new PictureBox(); - buttonCreate = new Button(); + buttonCreateSeaplane = new Button(); buttonLeft = new Button(); buttonUp = new Button(); buttonDown = new Button(); @@ -42,75 +42,79 @@ pictureBoxSeaplane.Dock = DockStyle.Fill; pictureBoxSeaplane.Location = new Point(0, 0); pictureBoxSeaplane.Name = "pictureBoxSeaplane"; - pictureBoxSeaplane.Size = new Size(850, 539); + pictureBoxSeaplane.Size = new Size(900, 500); pictureBoxSeaplane.TabIndex = 0; pictureBoxSeaplane.TabStop = false; // - // buttonCreate + // buttonCreateSeaplane // - buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonCreate.Location = new Point(12, 504); - buttonCreate.Name = "buttonCreate"; - buttonCreate.Size = new Size(75, 23); - buttonCreate.TabIndex = 1; - buttonCreate.Text = "Создать"; - buttonCreate.UseVisualStyleBackColor = true; - buttonCreate.Click += buttonCreate_Click; + buttonCreateSeaplane.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateSeaplane.Location = new Point(12, 465); + buttonCreateSeaplane.Name = "buttonCreateSeaplane"; + buttonCreateSeaplane.Size = new Size(75, 23); + buttonCreateSeaplane.TabIndex = 1; + buttonCreateSeaplane.Text = "Создать"; + buttonCreateSeaplane.UseVisualStyleBackColor = true; + buttonCreateSeaplane.Click += ButtonCreateSeaplane_Click; // // buttonLeft // buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonLeft.BackgroundImage = Properties.Resources.arrow_left; buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; - buttonLeft.Location = new Point(718, 490); + buttonLeft.Location = new Point(768, 451); buttonLeft.Name = "buttonLeft"; buttonLeft.Size = new Size(35, 35); buttonLeft.TabIndex = 2; buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; // // buttonUp // buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonUp.BackgroundImage = Properties.Resources.arrow_up; buttonUp.BackgroundImageLayout = ImageLayout.Stretch; - buttonUp.Location = new Point(758, 450); + buttonUp.Location = new Point(808, 411); buttonUp.Name = "buttonUp"; buttonUp.Size = new Size(35, 35); buttonUp.TabIndex = 3; buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; // // buttonDown // buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonDown.BackgroundImage = Properties.Resources.arrow_down; buttonDown.BackgroundImageLayout = ImageLayout.Stretch; - buttonDown.Location = new Point(758, 490); + buttonDown.Location = new Point(808, 451); buttonDown.Name = "buttonDown"; buttonDown.Size = new Size(35, 35); buttonDown.TabIndex = 4; buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; // // buttonRight // buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonRight.BackgroundImage = Properties.Resources.arrow_right; buttonRight.BackgroundImageLayout = ImageLayout.Stretch; - buttonRight.Location = new Point(799, 490); + buttonRight.Location = new Point(849, 451); buttonRight.Name = "buttonRight"; buttonRight.Size = new Size(35, 35); buttonRight.TabIndex = 5; buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; // // FormSeaplane // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(850, 539); + ClientSize = new Size(900, 500); Controls.Add(buttonRight); Controls.Add(buttonDown); Controls.Add(buttonUp); Controls.Add(buttonLeft); - Controls.Add(buttonCreate); + Controls.Add(buttonCreateSeaplane); Controls.Add(pictureBoxSeaplane); Name = "FormSeaplane"; Text = "Гидросамолёт"; @@ -121,7 +125,7 @@ #endregion private PictureBox pictureBoxSeaplane; - private Button buttonCreate; + private Button buttonCreateSeaplane; private Button buttonLeft; private Button buttonUp; private Button buttonDown; diff --git a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs index 86c3f21..8781929 100644 --- a/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs +++ b/ProjectSeaplane/ProjectSeaplane/FormSeaplane.cs @@ -1,40 +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 ProjectSeaplane +namespace ProjectSeaplane; +/// +/// Форма работы с объектом "Спортивный автомобиль" +/// +public partial class FormSeaplane : Form { - public partial class FormSeaplane : Form + /// + /// Поле-объект для прорисовки объекта + /// + private DrawningSeaplane? _drawningSeaplane; + /// + /// Конструктор формы + /// + public FormSeaplane() { - private DrawningSeaplane? _drawningSeaplane; - - public FormSeaplane() + InitializeComponent(); + } + /// + /// Метод прорисовки машины + /// + private void Draw() + { + if (_drawningSeaplane == null) { - InitializeComponent(); + return; } - - private void ButtonCreate_Click(object sender, EventArgs e) + Bitmap bmp = new(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningSeaplane.DrawTransport(gr); + pictureBoxSeaplane.Image = bmp; + } + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void ButtonCreateSeaplane_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningSeaplane = new DrawningSeaplane(); + + _drawningSeaplane.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))); + _drawningSeaplane.SetPictureSize(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); + _drawningSeaplane.SetPosition(random.Next(10, 100), random.Next(10, 100)); + Draw(); + } + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningSeaplane == null) { - Random random = new(); - _drawningSeaplane = new DrawningSeaplane(); - _drawningSeaplane.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))); - _drawningSeaplane.SetPictureSize(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); - _drawningSeaplane.SetPosition(random.Next(10, 100), random.Next(10, 100)); - - Bitmap bmp = new(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height); - Graphics gr = Graphics.FromImage(bmp); - _drawningSeaplane.DrawTransport(gr); - pictureBoxSeaplane.Image = bmp; - + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = + _drawningSeaplane.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = + _drawningSeaplane.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = + _drawningSeaplane.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = + _drawningSeaplane.MoveTransport(DirectionType.Right); + break; + } + if (result) + { + Draw(); } } } -- 2.25.1 From 8b930c99d4b477ba145f8f6bccd70ead95e0a14a Mon Sep 17 00:00:00 2001 From: devil_1nc Date: Tue, 27 Feb 2024 13:55:02 +0400 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BE?= =?UTF-8?q?=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectSeaplane/DrawningSeaplane.cs | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs index 72eba68..fddee39 100644 --- a/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs +++ b/ProjectSeaplane/ProjectSeaplane/DrawningSeaplane.cs @@ -66,10 +66,19 @@ public class DrawningSeaplane /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах public bool SetPictureSize(int width, int height) { - // TODO проверка, что объект "влезает" в размеры поля - // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена + + + if (height < _drawningSeaplaneHeight || width < _drawningSeaplaneWidth) + { + return false; + } + + _pictureWidth = width; _pictureHeight = height; + + if (_startPosX.HasValue && _drawningSeaplaneWidth + _startPosX > width) _startPosX = _pictureWidth - _drawningSeaplaneWidth; + if (_startPosY.HasValue && _drawningSeaplaneHeight + _startPosY > height) _startPosY = _pictureHeight - _drawningSeaplaneHeight; return true; } @@ -84,8 +93,22 @@ public class DrawningSeaplane { return; } - // TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы - // то надо изменить координаты, чтобы он оставался в этих границах + if (x < 0) + { + x = 0; + } + if (x + _drawningSeaplaneWidth > _pictureWidth.Value) + { + x = _pictureWidth.Value - _drawningSeaplaneWidth; + } + if (y < 0) + { + y = 0; + } + if (y + _drawningSeaplaneHeight > _pictureHeight.Value) + { + y = _pictureHeight.Value - _drawningSeaplaneHeight; + } _startPosX = x; _startPosY = y; -- 2.25.1