diff --git a/ProjectMotorboat/ProjectMotorboat/DirectionType.cs b/ProjectMotorboat/ProjectMotorboat/DirectionType.cs new file mode 100644 index 0000000..ad6412e --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/DirectionType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectMotorboat +{ + public enum DirectionType + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/ProjectMotorboat/ProjectMotorboat/DrawningMotorboat.cs b/ProjectMotorboat/ProjectMotorboat/DrawningMotorboat.cs new file mode 100644 index 0000000..bf55261 --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/DrawningMotorboat.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectMotorboat +{ + public class DrawningMotorboat + { + public EntityMotorboat? EntityMotorboat { get; private set; } + + private int? _pictureWidth; + + private int? _pictureHeight; + + private int? _startPosX; + + private int? _startPosY; + private readonly int _drawningMotorboatWidth = 160; + + private readonly int _drawningMotorboatHeight = 60; + + public void Init(int speed, double weight, Color bodyColor, Color + additionalColor, bool motor, bool glass) + { + EntityMotorboat = new EntityMotorboat(); + EntityMotorboat.Init(speed, weight, bodyColor, additionalColor, + motor, glass); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + public bool SetPictureSize(int width, int height) + { + if (_drawningMotorboatWidth < width && _drawningMotorboatHeight < height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_startPosX.HasValue && _startPosY.HasValue) + { + SetPosition(_startPosX.Value, _startPosY.Value); + } + + return true; + } + + return true; + } + + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + + if (x + _drawningMotorboatWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningMotorboatWidth; + } + else if (x < 0) + { + _startPosX = 0; + } + else + { + _startPosX = x; + } + if (y + _drawningMotorboatHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningMotorboatHeight; + } + else if (y < 0) + { + _startPosY = 0; + } + else + { + _startPosY = y; + } + } + public bool MoveTransport(DirectionType direction) + { + if (EntityMotorboat == null || !_startPosX.HasValue || + !_startPosY.HasValue) + { + return false; + } + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntityMotorboat.Step > 0) + { + _startPosX -= (int)EntityMotorboat.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntityMotorboat.Step > 0) + { + _startPosY -= (int)EntityMotorboat.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + EntityMotorboat.Step + _drawningMotorboatWidth < _pictureWidth) + { + _startPosX += (int)EntityMotorboat.Step; + } + return true; + //вниз + case DirectionType.Down: + if (_startPosY.Value + EntityMotorboat.Step + _drawningMotorboatHeight < _pictureHeight) + { + _startPosY += (int)EntityMotorboat.Step; + } + return true; + default: + return false; + } + } + + + public void DrawTransport(Graphics g) + { + if (EntityMotorboat == null || !_startPosX.HasValue || !_startPosY.HasValue) + { return; } + Pen pen = new(Color.Black, 1); + Brush mainBrush = new SolidBrush(EntityMotorboat.BodyColor); + + // корпус + Point[] hull = new Point[] + { + new Point(_startPosX.Value + 5, _startPosY.Value + 0), + new Point(_startPosX.Value + 120, _startPosY.Value + 0), + new Point(_startPosX.Value + 160, _startPosY.Value + 35), + new Point(_startPosX.Value + 120, _startPosY.Value + 70), + new Point(_startPosX.Value + 5, _startPosY.Value + 70), + }; + g.FillPolygon(mainBrush, hull); + g.DrawPolygon(pen, hull); + + // стекло впереди + if (EntityMotorboat.Glass) { + Brush glassBrush = new SolidBrush(Color.LightBlue); + g.FillEllipse(glassBrush, _startPosX.Value + 20, _startPosY.Value + 15, 100, 40); + g.DrawEllipse(pen, _startPosX.Value + 20, _startPosY.Value + 15, 100, 40); + } + + // основная часть + Brush blockBrush = new SolidBrush(EntityMotorboat.AdditionalColor); + g.FillRectangle(blockBrush, _startPosX.Value + 20, _startPosY.Value + 15, 80, 40); + g.DrawRectangle(pen, _startPosX.Value + 20, _startPosY.Value + 15, 80, 40); + + // двигатель + if (EntityMotorboat.Motor) + { + Brush engineBrush = new + SolidBrush(EntityMotorboat.AdditionalColor); + g.FillRectangle(engineBrush, _startPosX.Value + 0, _startPosY.Value + 10, 5, 50); + g.DrawRectangle(pen, _startPosX.Value + 0, _startPosY.Value + 10, 5, 50); + } + } + } +} + + + diff --git a/ProjectMotorboat/ProjectMotorboat/EntityMotorboat.cs b/ProjectMotorboat/ProjectMotorboat/EntityMotorboat.cs new file mode 100644 index 0000000..861385a --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/EntityMotorboat.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectMotorboat; + +public class EntityMotorboat +{ + 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 Motor { get; private set; } + + public bool Glass { get; private set; } + + + public double Step => Speed * 100 / Weight; + + public void Init(int speed, double weight, Color bodyColor, Color + additionalColor, bool motor, bool glass ) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Motor = motor; + Glass = glass; + + } + +} diff --git a/ProjectMotorboat/ProjectMotorboat/FormMotorboat.Designer.cs b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.Designer.cs new file mode 100644 index 0000000..92cb576 --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.Designer.cs @@ -0,0 +1,135 @@ +namespace ProjectMotorboat +{ + partial class FormMotorboat + { + /// + /// 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() + { + pictureBoxMotorboat = new PictureBox(); + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonDown = new Button(); + buttonRight = new Button(); + buttonUp = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxMotorboat).BeginInit(); + SuspendLayout(); + // + // pictureBoxMotorboat + // + pictureBoxMotorboat.Dock = DockStyle.Fill; + pictureBoxMotorboat.Location = new Point(0, 0); + pictureBoxMotorboat.Name = "pictureBoxMotorboat"; + pictureBoxMotorboat.Size = new Size(800, 450); + pictureBoxMotorboat.TabIndex = 0; + pictureBoxMotorboat.TabStop = false; + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(12, 409); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(94, 29); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.arrowLeft; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(662, 406); + 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(703, 406); + 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(744, 406); + 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(703, 368); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 5; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + buttonUp.MouseClick += ButtonMove_Click; + // + // FormMotorboat + // + 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(buttonCreate); + Controls.Add(pictureBoxMotorboat); + Name = "FormMotorboat"; + Text = "Моторная лодка"; + ((System.ComponentModel.ISupportInitialize)pictureBoxMotorboat).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBoxMotorboat; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonDown; + private Button buttonRight; + private Button buttonUp; + } +} \ No newline at end of file diff --git a/ProjectMotorboat/ProjectMotorboat/FormMotorboat.cs b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.cs new file mode 100644 index 0000000..8c24b6f --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.cs @@ -0,0 +1,90 @@ +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 ProjectMotorboat +{ + public partial class FormMotorboat : Form + { + private DrawningMotorboat? _drawningMotorboat; + public FormMotorboat() + { + InitializeComponent(); + } + + private void buttonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningMotorboat = new DrawningMotorboat(); + _drawningMotorboat.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))); + _drawningMotorboat.SetPictureSize(pictureBoxMotorboat.Width, pictureBoxMotorboat.Height); + _drawningMotorboat.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Bitmap bmp = new(pictureBoxMotorboat.Width, pictureBoxMotorboat.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningMotorboat.DrawTransport(gr); + pictureBoxMotorboat.Image = bmp; + } + + private void Draw() + { + if (_drawningMotorboat == null) + { + return; + } + Bitmap bmp = new(pictureBoxMotorboat.Width, + pictureBoxMotorboat.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningMotorboat.DrawTransport(gr); + pictureBoxMotorboat.Image = bmp; + } + + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningMotorboat == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningMotorboat.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningMotorboat.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningMotorboat.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningMotorboat.MoveTransport(DirectionType.Right); + break; + } + if (result) + { + Draw(); + } + } + + //private void ButtonMove_Click(object sender, MouseEventArgs e) + //{ + + //} + } +} diff --git a/ProjectMotorboat/ProjectMotorboat/FormMotorboat.resx b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/FormMotorboat.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProjectMotorboat/ProjectMotorboat/Program.cs b/ProjectMotorboat/ProjectMotorboat/Program.cs index a42f2b3..24666ac 100644 --- a/ProjectMotorboat/ProjectMotorboat/Program.cs +++ b/ProjectMotorboat/ProjectMotorboat/Program.cs @@ -11,7 +11,7 @@ namespace ProjectMotorboat // 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 FormMotorboat()); } } } \ No newline at end of file diff --git a/ProjectMotorboat/ProjectMotorboat/Properties/Resources.Designer.cs b/ProjectMotorboat/ProjectMotorboat/Properties/Resources.Designer.cs new file mode 100644 index 0000000..6ee99c5 --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectMotorboat.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("ProjectMotorboat.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/ProjectMotorboat/ProjectMotorboat/Properties/Resources.resx b/ProjectMotorboat/ProjectMotorboat/Properties/Resources.resx new file mode 100644 index 0000000..f23685d --- /dev/null +++ b/ProjectMotorboat/ProjectMotorboat/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 + + + + ..\strelki\arrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\strelki\arrowLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\strelki\arrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\strelki\arrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ProjectMotorboat/ProjectMotorboat/strelki/arrowDown.png b/ProjectMotorboat/ProjectMotorboat/strelki/arrowDown.png new file mode 100644 index 0000000..95e1a46 Binary files /dev/null and b/ProjectMotorboat/ProjectMotorboat/strelki/arrowDown.png differ diff --git a/ProjectMotorboat/ProjectMotorboat/strelki/arrowLeft.png b/ProjectMotorboat/ProjectMotorboat/strelki/arrowLeft.png new file mode 100644 index 0000000..f21cbdd Binary files /dev/null and b/ProjectMotorboat/ProjectMotorboat/strelki/arrowLeft.png differ diff --git a/ProjectMotorboat/ProjectMotorboat/strelki/arrowRight.png b/ProjectMotorboat/ProjectMotorboat/strelki/arrowRight.png new file mode 100644 index 0000000..f535b2d Binary files /dev/null and b/ProjectMotorboat/ProjectMotorboat/strelki/arrowRight.png differ diff --git a/ProjectMotorboat/ProjectMotorboat/strelki/arrowUp.png b/ProjectMotorboat/ProjectMotorboat/strelki/arrowUp.png new file mode 100644 index 0000000..a61156a Binary files /dev/null and b/ProjectMotorboat/ProjectMotorboat/strelki/arrowUp.png differ diff --git a/WinFormsApp1/WinFormsApp1.sln b/WinFormsApp1/WinFormsApp1.sln new file mode 100644 index 0000000..cc16879 --- /dev/null +++ b/WinFormsApp1/WinFormsApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34525.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsApp1", "WinFormsApp1\WinFormsApp1.csproj", "{50092433-6AF5-4E71-9559-079AE2F9901A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50092433-6AF5-4E71-9559-079AE2F9901A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50092433-6AF5-4E71-9559-079AE2F9901A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50092433-6AF5-4E71-9559-079AE2F9901A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50092433-6AF5-4E71-9559-079AE2F9901A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {59C3FED6-0E53-4AF0-9E1B-5ACF902ED5CE} + EndGlobalSection +EndGlobal diff --git a/ProjectMotorboat/ProjectMotorboat/Form1.Designer.cs b/WinFormsApp1/WinFormsApp1/Form1.Designer.cs similarity index 97% rename from ProjectMotorboat/ProjectMotorboat/Form1.Designer.cs rename to WinFormsApp1/WinFormsApp1/Form1.Designer.cs index 6ded947..1ac166c 100644 --- a/ProjectMotorboat/ProjectMotorboat/Form1.Designer.cs +++ b/WinFormsApp1/WinFormsApp1/Form1.Designer.cs @@ -1,4 +1,4 @@ -namespace ProjectMotorboat +namespace WinFormsApp1 { partial class Form1 { diff --git a/ProjectMotorboat/ProjectMotorboat/Form1.cs b/WinFormsApp1/WinFormsApp1/Form1.cs similarity index 83% rename from ProjectMotorboat/ProjectMotorboat/Form1.cs rename to WinFormsApp1/WinFormsApp1/Form1.cs index 2fd37d2..dabe0d0 100644 --- a/ProjectMotorboat/ProjectMotorboat/Form1.cs +++ b/WinFormsApp1/WinFormsApp1/Form1.cs @@ -1,4 +1,4 @@ -namespace ProjectMotorboat +namespace WinFormsApp1 { public partial class Form1 : Form { diff --git a/ProjectMotorboat/ProjectMotorboat/Form1.resx b/WinFormsApp1/WinFormsApp1/Form1.resx similarity index 100% rename from ProjectMotorboat/ProjectMotorboat/Form1.resx rename to WinFormsApp1/WinFormsApp1/Form1.resx diff --git a/WinFormsApp1/WinFormsApp1/Program.cs b/WinFormsApp1/WinFormsApp1/Program.cs new file mode 100644 index 0000000..1e39c2a --- /dev/null +++ b/WinFormsApp1/WinFormsApp1/Program.cs @@ -0,0 +1,17 @@ +namespace WinFormsApp1 +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/WinFormsApp1/WinFormsApp1/WinFormsApp1.csproj b/WinFormsApp1/WinFormsApp1/WinFormsApp1.csproj new file mode 100644 index 0000000..663fdb8 --- /dev/null +++ b/WinFormsApp1/WinFormsApp1/WinFormsApp1.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net8.0-windows + enable + true + enable + + + \ No newline at end of file