From cc64fa073102669d60360dfe837cbb6fbab527e6 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Sun, 29 Oct 2023 15:21:41 +0400 Subject: [PATCH] =?UTF-8?q?1=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D1=8F?= =?UTF-8?q?=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectWarmlyShip/Direction.cs | 34 +++ .../ProjectWarmlyShip/DrawingWarmlyShip.cs | 171 +++++++++++++++ .../ProjectWarmlyShip/EntityWarmlyShip.cs | 59 +++++ .../ProjectWarmlyShip/Form1.Designer.cs | 39 ---- ProjectWarmlyShip/ProjectWarmlyShip/Form1.cs | 10 - .../FormWarmlyShip.Designer.cs | 133 ++++++++++++ .../ProjectWarmlyShip/FormWarmlyShip.cs | 82 +++++++ .../ProjectWarmlyShip/FormWarmlyShip.resx | 201 ++++++++++++++++++ .../ProjectWarmlyShip/Program.cs | 2 +- .../ProjectWarmlyShip.csproj | 15 ++ .../Properties/Resources.Designer.cs | 63 ++++++ .../{Form1.resx => Properties/Resources.resx} | 0 12 files changed, 759 insertions(+), 50 deletions(-) create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/Direction.cs create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/DrawingWarmlyShip.cs create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/EntityWarmlyShip.cs delete mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/Form1.Designer.cs delete mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/Form1.cs create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.Designer.cs create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.cs create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.resx create mode 100644 ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.Designer.cs rename ProjectWarmlyShip/ProjectWarmlyShip/{Form1.resx => Properties/Resources.resx} (100%) diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/Direction.cs b/ProjectWarmlyShip/ProjectWarmlyShip/Direction.cs new file mode 100644 index 0000000..f10eac7 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/Direction.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectWarmlyShip +{ + internal class Direction + { + /// + /// Направление перемещения + /// + public enum DirectionType + { + /// + /// Вверх + /// + Up = 1, + /// + /// Вниз + /// + Down = 2, + /// + /// Влево + /// + Left = 3, + /// + /// Вправо + /// + Right = 4 + } + } +} diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/DrawingWarmlyShip.cs b/ProjectWarmlyShip/ProjectWarmlyShip/DrawingWarmlyShip.cs new file mode 100644 index 0000000..cca0b62 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/DrawingWarmlyShip.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static ProjectWarmlyShip.Direction; + +namespace ProjectWarmlyShip +{ + // Класс, отвечающий за прорисовку и перемещение объекта-сущности + internal class DrawingWarmlyShip + { + /// + /// Класс-сущность + /// + public EntityWarmlyShip? EntityWarmlyShip { get; private set; } + /// + ///Ширина окна + /// + private int _pictureWidth; + /// + ///Высота окна + /// + private int _pictureHeight; + /// + /// Левая координата прорисовки теплохода + /// + private int _startPosX; + /// + /// Верхняя кооридната прорисовки теплохода + /// + private int _startPosY; + /// + /// Ширина прорисовки теплохода + /// + private int _shipWidth = 200; + /// + /// Высота прорисовки теплохода + /// + private int _shipHeight = 30; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Цвет палубы + /// Дополнительный цвет + /// Признак наличия труб + /// Ширина картинки + /// Высота картинки + /// true - объект создан, false - проверка не пройдена, нельзя создать объект в этих размерах + public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool shipPipes, bool shipFuel, int width, int height) + { + if (width < _shipWidth || height < _shipHeight) + { + return false; + } + _pictureWidth = width; + _pictureHeight = height; + EntityWarmlyShip = new EntityWarmlyShip(); + EntityWarmlyShip.Init(speed, weight, bodyColor, additionalColor, shipPipes, shipFuel); + return true; + } + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if ((x > 0) && (x < _pictureWidth)) _startPosX = x; + else _startPosX = 0; + if ((y > 0) && (y < _pictureHeight)) _startPosY = y; + else _startPosY = 0; + } + /// + /// Изменение направления перемещения + /// + /// Направление + public void MoveTransport(DirectionType direction) + { + if (EntityWarmlyShip == null) + { + return; + } + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX - EntityWarmlyShip.Step > 0) + { + _startPosX -= (int)EntityWarmlyShip.Step; + } + else + { + _startPosX = 0; + } + break; + //вверх + case DirectionType.Up: + if (_startPosY - EntityWarmlyShip.Step > 0) + { + _startPosY -= (int)EntityWarmlyShip.Step; + } + else + { + _startPosY = 0; + } + break; + // вправо + case DirectionType.Right: + if (_startPosX + _shipWidth + EntityWarmlyShip.Step < _pictureWidth) + { + _startPosX += (int)EntityWarmlyShip.Step; + } + else + { + _startPosX = _pictureWidth - _shipWidth; + } + break; + //вниз + case DirectionType.Down: + if (_startPosY + _shipHeight + EntityWarmlyShip.Step < _pictureHeight) + { + _startPosY += (int)EntityWarmlyShip.Step; + } + else + { + _startPosY = _pictureHeight - _shipHeight; + } + break; + } + } + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntityWarmlyShip == null) + { + return; + } + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(EntityWarmlyShip.AdditionalColor); + Brush bodyBrush = new SolidBrush(EntityWarmlyShip.BodyColor); + //трубы + if (EntityWarmlyShip.ShipPipes) + { + g.FillRectangle(additionalBrush, _startPosX + 180, _startPosY + 2, 3, 12); + g.FillRectangle(additionalBrush, _startPosX + 185, _startPosY + 4, 5, 10); + } + //границы корабля + Point point1 = new Point(_startPosX, _startPosY + 12); + Point point2 = new Point(_startPosX + 25, _startPosY + 35); + Point point3 = new Point(_startPosX + 175, _startPosY + 35); + Point point4 = new Point(_startPosX + 200, _startPosY + 12); + + Point[] curvePoints1 = { point1, point2, point3, point4 }; + g.FillPolygon(bodyBrush, curvePoints1); + //граница палубы + Brush brAqua = new SolidBrush(Color.Aquamarine); + g.FillRectangle(brAqua, _startPosX + 50, _startPosY + 0, 125, 12); + //топливо + if (EntityWarmlyShip.ShipFuel) + { + g.FillRectangle(additionalBrush, _startPosX + 12, _startPosY + 5, 27, 7); + } + } + } +} diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/EntityWarmlyShip.cs b/ProjectWarmlyShip/ProjectWarmlyShip/EntityWarmlyShip.cs new file mode 100644 index 0000000..61d9294 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/EntityWarmlyShip.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectWarmlyShip +{ + internal class EntityWarmlyShip + { + /// + /// Скорость + /// + 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 ShipPipes { get; private set; } + /// + /// Признак (опция) наличия дополнительного топлива + /// + public bool ShipFuel { get; private set; } + /// + /// Шаг перемещения теплохода + /// + public double Step => (double)Speed * 100 / Weight; + /// + /// Инициализация полей объекта-класса теплохода + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия труб + /// Признак наличия топлива + public void Init(int speed, double weight, Color bodyColor, Color + additionalColor, bool shipPipes, bool shipFuel) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + ShipPipes = shipPipes; + ShipFuel = shipFuel; + } + } +} diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/Form1.Designer.cs b/ProjectWarmlyShip/ProjectWarmlyShip/Form1.Designer.cs deleted file mode 100644 index d3de3cc..0000000 --- a/ProjectWarmlyShip/ProjectWarmlyShip/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectWarmlyShip -{ - 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/ProjectWarmlyShip/ProjectWarmlyShip/Form1.cs b/ProjectWarmlyShip/ProjectWarmlyShip/Form1.cs deleted file mode 100644 index e4bd993..0000000 --- a/ProjectWarmlyShip/ProjectWarmlyShip/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectWarmlyShip -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.Designer.cs b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.Designer.cs new file mode 100644 index 0000000..3e2dc69 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.Designer.cs @@ -0,0 +1,133 @@ +namespace ProjectWarmlyShip +{ + partial class FormWarmlyShip + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormWarmlyShip)); + pictureBoxWarmlyShip = new PictureBox(); + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonRight = new Button(); + buttonDown = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxWarmlyShip).BeginInit(); + SuspendLayout(); + // + // pictureBoxWarmlyShip + // + pictureBoxWarmlyShip.BackgroundImageLayout = ImageLayout.Zoom; + pictureBoxWarmlyShip.Dock = DockStyle.Fill; + pictureBoxWarmlyShip.Location = new Point(0, 0); + pictureBoxWarmlyShip.Name = "pictureBoxWarmlyShip"; + pictureBoxWarmlyShip.Size = new Size(800, 450); + pictureBoxWarmlyShip.SizeMode = PictureBoxSizeMode.AutoSize; + pictureBoxWarmlyShip.TabIndex = 0; + pictureBoxWarmlyShip.TabStop = false; + // + // buttonCreate + // + buttonCreate.Location = new Point(12, 415); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(75, 23); + buttonCreate.TabIndex = 1; + buttonCreate.Text = " Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // buttonLeft + // + buttonLeft.BackgroundImage = (Image)resources.GetObject("buttonLeft.BackgroundImage"); + buttonLeft.BackgroundImageLayout = ImageLayout.Zoom; + buttonLeft.Location = new Point(686, 408); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(30, 30); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += buttonMove_Click; + // + // buttonUp + // + buttonUp.BackgroundImage = (Image)resources.GetObject("buttonUp.BackgroundImage"); + buttonUp.BackgroundImageLayout = ImageLayout.Zoom; + buttonUp.Location = new Point(722, 372); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(30, 30); + buttonUp.TabIndex = 3; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += buttonMove_Click; + // + // buttonRight + // + buttonRight.BackgroundImage = (Image)resources.GetObject("buttonRight.BackgroundImage"); + buttonRight.BackgroundImageLayout = ImageLayout.Zoom; + buttonRight.Location = new Point(758, 408); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(30, 30); + buttonRight.TabIndex = 4; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += buttonMove_Click; + // + // buttonDown + // + buttonDown.BackgroundImage = (Image)resources.GetObject("buttonDown.BackgroundImage"); + buttonDown.BackgroundImageLayout = ImageLayout.Zoom; + buttonDown.Location = new Point(722, 408); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(30, 30); + buttonDown.TabIndex = 5; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += buttonMove_Click; + // + // FormWarmlyShip + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(buttonDown); + Controls.Add(buttonRight); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxWarmlyShip); + Name = "FormWarmlyShip"; + Text = "FormWarmlyShip"; + ((System.ComponentModel.ISupportInitialize)pictureBoxWarmlyShip).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private PictureBox pictureBoxWarmlyShip; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonUp; + private Button buttonRight; + private Button buttonDown; + } +} \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.cs b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.cs new file mode 100644 index 0000000..3f31547 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.cs @@ -0,0 +1,82 @@ +using static ProjectWarmlyShip.Direction; + +namespace ProjectWarmlyShip +{ + /// + /// "" + /// + public partial class FormWarmlyShip : Form + { + /// + /// - + /// + private DrawingWarmlyShip? _drawingWarmlyShip; + /// + /// + /// + public FormWarmlyShip() + { + InitializeComponent(); + } + /// + /// + /// + private void Draw() + { + if (_drawingWarmlyShip == null) + { + return; + } + Bitmap bmp = new(pictureBoxWarmlyShip.Width, pictureBoxWarmlyShip.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawingWarmlyShip.DrawTransport(gr); + pictureBoxWarmlyShip.Image = bmp; + } + /// + /// "" + /// + /// + /// + private void buttonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawingWarmlyShip = new DrawingWarmlyShip(); + _drawingWarmlyShip.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)), + pictureBoxWarmlyShip.Width, pictureBoxWarmlyShip.Height); + _drawingWarmlyShip.SetPosition(random.Next(10, 100), random.Next(10, 100)); + Draw(); + } + /// + /// + /// + /// + /// + private void buttonMove_Click(object sender, EventArgs e) + { + if (_drawingWarmlyShip == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _drawingWarmlyShip.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + _drawingWarmlyShip.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + _drawingWarmlyShip.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + _drawingWarmlyShip.MoveTransport(DirectionType.Right); + break; + } + Draw(); + } + } +} \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.resx b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.resx new file mode 100644 index 0000000..6788234 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/FormWarmlyShip.resx @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAABGdBTUEAALGPC/xhBQAAAG9QTFRF//// + AAAAWVlZ8fHx9PT0REREtLS0Ojo6+Pj4a2trp6enj4+P3t7eXl5efX1919fXh4eHw8PD6+vrdXV10dHR + 5ubmDAwMy8vLTU1NlZWVvLy8iIiINjY2nJycFhYWYWFhJycnUVFRHR0dr6+vKioqoesKnwAAAAlwSFlz + AAAOwAAADsABataJCQAAAkFJREFUeF7t3GtT2zAQhWErF5JAnIQQSrmFW///b+wCR6LY/Vg3nqP3+cJE + O5Nhh1kjrSQ3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMyVQ/Tc02P1J6WuuToUP6dKfPds6VYErXGjFz + pfTCRkNWpgtl926uQSeHeMR8WWjUyFcJfpho2MdGmWVuD9PpTyWWPSngYvuqxLKVAi7OlFfxqICLnfIq + bhQwseyW4MJsOrP+pcSy1VIRE3fKq7hVwMW98iouFTCxbJVX9mC2Llw/KLFsYlaCl8qruFfAxa3yKsxm + osuV8sqezUpw3y3Bl5kiJm6UV7FTwMWj8irOFHDxR7/pw3GrgIlv/aZ3c7Med68E3dqGnX5TSm8KuOj2 + m9JBARPTufLKFmYlmHddiisFXLwpr+JcARe9EjTrN816JbhXxMT2qMQyt4lorwRT207+v91gK7ReCZ7M + hX6jf+xCX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YXwkjI+E8ZEwPhLGR8L4SBgfCeMjYXwkjI+E8ZEwPhLGR8L4SBgf + CeMjYXwkjI+E8ZEwPhLGR8L4SBgfCeMjYXwkjI+E8ZEwPhLGR8L4SBgfCeMjYXwkjI+E8ZEwPhK6d7ea + LybP2kg5LuHzZDFf3WnDled68e/aTDgq4Xv9jaFf6j/ZParsTIWuYxKe6RvFpQp+6Lf/8UuVjiMS/tIX + iuJKFT+0sNKDSofGEz5of0klN6ZaV6WnT4wmvNPuirsHSN5rYaXFUkVrLOFyod2lexX9WGlllXS3GUu4 + 6zIlfw8enGlltSdVjZGET9pZm6nqyFZLq61VbRtOuNa+2lZVV861uFrieDaYcP/oz5LTh7jeanmV1263 + GUq4fNWuyq2q7rR7YSLFUMIr7aksVPRn2j5kFC+q7gwkfNGOyr3jZynbbnN49tyfUGft4rLLNAa7TW/C + EF2mYQ78H/ag1pdw9qFyxf0zhh+10MqnirW+hJ+qVh5V9Gv6paVWblSt9CTcPyL6x1eAJ7Zfa621U1VL + 6YSnqtVCPOm7d8nJhP0/iGPmb/e2/9ulEg78qT0z3WauYjrhXJWK/y7TWP7Wkiu79p9IOHRwcc0ewr9V + 7Sb81nbN33htQPI0rJNw+CTPOXMqranSYUIzveqeqHuXuBw6TGgutvzNR8ckLmkPEo5dMLvXvWCwCUeH + Hv7Z0dLDQcL2eDs9uArAjgc3JuFGn2rJ4WMEZsS7aDWfK9tl+m9XeWe7zU0roTl1jdhlGva/2Gejb4dk + +0la3824IPa3PPv03lCNwhzXE9yOt49numaH3/H28ez59aEAg6dxQ90meJdp2DPQtmzehGhmFS0ZvULP + zJt29jOq+NLdJosu07ATmZrrm2h/z07VSs0ELhuH3SbDF3XabpNTl2nMyncBN94CjbeP177LlOnrcvfd + Jrsu02i6TYZdplG/tjrbl1aXNuundeixDAAAAAAAAAAAAAAAAADPTk7+AFMOGOSa0d0UAAAAAElFTkSu + QmCC + + + \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/Program.cs b/ProjectWarmlyShip/ProjectWarmlyShip/Program.cs index 2b1e2de..4b1fb4f 100644 --- a/ProjectWarmlyShip/ProjectWarmlyShip/Program.cs +++ b/ProjectWarmlyShip/ProjectWarmlyShip/Program.cs @@ -11,7 +11,7 @@ namespace ProjectWarmlyShip // 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 FormWarmlyShip()); } } } \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/ProjectWarmlyShip.csproj b/ProjectWarmlyShip/ProjectWarmlyShip/ProjectWarmlyShip.csproj index b57c89e..13ee123 100644 --- a/ProjectWarmlyShip/ProjectWarmlyShip/ProjectWarmlyShip.csproj +++ b/ProjectWarmlyShip/ProjectWarmlyShip/ProjectWarmlyShip.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.Designer.cs b/ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.Designer.cs new file mode 100644 index 0000000..eeaa7d3 --- /dev/null +++ b/ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectWarmlyShip.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("ProjectWarmlyShip.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; + } + } + } +} diff --git a/ProjectWarmlyShip/ProjectWarmlyShip/Form1.resx b/ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.resx similarity index 100% rename from ProjectWarmlyShip/ProjectWarmlyShip/Form1.resx rename to ProjectWarmlyShip/ProjectWarmlyShip/Properties/Resources.resx