From e71e32c73b68617d95dbfd8305464659fc7a4242 Mon Sep 17 00:00:00 2001 From: vkobi Date: Tue, 27 Feb 2024 09:23:20 +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=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 --- .../WarmlyLocomotive/DirectionType.cs | 24 ++ .../DrawningWarmlyLocomotive.cs | 259 ++++++++++++++++++ .../EntityWarmlyLocomotive.cs | 60 ++++ .../WarmlyLocomotive/Form1.Designer.cs | 39 --- WarmlyLocomotive/WarmlyLocomotive/Form1.cs | 10 - .../FormWarmlyLocomotive.Designer.cs | 134 +++++++++ .../WarmlyLocomotive/FormWarmlyLocomotive.cs | 88 ++++++ .../{Form1.resx => FormWarmlyLocomotive.resx} | 50 ++-- WarmlyLocomotive/WarmlyLocomotive/Program.cs | 2 +- .../Properties/Resources.Designer.cs | 103 +++++++ .../Properties/Resources.resx | 133 +++++++++ .../WarmlyLocomotive/Resources/arrowDown.jpg | Bin 0 -> 10626 bytes .../WarmlyLocomotive/Resources/arrowLeft.jpg | Bin 0 -> 10507 bytes .../WarmlyLocomotive/Resources/arrowRight.jpg | Bin 0 -> 10413 bytes .../WarmlyLocomotive/Resources/arrowUp.jpg | Bin 0 -> 10655 bytes .../WarmlyLocomotive/WarmlyLocomotive.csproj | 15 + lab_1/lab_1.sln | 31 +++ lab_1/lab_1/Lab_1.c | 50 ++++ lab_1/lab_1/lab_1.vcxproj | 135 +++++++++ lab_1/lab_1/lab_1.vcxproj.filters | 22 ++ 20 files changed, 1080 insertions(+), 75 deletions(-) create mode 100644 WarmlyLocomotive/WarmlyLocomotive/DirectionType.cs create mode 100644 WarmlyLocomotive/WarmlyLocomotive/DrawningWarmlyLocomotive.cs create mode 100644 WarmlyLocomotive/WarmlyLocomotive/EntityWarmlyLocomotive.cs delete mode 100644 WarmlyLocomotive/WarmlyLocomotive/Form1.Designer.cs delete mode 100644 WarmlyLocomotive/WarmlyLocomotive/Form1.cs create mode 100644 WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.Designer.cs create mode 100644 WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.cs rename WarmlyLocomotive/WarmlyLocomotive/{Form1.resx => FormWarmlyLocomotive.resx} (93%) create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.Designer.cs create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.resx create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Resources/arrowDown.jpg create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Resources/arrowLeft.jpg create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Resources/arrowRight.jpg create mode 100644 WarmlyLocomotive/WarmlyLocomotive/Resources/arrowUp.jpg create mode 100644 lab_1/lab_1.sln create mode 100644 lab_1/lab_1/Lab_1.c create mode 100644 lab_1/lab_1/lab_1.vcxproj create mode 100644 lab_1/lab_1/lab_1.vcxproj.filters diff --git a/WarmlyLocomotive/WarmlyLocomotive/DirectionType.cs b/WarmlyLocomotive/WarmlyLocomotive/DirectionType.cs new file mode 100644 index 0000000..c935f15 --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/DirectionType.cs @@ -0,0 +1,24 @@ +namespace WarmlyLocomotive; +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Вверх + /// + Up = 1, + /// + /// Вниз + /// + Down = 2, + /// + /// Влево + /// + Left = 3, + /// + /// Вправо + /// + Right = 4 + +} diff --git a/WarmlyLocomotive/WarmlyLocomotive/DrawningWarmlyLocomotive.cs b/WarmlyLocomotive/WarmlyLocomotive/DrawningWarmlyLocomotive.cs new file mode 100644 index 0000000..6fd15f3 --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/DrawningWarmlyLocomotive.cs @@ -0,0 +1,259 @@ +namespace WarmlyLocomotive; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningWarmlyLocomotive +{ + /// + /// Класс-сущность + /// + public EntityWarmlyLocomotive? EntityWarmlyLocomotive { get; private set; } + /// + /// Ширина окна + /// + private int? _pictureWidth; + /// + /// Высота окна + /// + private int? _pictureHeight; + /// + /// Левая координата прорисовки паровоза + /// + private int? _startPosX; + /// + /// Верхняя кооридната прорисовки паровоза + /// + private int? _startPosY; + /// + /// Ширина прорисовки паровоза + /// + private readonly int _drawningWarmlyLocomotiveWidth = 130; + /// + /// Высота прорисовки паровоза + /// + private readonly int _drawningWarmlyLocomotiveHeight = 50; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия дымохода + /// Признак наличия отсека + /// Признак наличия обозначающей полосы + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool chimney, bool compartment, bool indicatingLine) + { + EntityWarmlyLocomotive = new EntityWarmlyLocomotive(); + EntityWarmlyLocomotive.Init(speed, weight, bodyColor, additionalColor, chimney, compartment, indicatingLine); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // TODO проверка, что объект "влезает" в размеры поля + // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена + + if (width > _drawningWarmlyLocomotiveWidth && height > _drawningWarmlyLocomotiveHeight) + { + _pictureWidth = width; + _pictureHeight = height; + + if (_startPosX != null && _startPosY != null) + { + + if (_startPosX.Value < 0) { _startPosX = 0; } + + if (_startPosY.Value < 0) { _startPosY = 0; } + + if (_startPosX.Value + _drawningWarmlyLocomotiveWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningWarmlyLocomotiveWidth; + } + + if (_startPosY.Value + _drawningWarmlyLocomotiveHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningWarmlyLocomotiveHeight; + } + } + return true; + } + return false; + } + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + // TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах + else + { + _startPosX = x; + _startPosY = y; + + if (_startPosY.Value < 0) { _startPosY = 0; } + if (_startPosX.Value < 0) { _startPosX = 0; } + + if (_startPosX.Value + _drawningWarmlyLocomotiveWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningWarmlyLocomotiveWidth; + } + + if (_startPosY.Value + _drawningWarmlyLocomotiveHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningWarmlyLocomotiveHeight; + } + } + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntityWarmlyLocomotive == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntityWarmlyLocomotive.Step > 0) + { + _startPosX -= (int)EntityWarmlyLocomotive.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntityWarmlyLocomotive.Step > 0) + { + _startPosY -= (int)EntityWarmlyLocomotive.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + EntityWarmlyLocomotive.Step + _drawningWarmlyLocomotiveWidth < _pictureWidth) + { + _startPosX += (int)EntityWarmlyLocomotive.Step; + } + return true; + //вниз + case DirectionType.Down: + if (_startPosY.Value + EntityWarmlyLocomotive.Step + _drawningWarmlyLocomotiveHeight < _pictureHeight) + { + _startPosY += (int)EntityWarmlyLocomotive.Step; + } + return true; + default: + return false; + } + } + + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntityWarmlyLocomotive == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(EntityWarmlyLocomotive.AdditionalColor); + // обвесы + if (EntityWarmlyLocomotive.Chimney) + { + //труба + g.DrawRectangle(pen, _startPosX.Value + 20, _startPosY.Value + 0, 10, 10); + g.FillRectangle(additionalBrush, _startPosX.Value + 20, _startPosY.Value + 0, 10, 5); + } + + if (EntityWarmlyLocomotive.Compartment) + { + //топливо отсек + g.DrawRectangle(pen, _startPosX.Value + 40, _startPosY.Value + 35, 20, 5); + g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value + 35, 20, 5); + } + + //границы паровоза + g.DrawRectangle(pen, _startPosX.Value + 0, _startPosY.Value + 20, 120, 15); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 5, 110, 15); + + //кузов + Brush bk = new SolidBrush(EntityWarmlyLocomotive.BodyColor); + g.FillRectangle(bk, _startPosX.Value + 0, _startPosY.Value + 20, 120, 15); + g.FillRectangle(bk, _startPosX.Value + 10, _startPosY.Value + 5, 110, 15); + + //дверь + g.DrawRectangle(pen, _startPosX.Value + 45, _startPosY.Value + 10, 10, 22); + + //нос + g.DrawLine(pen, _startPosX.Value + 0, _startPosY.Value + 20, _startPosX.Value + 10, _startPosY.Value + 5); + + //стекла + Pen penBlue = new(Color.LightBlue); + Brush wt = new SolidBrush(Color.White); + g.FillRectangle(wt, _startPosX.Value + 15, _startPosY.Value + 7, 10, 10); + g.DrawRectangle(penBlue, _startPosX.Value + 15, _startPosY.Value + 7, 10, 10); + g.FillRectangle(wt, _startPosX.Value + 30, _startPosY.Value + 7, 10, 10); + g.DrawRectangle(penBlue, _startPosX.Value + 30, _startPosY.Value + 7, 10, 10); + g.FillRectangle(wt, _startPosX.Value + 107, _startPosY.Value + 7, 10, 10); + g.DrawRectangle(penBlue, _startPosX.Value + 107, _startPosY.Value + 7, 10, 10); + + //треугольники низ + Brush br = new SolidBrush(Color.Black); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 35, 30, 5); + g.DrawLine(pen, _startPosX.Value + 10, _startPosY.Value + 35, _startPosX.Value + 0, _startPosY.Value + 40); + g.DrawLine(pen, _startPosX.Value + 0, _startPosY.Value + 40, _startPosX.Value + 10, _startPosY.Value + 40); + g.FillRectangle(br, _startPosX.Value + 10, _startPosY.Value + 35, 30, 5); + + g.DrawRectangle(pen, _startPosX.Value + 85, _startPosY.Value + 35, 30, 5); + g.DrawLine(pen, _startPosX.Value + 110, _startPosY.Value + 35, _startPosX.Value + 130, _startPosY.Value + 40); + g.DrawLine(pen, _startPosX.Value + 130, _startPosY.Value + 40, _startPosX.Value + 110, _startPosY.Value + 40); + g.FillRectangle(br, _startPosX.Value + 85, _startPosY.Value + 35, 30, 5); + + //зад.часть + g.DrawRectangle(pen, _startPosX.Value + 120, _startPosY.Value + 7, 5, 25); + g.FillRectangle(br, _startPosX.Value + 120, _startPosY.Value + 7, 5, 25); + + //колеса + g.FillEllipse(wt, _startPosX.Value + 10, _startPosY.Value + 35, 12, 11); + g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 35, 12, 11); + + g.FillEllipse(wt, _startPosX.Value + 30, _startPosY.Value + 35, 12, 11); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 35, 12, 11); + + g.FillEllipse(wt, _startPosX.Value + 80, _startPosY.Value + 35, 12, 11); + g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 35, 12, 11); + + g.FillEllipse(wt, _startPosX.Value + 100, _startPosY.Value + 35, 12, 11); + g.DrawEllipse(pen, _startPosX.Value + 100, _startPosY.Value + 35, 12, 11); + + //линия + if (EntityWarmlyLocomotive.IndicatingLine) + { + g.FillRectangle(additionalBrush, _startPosX.Value + 0, _startPosY.Value + 20, 120, 2); + + } + } +} diff --git a/WarmlyLocomotive/WarmlyLocomotive/EntityWarmlyLocomotive.cs b/WarmlyLocomotive/WarmlyLocomotive/EntityWarmlyLocomotive.cs new file mode 100644 index 0000000..cb6983f --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/EntityWarmlyLocomotive.cs @@ -0,0 +1,60 @@ +namespace WarmlyLocomotive; +/// +/// Класс-сущность "тепловоз" +/// +public class EntityWarmlyLocomotive +{ + /// + /// Скорость + /// + 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 Chimney { get; private set; } + /// + /// Признак (опция) наличия топливного отсека + /// + public bool Compartment { get; private set; } + /// + /// Признак (опция) наличия гоночной полосы + /// + public bool IndicatingLine { get; private set; } + /// + /// Шаг перемещения автомобиля + /// + public double Step => Speed * 100 / Weight; + /// + /// Инициализация полей объекта-класса тепловоза + /// + /// Скорость + /// Вес тепловоза + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия трубы + /// Признак наличия топливного отсека + /// Признак наличия обозначающей полосы + + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool chimney, bool compartment, bool indicatingLine) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Chimney = chimney; + Compartment = compartment; + IndicatingLine = indicatingLine; + } +} diff --git a/WarmlyLocomotive/WarmlyLocomotive/Form1.Designer.cs b/WarmlyLocomotive/WarmlyLocomotive/Form1.Designer.cs deleted file mode 100644 index 8f5fc41..0000000 --- a/WarmlyLocomotive/WarmlyLocomotive/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace WarmlyLocomotive -{ - 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/WarmlyLocomotive/WarmlyLocomotive/Form1.cs b/WarmlyLocomotive/WarmlyLocomotive/Form1.cs deleted file mode 100644 index 9269ed4..0000000 --- a/WarmlyLocomotive/WarmlyLocomotive/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WarmlyLocomotive -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.Designer.cs b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.Designer.cs new file mode 100644 index 0000000..aad507f --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.Designer.cs @@ -0,0 +1,134 @@ +namespace WarmlyLocomotive +{ + partial class FormWarmlyLocomotive + { + /// + /// 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() + { + pictureBoxWarmlyLocomotive = new PictureBox(); + buttonCreateWarmlyLocomotive = new Button(); + buttonLeft = new Button(); + buttonDown = new Button(); + buttonRight = new Button(); + buttonUp = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxWarmlyLocomotive).BeginInit(); + SuspendLayout(); + // + // pictureBoxWarmlyLocomotive + // + pictureBoxWarmlyLocomotive.Dock = DockStyle.Fill; + pictureBoxWarmlyLocomotive.Location = new Point(0, 0); + pictureBoxWarmlyLocomotive.Name = "pictureBoxWarmlyLocomotive"; + pictureBoxWarmlyLocomotive.Size = new Size(800, 450); + pictureBoxWarmlyLocomotive.TabIndex = 0; + pictureBoxWarmlyLocomotive.TabStop = false; + // + // buttonCreateWarmlyLocomotive + // + buttonCreateWarmlyLocomotive.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateWarmlyLocomotive.Location = new Point(12, 409); + buttonCreateWarmlyLocomotive.Name = "buttonCreateWarmlyLocomotive"; + buttonCreateWarmlyLocomotive.Size = new Size(94, 29); + buttonCreateWarmlyLocomotive.TabIndex = 1; + buttonCreateWarmlyLocomotive.Text = "создать"; + buttonCreateWarmlyLocomotive.UseVisualStyleBackColor = true; + buttonCreateWarmlyLocomotive.Click += ButtonCreateWarmlyLocomotive_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.arrowLeft; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(653, 403); + 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.arrowDown; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(694, 403); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 3; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.arrowRight; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(735, 403); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 4; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.arrowUp; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(694, 359); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 5; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // FormWarmlyLocomotive + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(buttonUp); + Controls.Add(buttonRight); + Controls.Add(buttonDown); + Controls.Add(buttonLeft); + Controls.Add(buttonCreateWarmlyLocomotive); + Controls.Add(pictureBoxWarmlyLocomotive); + Name = "FormWarmlyLocomotive"; + Text = "тепловоз"; + ((System.ComponentModel.ISupportInitialize)pictureBoxWarmlyLocomotive).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBoxWarmlyLocomotive; + private Button buttonCreateWarmlyLocomotive; + private Button buttonLeft; + private Button buttonDown; + private Button buttonRight; + private Button buttonUp; + } +} \ No newline at end of file diff --git a/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.cs b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.cs new file mode 100644 index 0000000..d506d2e --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.cs @@ -0,0 +1,88 @@ +namespace WarmlyLocomotive; + +/// +/// Форма работы с объектом "тепловоз" +/// +public partial class FormWarmlyLocomotive : Form +{ + /// + /// Поле-объект для прорисовки объекта + /// + private DrawningWarmlyLocomotive? _drawningWarmlyLocomotive; + + /// + /// Конструктор формы + /// + public FormWarmlyLocomotive() + { + InitializeComponent(); + } + + /// + /// Метод прорисовки паровоза + /// + private void Draw() + { + if (_drawningWarmlyLocomotive == null) + { + return; + } + Bitmap bmp = new(pictureBoxWarmlyLocomotive.Width, pictureBoxWarmlyLocomotive.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningWarmlyLocomotive.DrawTransport(gr); + pictureBoxWarmlyLocomotive.Image = bmp; + } + + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void ButtonCreateWarmlyLocomotive_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningWarmlyLocomotive = new DrawningWarmlyLocomotive(); + _drawningWarmlyLocomotive.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))); + _drawningWarmlyLocomotive.SetPictureSize(pictureBoxWarmlyLocomotive.Width, pictureBoxWarmlyLocomotive.Height); + _drawningWarmlyLocomotive.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Draw(); + + } + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningWarmlyLocomotive == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningWarmlyLocomotive.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningWarmlyLocomotive.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningWarmlyLocomotive.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningWarmlyLocomotive.MoveTransport(DirectionType.Right); + break; + } + if (result) + { + Draw(); + } + } +} diff --git a/WarmlyLocomotive/WarmlyLocomotive/Form1.resx b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.resx similarity index 93% rename from WarmlyLocomotive/WarmlyLocomotive/Form1.resx rename to WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.resx index 1af7de1..af32865 100644 --- a/WarmlyLocomotive/WarmlyLocomotive/Form1.resx +++ b/WarmlyLocomotive/WarmlyLocomotive/FormWarmlyLocomotive.resx @@ -1,17 +1,17 @@  - diff --git a/WarmlyLocomotive/WarmlyLocomotive/Program.cs b/WarmlyLocomotive/WarmlyLocomotive/Program.cs index 1edb8df..b972d2a 100644 --- a/WarmlyLocomotive/WarmlyLocomotive/Program.cs +++ b/WarmlyLocomotive/WarmlyLocomotive/Program.cs @@ -11,7 +11,7 @@ namespace WarmlyLocomotive // 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 FormWarmlyLocomotive()); } } } \ No newline at end of file diff --git a/WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.Designer.cs b/WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b59efb1 --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace WarmlyLocomotive.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("WarmlyLocomotive.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 arrowDown { + get { + object obj = ResourceManager.GetObject("arrowDown", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowLeft { + get { + object obj = ResourceManager.GetObject("arrowLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowRight { + get { + object obj = ResourceManager.GetObject("arrowRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowUp { + get { + object obj = ResourceManager.GetObject("arrowUp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.resx b/WarmlyLocomotive/WarmlyLocomotive/Properties/Resources.resx new file mode 100644 index 0000000..8975a9e --- /dev/null +++ b/WarmlyLocomotive/WarmlyLocomotive/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\arrowUp.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowLeft.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowRight.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowDown.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/WarmlyLocomotive/WarmlyLocomotive/Resources/arrowDown.jpg b/WarmlyLocomotive/WarmlyLocomotive/Resources/arrowDown.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4531c18070e1bc2170694cf08238651a1f586f80 GIT binary patch literal 10626 zcmeHN3p7+~`+vvCh?t0OE>pRcOTNl2VUmO7bWkU^$|OV=Mj~>VQ4^gM!a;E&Bo$I2 zluW3kn@dU&#x*I-L}N00_Ws^+RNr^j`v2GY&N<&%>;GT9JZtu1?{_`V@BKZO{XB!c z#8_bV1}hsYfWzUy4)_DGZs2SgvU?W*8#e+?0Dw3U#jOA$@Ja@Xn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mlyLocomotive/Resources/arrowLeft.jpg b/WarmlyLocomotive/WarmlyLocomotive/Resources/arrowLeft.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4bb006ae3c6ce6c67dd240cfe82c7a693a028836 GIT binary patch literal 10507 zcmeHMc|6o>+rP(PBn%>1N7hQ3lPqmaa*z~J)=o`AqO@4DW@O0{CP%5GC$dE(A&J!3 zA}wd^qK<8nB+V$9VSY2e=blcd=Xu`G`^WpdpZDqW{?R>i&HO$y_wu{G*Z01z`?`MU z3v>iXZ@03s0vHSi9Dpx?jsh>sP~SrU?A!@f0RY5+2u2oQ;S~nH0A?)^g4Z%owmV1* zet~1*hl30d7F+`$)#4!gk8AiF2nh*U<9qB#pr^+P?={B*eBdfCfdvr4UCb;TB2ZB_*T;*Mdm|!v&+@TS5#cCg}0+ zHM9Z9hzUWRuow*>B!j`qV9*vofSQOvOa!oeZ5Sb}u!tzUCGo|uL$x%#eJoZ8-mHi) zR2*{}{ttv@L}Zt*H5Xmt;DOUPDQ9pdJy%R~Yel2HV<$^%-NAsEMdC{pmMJP}>*%gn zxysPU*kt{NjTS#!T3K(i*}i*^le3Gfo4co%_aUFdzJ7s0!KXq(!@^_Z;?E`|CMExx zap7X-rOUr%<>eO?UN0)XQBqlTr}}Qqz1q5_=9WjTZI9cZbanUi_VvFQ7#tmAydHlu z@pkgv%*Ri&pXb<|`2~Sq7^vr8?N7!2i(WENFCl0HVVpoOj8F&^tc50{oC482sSC4-Wh*2M}cx#HNu(USDVJ$eL&%3=Fp{>$~uPdJgd|qN6~a z!S=d+JKcWaL+R>wl#nO6!?pQNcjxIACN_L(RK>>Aha8Z?Y;3#uZ z%cWmmY+FANxM`#LVr;Y3FOMH|UyqWY!KD~?TtCy-^w0VC>U5iUPRnw}*55K-nBV&7 zlG%_CgG`V6WYm)K;o0wPtDl7|)xDvUe+@siX-*c7ET$bIz9hEXHB;{UEa^F_kW9Sl z5rdacWOUyuG+nys#XvsUd?K+jR8h-kwsON#*WL?fofUX#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5S@WUxvvpItXVGGy6I8 z)N(-}uwQ4ojjjP^Apuxa>vhISV>mN301vJi38_mQ(Ek4g2?Q>thbj!C>wxUeCnq$b6CTy%y zd9!`&;96Ed?S-EEpW}!o>3E0qguOj0SCp0L&Q~WpZmVV4(_a)ay@mo~YSt7T-(`7xcdHCg5@LJkW;8~} z)+i50rCK#CoUw{iz-UPg2XvW>!Ric-0hKE}hAq?jk)q+ll%He=hkJ6Y^YB*G>32Dn zNOWqnZ?$I;BWkg7#XrA;nrVj{iNAwnw102JnsE|QtG-qt{GfH0tCK1C*lD+mx3QlC zsV^qZ%)?p!pW_tK2`<;q33oe1?>Sl6O$L8IvpkTeRLuPi`T!q9vNU6JCop1RxQHqJ z84fOou)iv0HhANsBeCH&ku5DFBgwbWBX#L=`%Lp=3cikP$iHz%D@%yz%g zpe?v)XeZ@*0yGbof;$6BhN~hN(Y_>43YW5ol>gP(UAivL(bf{qOE~{8IDp`P_zzs~ B8ukDH literal 0 HcmV?d00001 diff --git a/WarmlyLocomotive/WarmlyLocomotive/Resources/arrowUp.jpg b/WarmlyLocomotive/WarmlyLocomotive/Resources/arrowUp.jpg new file mode 100644 index 0000000000000000000000000000000000000000..88f6eaad1e732056f3101298b53873695825fbfc GIT binary patch literal 10655 zcmeHNdpwj|+g@YR$T3AJhbdHwk|gCcBptVnO6Wj^kji!nVIEPG)1(8XT?%bN&2~yT zO%74XF`1kP2^BNK%rG<0d}~tgKD_V#e(&DjZvXN9S~F{&=l9IB)~x$p*L~gBTF>xb z^J!rA_RZTi0}KWO4#F4U_W&m|f43t5n45zY000pnjF|(l@C*ZA0HXzj;JGxc+pT5` zuE4hN!%7;=5S#-bS!p%rmveXx`1$#*ay#Mf?Re-1=T#nFF7Q{{fhiEeU=TAg*e>o@3`ZZg}vW$U)>yLMaev9Yz=>*(Zs#KqO^sJD;rNk9L9Q(1Fe)7V7KPww~U; zH~nu128Z5_ejFR0V6xbgQv$m%(9SPq+OXf*B@OKof^#qfC$I}6nW=2t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~V`t+1UKU))*?5ZgVTJn_?$iYnH> z?{Bj|SKsC3MBsvBBe#uW6e6<-(mNRKJr3tf*ZAlB8vy#7t9e)Z_BgUd!GQbJ3pkZF zd~nEc2Xh@9kdxa~_jwJc?9nYxYK__V{g;~O?tPu-rg-@~xDpU&8<6s7v}mcbFoB$N zU>x;3mo{1#1+ja(>2_0I@T%P)WMSJ4eaN6K-o~S&k8*y*#Nk(<}uz|VG+iVxN^lHxx2?Mv5Ia`Hm+p=T0)Nq5sa-nM? zVkO!SeSgg*Uztz7?k>=;)HqE4_zirp4(d{G2eikXH6iftL)0@GjVcHHY_$bP~AepQvAv*1t`|e?NuarU8nH zZ_)5KY+no3B;QEs54GkuQu;VQk^d47X9x1hL|L|bU|K==wPH|M~8dBwExT1S@OKRZl=bcL__&D`9PcDdp z?eUm4!^(xa!#e3}osXYLV>~JLXuYZP>RJSCi3R5!CHVioU+|~*7wRbN4MpfIKFA<; z!l!`Wbvkpk4^KtJ7|rh@NBI=F?((5FJW+`2Y`>)t@2dD_H%RbTv3f>s+^&XYW0NV# zn(UR`+=bVCM1`=B2oX zZrkLvqjUb_3)>UonFXSzs%>X7zVphFj+^0}@;r2;LaPDy8XA2p?E@x*SoX<$*iz0}LVt3vT8iKLKbYDk A3IG5A literal 0 HcmV?d00001 diff --git a/WarmlyLocomotive/WarmlyLocomotive/WarmlyLocomotive.csproj b/WarmlyLocomotive/WarmlyLocomotive/WarmlyLocomotive.csproj index e1a0735..244387d 100644 --- a/WarmlyLocomotive/WarmlyLocomotive/WarmlyLocomotive.csproj +++ b/WarmlyLocomotive/WarmlyLocomotive/WarmlyLocomotive.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/lab_1/lab_1.sln b/lab_1/lab_1.sln new file mode 100644 index 0000000..55518f5 --- /dev/null +++ b/lab_1/lab_1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34024.191 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lab_1", "lab_1\lab_1.vcxproj", "{88F6E495-8313-457C-8B37-34F8848D95C3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {88F6E495-8313-457C-8B37-34F8848D95C3}.Debug|x64.ActiveCfg = Debug|x64 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Debug|x64.Build.0 = Debug|x64 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Debug|x86.ActiveCfg = Debug|Win32 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Debug|x86.Build.0 = Debug|Win32 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Release|x64.ActiveCfg = Release|x64 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Release|x64.Build.0 = Release|x64 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Release|x86.ActiveCfg = Release|Win32 + {88F6E495-8313-457C-8B37-34F8848D95C3}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AFE935BC-7614-4661-8922-8FCC085EA88C} + EndGlobalSection +EndGlobal diff --git a/lab_1/lab_1/Lab_1.c b/lab_1/lab_1/Lab_1.c new file mode 100644 index 0000000..89d85e3 --- /dev/null +++ b/lab_1/lab_1/Lab_1.c @@ -0,0 +1,50 @@ +#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include + +// +struct medicine { + char name[10]; + int index; + struct medicine* next; +}; + +struct medicine* first = NULL; + +void sortMedicine(struct medicine* list); + +struct medicine* create(struct medicine* end, int n, char* p) { + struct medicine* tmp; + + tmp = (struct medicine*)malloc(sizeof(struct medicine)); + + tmp->index = n; + strcpy(tmp->name, p); + + if (end == NULL) { + tmp->next = NULL; + } + else { + tmp->next = end; + } + + return tmp; +} + + +void print(struct medicine *p) { + do { + printf("%10s (%d) -> ", p->name, p->index); + } while ((p = p->next) != NULL); + + printf("\n"); +} + +void main() { + first = NULL; + printList(); + addElement("bimbim", 2); + printList(); +} \ No newline at end of file diff --git a/lab_1/lab_1/lab_1.vcxproj b/lab_1/lab_1/lab_1.vcxproj new file mode 100644 index 0000000..2b896e3 --- /dev/null +++ b/lab_1/lab_1/lab_1.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {88f6e495-8313-457c-8b37-34f8848d95c3} + lab1 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/lab_1/lab_1/lab_1.vcxproj.filters b/lab_1/lab_1/lab_1.vcxproj.filters new file mode 100644 index 0000000..dd529d6 --- /dev/null +++ b/lab_1/lab_1/lab_1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file -- 2.25.1