diff --git a/Bulldozer/Bulldozer.sln b/Bulldozer/Bulldozer.sln index a1794dc..94952fa 100644 --- a/Bulldozer/Bulldozer.sln +++ b/Bulldozer/Bulldozer.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bulldozer", "Bulldozer\Bulldozer.csproj", "{5971A7E3-6CB0-41D7-A8C9-F2E29DBC4C68}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bulldozer", "Bulldozer\Bulldozer.csproj", "{054C01C3-1210-4465-84BB-9B559909C149}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5971A7E3-6CB0-41D7-A8C9-F2E29DBC4C68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5971A7E3-6CB0-41D7-A8C9-F2E29DBC4C68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5971A7E3-6CB0-41D7-A8C9-F2E29DBC4C68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5971A7E3-6CB0-41D7-A8C9-F2E29DBC4C68}.Release|Any CPU.Build.0 = Release|Any CPU + {054C01C3-1210-4465-84BB-9B559909C149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {054C01C3-1210-4465-84BB-9B559909C149}.Debug|Any CPU.Build.0 = Debug|Any CPU + {054C01C3-1210-4465-84BB-9B559909C149}.Release|Any CPU.ActiveCfg = Release|Any CPU + {054C01C3-1210-4465-84BB-9B559909C149}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {59528A8E-08B2-4D91-8AD1-D237F3B6C1B5} + SolutionGuid = {F8B8E9BD-8990-494B-B3F6-8CBB63A85858} EndGlobalSection EndGlobal diff --git a/Bulldozer/Bulldozer/Bulldozer.cs b/Bulldozer/Bulldozer/Bulldozer.cs new file mode 100644 index 0000000..902ba03 --- /dev/null +++ b/Bulldozer/Bulldozer/Bulldozer.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bulldozer +{ + public class EntityBulldozer + { + /// + /// Скорость + /// + 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 Color DopColor { get; private set; } + /// + /// Отвал бульдозера + /// + public bool Blade { get; private set; } + /// + /// Рыхлитель бульдозера + /// + public bool Ripper { get; private set; } + /// + /// Шаг перемещения бульдозера + /// + public double Step => (double)Speed * 100 / Weight; + + /// Скорость + /// Вес бульдозера + /// Основной цвет + /// Дополнительный цвет + /// Отвал бульдозера + /// Рыхлитель бульдозера + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, Color dopColor, bool blade, bool ripper) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + DopColor = dopColor; + Blade = blade; + Ripper = ripper; + } + } +} diff --git a/Bulldozer/Bulldozer/Bulldozer.csproj b/Bulldozer/Bulldozer/Bulldozer.csproj index b57c89e..13ee123 100644 --- a/Bulldozer/Bulldozer/Bulldozer.csproj +++ b/Bulldozer/Bulldozer/Bulldozer.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/Bulldozer/Bulldozer/DirectionType.cs b/Bulldozer/Bulldozer/DirectionType.cs new file mode 100644 index 0000000..4ecb8de --- /dev/null +++ b/Bulldozer/Bulldozer/DirectionType.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bulldozer +{ + /// + /// Направления движения + /// + public enum DirectionType + { + /// + /// Вверх + /// + Up = 1, + /// + /// Вниз + /// + Down = 2, + /// + /// Влево + /// + Left = 3, + /// + /// Вправо + /// + Right = 4, + + } +} diff --git a/Bulldozer/Bulldozer/DrawingBulldozer.cs b/Bulldozer/Bulldozer/DrawingBulldozer.cs new file mode 100644 index 0000000..a46ef49 --- /dev/null +++ b/Bulldozer/Bulldozer/DrawingBulldozer.cs @@ -0,0 +1,220 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static System.Windows.Forms.AxHost; + +namespace Bulldozer +{ + /// + /// Класс отрисовки и перемещения объекта-сущности + /// + public class DrawingBulldozer + { + /// + /// Класс-сущность + /// + public EntityBulldozer? EntityBulldozer { get; private set; } + /// + /// Ширина окна + /// + private int _pictureWidth; + /// + /// Высота окна + /// + private int _pictureHeight; + /// + /// Координата прорисовки по оси X + /// + private int _startPosX; + /// + /// Координата прорисовки по оси Y + /// + private int _startPosY; + /// + /// Ширина бульдозера + /// + private readonly int _bulldozerWidth = 150; + /// + /// Высота бульдозера + /// + private readonly int _bulldozerHeight = 60; + + /// + /// + /// + /// Скорость + /// Вес бульдозера + /// Основной цвет + /// Дополнительный цвет + /// Отвал бульдозера + /// Рыхлитель бульдозера + /// Ширина изображения + /// Высота изображения + + public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, Color dopColor, bool blade, bool ripper, int width, int height) + { + if ((height < _bulldozerHeight) || (width < _bulldozerWidth)) + { + return false; + } + else + { + _pictureWidth = width; + _pictureHeight = height; + EntityBulldozer = new EntityBulldozer(); + EntityBulldozer.Init(speed, weight, bodyColor, additionalColor, dopColor, blade, ripper); + return true; + } + } + + public void SetPosition(int x, int y) + { + if (x < 0) + { + x = 0; + } + else if (x > _pictureWidth - _bulldozerWidth) + { + x = _pictureWidth - _bulldozerWidth; + } + + if (y < 0) + { + y = 0; + } + else if (y > _pictureHeight - _bulldozerHeight) + { + y = _pictureHeight - _bulldozerHeight; + } + _startPosX = x; + _startPosY = y; + } + + public void MoveBulldozer(DirectionType direction) + { + if (EntityBulldozer == null) + { + return; + } + switch (direction) + { + case DirectionType.Left: + if (_startPosX - EntityBulldozer.Step > 0) + { + _startPosX -= (int)EntityBulldozer.Step; + } + break; + case DirectionType.Up: + if (_startPosY - EntityBulldozer.Step > 0) + { + _startPosY -= (int)EntityBulldozer.Step; + } + break; + case DirectionType.Right: + if (_startPosX + _bulldozerWidth + EntityBulldozer.Step < _pictureWidth) + { + _startPosX += (int)EntityBulldozer.Step; + } + break; + case DirectionType.Down: + if (_startPosY + _bulldozerHeight + EntityBulldozer.Step < _pictureHeight) + { + _startPosY += (int)EntityBulldozer.Step; + } + break; + } + } + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntityBulldozer == null) + { + return; + } + Pen pen = new(Color.Black); + Brush bodyBrush = new SolidBrush(EntityBulldozer.BodyColor); + Brush additionalBrush = new SolidBrush(EntityBulldozer.AdditionalColor); + Brush dopBrush = new SolidBrush(EntityBulldozer.DopColor); + Pen dopPen = new Pen(EntityBulldozer.DopColor); + + /// + /// + /// Отрисовка отвала бульдозера + /// + if (EntityBulldozer.Blade) + { + Point point1 = new Point(_startPosX + 8, _startPosY + 29); + Point point2 = new Point(_startPosX + 8, _startPosY + 50); + Point point3 = new Point(_startPosX, _startPosY + 50); + Point[] triangle = { point1, point2, point3 }; + + g.FillRectangle(dopBrush, _startPosX + 8, _startPosY + 29, 8, 8); // заливка основания отвала + g.FillPolygon(dopBrush, triangle); // заливка отвала + + g.DrawRectangle(dopPen, _startPosX+8, _startPosY + 29, 8, 8); // обводка основания отвала + g.DrawPolygon(dopPen, triangle); // обводка отвала + } + /// + /// Отрисовка рыхлителя бульдозера + /// + if (EntityBulldozer.Ripper) + { + Point ripperPoint1 = new Point(_startPosX + 140, _startPosY + 37); + Point ripperPoint2 = new Point(_startPosX + 151, _startPosY + 37); + Point ripperPoint3 = new Point(_startPosX + 140, _startPosY + 60); + Point[] ripper = { ripperPoint1, ripperPoint2, ripperPoint3 }; + + g.FillRectangle(dopBrush, _startPosX + 136, _startPosY + 29, 15, 8); // заливка основания рыхлителя + g.FillPolygon(dopBrush, ripper); // заливка отвала + + g.DrawRectangle(dopPen, _startPosX + 136, _startPosY + 29, 15, 8); // обводка основания рыхлителя + g.DrawPolygon(dopPen, ripper); + } + + /// + /// Заливка гусеницы бульдозера + /// + Brush brGray = new SolidBrush(Color.Gray); + + g.FillEllipse(brGray, _startPosX + 17, _startPosY + 24, 119, 40); //Гусеница + g.FillEllipse(additionalBrush, _startPosX + 20, _startPosY + 35, 20, 20); // Левое колесо гусеницы + g.FillEllipse(additionalBrush, _startPosX + 115, _startPosY + 35, 20, 20); // Правое колесо гусеницы + g.FillEllipse(additionalBrush, _startPosX + 50, _startPosY + 45, 10, 10); // 1 центральное колесо гусеницы + g.FillEllipse(additionalBrush, _startPosX + 70, _startPosY + 45, 10, 10); // 2 центральное колесо гусеницы + g.FillEllipse(additionalBrush, _startPosX + 90, _startPosY + 45, 10, 10); // 3 центральное колесо гусеницы + + /// + /// Отрисовка границ бульдозера + /// + + g.DrawEllipse(pen, _startPosX + 20, _startPosY + 35, 20, 20); // Левое колесо гусеницы + g.DrawEllipse(pen, _startPosX + 115, _startPosY + 35, 20, 20); // Правое колесо гусеницы + g.DrawEllipse(pen, _startPosX + 50, _startPosY + 45, 10, 10); // 1 центральное колесо гусеницы + g.DrawEllipse(pen, _startPosX + 70, _startPosY + 45, 10, 10); // 2 центральное колесо гусеницы + g.DrawEllipse(pen, _startPosX + 90, _startPosY + 45, 10, 10); // 3 центральное колесо гусеницы + + + /// + /// Кузов бульдозера + /// + g.FillRectangle(bodyBrush, _startPosX + 102, _startPosY, 28, 24); //кабина + g.FillRectangle(bodyBrush, _startPosX + 17, _startPosY + 24, 119, 18); // основная часть + g.FillRectangle(bodyBrush, _startPosX + 30, _startPosY, 10, 24); // выхлопная труба + + /// + /// Корпус + /// + g.DrawRectangle(pen, _startPosX + 102, _startPosY, 28, 24); //кабина + g.DrawRectangle(pen, _startPosX + 17, _startPosY + 24, 119, 18); // основная часть + g.DrawRectangle(pen, _startPosX + 30, _startPosY, 10, 24); // выхлопная труба + + + + } + } +} diff --git a/Bulldozer/Bulldozer/Form1.Designer.cs b/Bulldozer/Bulldozer/Form1.Designer.cs deleted file mode 100644 index 44769df..0000000 --- a/Bulldozer/Bulldozer/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace Bulldozer -{ - 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/Bulldozer/Bulldozer/Form1.cs b/Bulldozer/Bulldozer/Form1.cs deleted file mode 100644 index 02f2ea7..0000000 --- a/Bulldozer/Bulldozer/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Bulldozer -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/Bulldozer/Bulldozer/FormBulldozer.Designer.cs b/Bulldozer/Bulldozer/FormBulldozer.Designer.cs new file mode 100644 index 0000000..6f330ff --- /dev/null +++ b/Bulldozer/Bulldozer/FormBulldozer.Designer.cs @@ -0,0 +1,148 @@ +namespace Bulldozer +{ + partial class FormBulldozer + { + /// + /// 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.pictureBoxBulldozer = new System.Windows.Forms.PictureBox(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonUp = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBulldozer)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox + // + this.pictureBoxBulldozer.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxBulldozer.Location = new System.Drawing.Point(0, 0); + this.pictureBoxBulldozer.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.pictureBoxBulldozer.Name = "pictureBoxBulldozer"; + this.pictureBoxBulldozer.Size = new System.Drawing.Size(1010, 615); + this.pictureBoxBulldozer.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBoxBulldozer.TabIndex = 0; + this.pictureBoxBulldozer.TabStop = false; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonCreate.Location = new System.Drawing.Point(14, 568); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(86, 31); + this.buttonCreate.TabIndex = 1; + this.buttonCreate.Text = "Создать"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.ButtonCreate_Click); + // + // buttonLeft + // + this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonLeft.BackgroundImage = global::Bulldozer.Properties.Resources.arrowLeft; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonLeft.Image = global::Bulldozer.Properties.Resources.arrowLeft; + this.buttonLeft.Location = new System.Drawing.Point(867, 563); + this.buttonLeft.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(34, 40); + this.buttonLeft.TabIndex = 2; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonDown + // + this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonDown.BackgroundImage = global::Bulldozer.Properties.Resources.arrowDown; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonDown.Location = new System.Drawing.Point(909, 563); + this.buttonDown.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(34, 40); + this.buttonDown.TabIndex = 3; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonRight + // + this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRight.BackgroundImage = global::Bulldozer.Properties.Resources.arrowRight; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonRight.Image = global::Bulldozer.Properties.Resources.arrowRight; + this.buttonRight.Location = new System.Drawing.Point(950, 563); + this.buttonRight.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(34, 40); + this.buttonRight.TabIndex = 4; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonUp + // + this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUp.BackgroundImage = global::Bulldozer.Properties.Resources.arrowUp; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonUp.Image = global::Bulldozer.Properties.Resources.arrowUp; + this.buttonUp.Location = new System.Drawing.Point(909, 515); + this.buttonUp.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(34, 40); + this.buttonUp.TabIndex = 5; + this.buttonUp.UseVisualStyleBackColor = true; + this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click); + // + // FormBulldozer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1010, 615); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.pictureBoxBulldozer); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "FormBulldozer"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Bulldozer"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBulldozer)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private PictureBox pictureBoxBulldozer; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonDown; + private Button buttonRight; + private Button buttonUp; + } +} \ No newline at end of file diff --git a/Bulldozer/Bulldozer/FormBulldozer.cs b/Bulldozer/Bulldozer/FormBulldozer.cs new file mode 100644 index 0000000..4fbc49a --- /dev/null +++ b/Bulldozer/Bulldozer/FormBulldozer.cs @@ -0,0 +1,69 @@ +namespace Bulldozer +{ + public partial class FormBulldozer : Form + { + private DrawingBulldozer? _drawingBulldozer; + + public FormBulldozer() + { + InitializeComponent(); + } + + private void Draw() + { + if (_drawingBulldozer == null) + { + return; + } + Bitmap bmp = new(pictureBoxBulldozer.Width, pictureBoxBulldozer.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawingBulldozer.DrawTransport(gr); + pictureBoxBulldozer.Image = bmp; + } + + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawingBulldozer == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _drawingBulldozer.MoveBulldozer(DirectionType.Up); + break; + case "buttonDown": + _drawingBulldozer.MoveBulldozer(DirectionType.Down); + break; + case "buttonLeft": + _drawingBulldozer.MoveBulldozer(DirectionType.Left); + break; + case "buttonRight": + _drawingBulldozer.MoveBulldozer(DirectionType.Right); + break; + } + Draw(); + } + + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawingBulldozer = new DrawingBulldozer(); + _drawingBulldozer.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)), + 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)), + pictureBoxBulldozer.Width, + pictureBoxBulldozer.Height); + _drawingBulldozer.SetPosition(random.Next(10, 100),random.Next(10, 100)); + Draw(); + } + } +} \ No newline at end of file diff --git a/Bulldozer/Bulldozer/FormBulldozer.resx b/Bulldozer/Bulldozer/FormBulldozer.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Bulldozer/Bulldozer/FormBulldozer.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Bulldozer/Bulldozer/Program.cs b/Bulldozer/Bulldozer/Program.cs index f2941fb..88f97e9 100644 --- a/Bulldozer/Bulldozer/Program.cs +++ b/Bulldozer/Bulldozer/Program.cs @@ -8,10 +8,9 @@ namespace Bulldozer [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()); + Application.Run(new FormBulldozer()); } } } \ No newline at end of file diff --git a/Bulldozer/Bulldozer/Properties/Resources.Designer.cs b/Bulldozer/Bulldozer/Properties/Resources.Designer.cs new file mode 100644 index 0000000..827c315 --- /dev/null +++ b/Bulldozer/Bulldozer/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace Bulldozer.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("Bulldozer.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/Bulldozer/Bulldozer/Form1.resx b/Bulldozer/Bulldozer/Properties/Resources.resx similarity index 83% rename from Bulldozer/Bulldozer/Form1.resx rename to Bulldozer/Bulldozer/Properties/Resources.resx index 1af7de1..254c492 100644 --- a/Bulldozer/Bulldozer/Form1.resx +++ b/Bulldozer/Bulldozer/Properties/Resources.resx @@ -117,4 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\arrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\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/Bulldozer/Bulldozer/Resources/arrowDown.png b/Bulldozer/Bulldozer/Resources/arrowDown.png new file mode 100644 index 0000000..a9ffc50 Binary files /dev/null and b/Bulldozer/Bulldozer/Resources/arrowDown.png differ diff --git a/Bulldozer/Bulldozer/Resources/arrowLeft.png b/Bulldozer/Bulldozer/Resources/arrowLeft.png new file mode 100644 index 0000000..9bb289d Binary files /dev/null and b/Bulldozer/Bulldozer/Resources/arrowLeft.png differ diff --git a/Bulldozer/Bulldozer/Resources/arrowRight.png b/Bulldozer/Bulldozer/Resources/arrowRight.png new file mode 100644 index 0000000..1625843 Binary files /dev/null and b/Bulldozer/Bulldozer/Resources/arrowRight.png differ diff --git a/Bulldozer/Bulldozer/Resources/arrowUp.png b/Bulldozer/Bulldozer/Resources/arrowUp.png new file mode 100644 index 0000000..192cf15 Binary files /dev/null and b/Bulldozer/Bulldozer/Resources/arrowUp.png differ