diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/DirectionType.cs b/WinFormsAppExcavator/WinFormsAppExcavator/DirectionType.cs
new file mode 100644
index 0000000..e3600da
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/DirectionType.cs
@@ -0,0 +1,26 @@
+namespace WinFormsAppExcavator;
+
+///
+/// направление перемещения
+///
+public enum DirectionType
+{
+ ///
+ /// Вверх
+ ///
+ Up=1,
+ ///
+ /// Вниз
+ ///
+ Down=2,
+ ///
+ /// Влево
+ ///
+ Left=3,
+ ///
+ /// Вправо
+ ///
+ Right=4,
+
+}
+
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/DrawingExcavator.cs b/WinFormsAppExcavator/WinFormsAppExcavator/DrawingExcavator.cs
new file mode 100644
index 0000000..6d69187
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/DrawingExcavator.cs
@@ -0,0 +1,245 @@
+namespace WinFormsAppExcavator;
+
+///
+/// Класс, отвечающий за прорисовку и передвижение объекта сущности
+///
+public class DrawingExcavator
+{
+ ///
+ /// Класс-сущность
+ ///
+ public EntityExcavator? EntityExcavator { get; private set; }
+
+ ///
+ /// Ширина окна
+ ///
+ private int? _pictureWidth;
+
+ ///
+ /// Высота окна
+ ///
+ private int? _pictureHeight;
+
+ ///
+ /// Левая координата прорисовки экскаватора
+ ///
+ private int? _startPosX;
+
+ ///
+ /// Верхняя кооридната прорисовки экскаватора
+ ///
+ private int? _startPosY;
+
+ ///
+ /// Ширина прорисовки экскаватора
+ ///
+ private readonly int _drawningExcavatorWidth = 175;
+
+ ///
+ /// Высота прорисовки экскаватора
+ ///
+ private readonly int _drawningExcavatorHeight =80;
+
+
+ ///
+ /// Инициализация свойств
+ ///
+ /// Скорость
+ /// Вес
+ /// Основной цвет
+ /// Дополнительный цвет
+ /// Признак наличия обвеса
+ /// Признак наличия антикрыла
+ /// Признак наличия гоночной полосы
+ public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bucket, bool support, bool bulldozerDump)
+ {
+ EntityExcavator = new EntityExcavator();
+ EntityExcavator.Init(speed, weight, bodyColor, additionalColor, bucket, support, bulldozerDump);
+ _pictureWidth = null;
+ _pictureHeight = null;
+ _startPosX = null;
+ _startPosY = null;
+ }
+
+ ///
+ /// Установка границ поля
+ ///
+ /// Ширина поля
+ /// Высота поля
+ /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах
+ public bool SetPictureSize(int width, int height)
+ {
+
+ if (_drawningExcavatorWidth < width && _drawningExcavatorHeight < height)
+ {
+ _pictureWidth = width;
+ _pictureHeight = height;
+ return true;
+ }
+ else { return false; }
+ }
+
+ ///
+ /// Установка позиции
+ ///
+ /// Координата X
+ /// Координата Y
+ public void SetPosition(int x, int y)
+ {
+ if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
+ {
+ return;
+ }
+ if (x > 0 && y > 0 && x + _drawningExcavatorWidth < _pictureWidth && _drawningExcavatorHeight + y < _pictureHeight)
+ {
+ _startPosX = x;
+ _startPosY = y;
+ }
+ else
+ {
+ _startPosX = 10;
+ _startPosY = 10;
+ }
+ }
+
+ ///
+ /// Изменение направления перемещения
+ ///
+ /// Направление
+ /// true - перемещение выполнено, false - перемещение невозможно
+ public bool MoveTransport(DirectionType direction)
+ {
+ if (EntityExcavator == null || !_startPosX.HasValue || !_startPosY.HasValue)
+ {
+ return false;
+ }
+
+ switch (direction)
+ {
+ //влево
+ case DirectionType.Left:
+ if (_startPosX.Value - EntityExcavator.Step > 0)
+ {
+ _startPosX -= (int)EntityExcavator.Step;
+ }
+ return true;
+ //вверх
+ case DirectionType.Up:
+ if (_startPosY.Value - EntityExcavator.Step > 0)
+ {
+ _startPosY -= (int)EntityExcavator.Step;
+ }
+ return true;
+ // вправо
+ case DirectionType.Right:
+ if (_startPosX.Value+_drawningExcavatorWidth + EntityExcavator.Step < _pictureWidth)
+ {
+ _startPosX += (int)EntityExcavator.Step;
+ }
+ return true;
+ //вниз
+ case DirectionType.Down:
+ if (_startPosY.Value+_drawningExcavatorHeight + EntityExcavator.Step< _pictureHeight)
+ {
+ _startPosY += (int)EntityExcavator.Step;
+ }
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ ///
+ /// Прорисовка объекта
+ ///
+ ///
+ public void DrawTransport(Graphics g)
+ {
+ if (EntityExcavator == null || !_startPosX.HasValue || !_startPosY.HasValue)
+ {
+ return;
+ }
+
+ Pen pen = new(Color.Black);
+ Brush additionalBrush = new SolidBrush(EntityExcavator.AdditionalColor);
+ Brush bodybrush = new SolidBrush(EntityExcavator.BodyColor);
+
+ //границы экскаватора
+ g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 20, 100, 30);
+ g.DrawRectangle(pen, _startPosX.Value+30, _startPosY.Value, 10,20);
+ g.DrawRectangle(pen, _startPosX.Value+80, _startPosY.Value, 20,20);
+ g.DrawArc(pen, _startPosX.Value, _startPosY.Value + 45, 30, 40, 130, 100);
+ g.DrawArc(pen, _startPosX.Value + 80, _startPosY.Value + 50, 30, 40, 285, 110);
+ g.DrawLine(pen, _startPosX.Value+5, _startPosY.Value + 80, _startPosX.Value + 109, _startPosY.Value + 80);
+ g.DrawEllipse(pen, _startPosX.Value+5, _startPosY.Value + 53, 25, 25);
+ g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + 53, 25, 25);
+ g.DrawEllipse(pen, _startPosX.Value+30, _startPosY.Value + 69, 10, 10);
+ g.DrawEllipse(pen, _startPosX.Value+48, _startPosY.Value + 69, 10, 10);
+ g.DrawEllipse(pen, _startPosX.Value+65, _startPosY.Value + 69, 10, 10);
+ g.DrawEllipse(pen, _startPosX.Value+40, _startPosY.Value + 53, 7, 7);
+ g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 53, 7, 7);
+
+ //заливка кабины и основного железа
+ Brush br = new SolidBrush(Color.Black);
+ g.FillRectangle(bodybrush, _startPosX.Value, _startPosY.Value + 20, 100, 30);
+ g.FillRectangle(bodybrush, _startPosX.Value+30, _startPosY.Value, 10, 20);
+ g.FillRectangle(bodybrush, _startPosX.Value+80, _startPosY.Value, 20, 20);
+ g.FillEllipse(br, _startPosX.Value + 5, _startPosY.Value + 53, 25, 25);
+ g.FillEllipse(br, _startPosX.Value + 80, _startPosY.Value + 53, 25, 25);
+ g.FillEllipse(br, _startPosX.Value + 30, _startPosY.Value + 69, 10, 10);
+ g.FillEllipse(br, _startPosX.Value + 48, _startPosY.Value + 69, 10, 10);
+ g.FillEllipse(br, _startPosX.Value + 65, _startPosY.Value + 69, 10, 10);
+ g.FillEllipse(br, _startPosX.Value + 40, _startPosY.Value + 53, 7, 7);
+ g.FillEllipse(br, _startPosX.Value + 60, _startPosY.Value + 53, 7, 7);
+
+ //фары
+ Brush brfara = new SolidBrush(Color.Blue);
+ g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 27, 10, 10);
+ g.FillRectangle(brfara, _startPosX.Value, _startPosY.Value + 27, 10, 10);
+ //окно
+ g.FillRectangle(brfara, _startPosX.Value + 85, _startPosY.Value + 10, 10, 10);
+
+
+ if (EntityExcavator.Bucket)
+ {
+ Point point1 = new Point(_startPosX.Value+100, _startPosY.Value);
+ Point point2 = new Point(_startPosX.Value+180, _startPosY.Value);
+ Point point4 = new Point(_startPosX.Value + 180, _startPosY.Value + 40);
+ Point point5 = new Point(_startPosX.Value + 170, _startPosY.Value + 60);
+ Point point6 = new Point(_startPosX.Value + 150, _startPosY.Value + 60);
+ Point point7 = new Point(_startPosX.Value + 140, _startPosY.Value + 40);
+ Point point8 = new Point(_startPosX.Value + 172, _startPosY.Value + 40);
+ Point point9 = new Point(_startPosX.Value + 172, _startPosY.Value + 10);
+ Point point10 = new Point(_startPosX.Value + 100, _startPosY.Value+10);
+
+ Point[] Bucket = { point1, point2, point4, point5, point6, point7,point8,point9,point10};
+ g.FillPolygon(additionalBrush, Bucket);
+ }
+
+ if (EntityExcavator.Support)
+ {
+ Point point1 = new Point(_startPosX.Value+2, _startPosY.Value+50);
+ Point point2 = new Point(_startPosX.Value + 12, _startPosY.Value+80);
+ Point point3 = new Point(_startPosX.Value + 22, _startPosY.Value + 80);
+ Point point4 = new Point(_startPosX.Value + 12, _startPosY.Value+50);
+ Point[] Support = { point1, point2, point3, point4 };
+ g.FillPolygon(additionalBrush, Support);
+
+ }
+
+ if (EntityExcavator.BulldozerDump)
+ {
+ Point point11 = new Point(_startPosX.Value + 100, _startPosY.Value+40);
+ Point point12= new Point(_startPosX.Value + 160, _startPosY.Value+80);
+ Point point13= new Point(_startPosX.Value + 130, _startPosY.Value + 80);
+ Point point14 = new Point(_startPosX.Value + 100, _startPosY.Value+50);
+ Point[] Dump = { point11, point12, point13, point14 };
+ g.FillPolygon(additionalBrush, Dump);
+ }
+
+
+
+
+ }
+}
+
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/EntityExcavator.cs b/WinFormsAppExcavator/WinFormsAppExcavator/EntityExcavator.cs
new file mode 100644
index 0000000..3a16436
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/EntityExcavator.cs
@@ -0,0 +1,70 @@
+namespace WinFormsAppExcavator;
+
+public class EntityExcavator
+{
+ ///
+ /// Скорость
+ ///
+ 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 Bucket { get; private set; }
+
+ ///
+ /// Признак (опция) наличие опоры
+ ///
+ public bool Support { get; private set; }
+
+ ///
+ /// Признак (опция) наличие бульдозерного отвала
+ ///
+ public bool BulldozerDump { get; private set; }
+
+ ///
+ /// Шаг перемещения автомобиля
+ ///
+ public double Step => Speed * 100 / Weight;
+
+ ///
+ /// Инициализация полей объекта-класса экскаватора
+ ///
+ /// Скорость
+ /// Вес автомобиля
+ /// Основной цвет
+ /// Дополнительный цвет
+ /// Признак наличия ковша
+ /// Признак наличия опоры
+ /// Признак наличия бульдозерного обвеса
+
+
+ public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bucket, bool support, bool bulldozerDump)
+ {
+ Speed = speed;
+ Weight = weight;
+ BodyColor = bodyColor;
+ AdditionalColor = additionalColor;
+ Bucket = bucket;
+ Support = support;
+ BulldozerDump = bulldozerDump;
+
+ }
+}
+
+
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.Designer.cs b/WinFormsAppExcavator/WinFormsAppExcavator/Form1.Designer.cs
deleted file mode 100644
index bc711b3..0000000
--- a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.Designer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace WinFormsAppExcavator
-{
- 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
- }
-}
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.cs b/WinFormsAppExcavator/WinFormsAppExcavator/Form1.cs
deleted file mode 100644
index 8cef7bc..0000000
--- a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace WinFormsAppExcavator
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.Designer.cs b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.Designer.cs
new file mode 100644
index 0000000..81e7e5a
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.Designer.cs
@@ -0,0 +1,135 @@
+
+namespace WinFormsAppExcavator
+{
+ partial class FormExcavator
+ {
+ ///
+ /// 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()
+ {
+ pictureBoxExcavator = new PictureBox();
+ buttonCreat = new Button();
+ buttonLeft = new Button();
+ buttonRight = new Button();
+ buttonDown = new Button();
+ buttonUp = new Button();
+ ((System.ComponentModel.ISupportInitialize)pictureBoxExcavator).BeginInit();
+ SuspendLayout();
+ //
+ // pictureBoxExcavator
+ //
+ pictureBoxExcavator.Dock = DockStyle.Fill;
+ pictureBoxExcavator.Location = new Point(0, 0);
+ pictureBoxExcavator.Name = "pictureBoxExcavator";
+ pictureBoxExcavator.Size = new Size(898, 329);
+ pictureBoxExcavator.TabIndex = 0;
+ pictureBoxExcavator.TabStop = false;
+ //
+ // buttonCreat
+ //
+ buttonCreat.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
+ buttonCreat.Location = new Point(12, 288);
+ buttonCreat.Name = "buttonCreat";
+ buttonCreat.Size = new Size(94, 29);
+ buttonCreat.TabIndex = 1;
+ buttonCreat.Text = "Создать";
+ buttonCreat.UseVisualStyleBackColor = true;
+ buttonCreat.Click += ButtonCreat_Click;
+ //
+ // buttonLeft
+ //
+ buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+ buttonLeft.BackgroundImage = Properties.Resources.Left;
+ buttonLeft.BackgroundImageLayout = ImageLayout.Stretch;
+ buttonLeft.Location = new Point(767, 285);
+ buttonLeft.Name = "buttonLeft";
+ buttonLeft.Size = new Size(35, 35);
+ buttonLeft.TabIndex = 2;
+ buttonLeft.UseVisualStyleBackColor = true;
+ buttonLeft.Click += ButtonMove_Click;
+ //
+ // buttonRight
+ //
+ buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+ buttonRight.BackgroundImage = Properties.Resources.Right;
+ buttonRight.BackgroundImageLayout = ImageLayout.Stretch;
+ buttonRight.Location = new Point(849, 285);
+ buttonRight.Name = "buttonRight";
+ buttonRight.Size = new Size(35, 35);
+ buttonRight.TabIndex = 3;
+ buttonRight.UseVisualStyleBackColor = true;
+ buttonRight.Click += ButtonMove_Click;
+ //
+ // buttonDown
+ //
+ buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+ buttonDown.BackgroundImage = Properties.Resources.Down;
+ buttonDown.BackgroundImageLayout = ImageLayout.Stretch;
+ buttonDown.Location = new Point(808, 285);
+ buttonDown.Name = "buttonDown";
+ buttonDown.Size = new Size(35, 35);
+ buttonDown.TabIndex = 4;
+ buttonDown.UseVisualStyleBackColor = true;
+ buttonDown.Click += ButtonMove_Click;
+ //
+ // buttonUp
+ //
+ buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+ buttonUp.BackgroundImage = Properties.Resources.Up;
+ buttonUp.BackgroundImageLayout = ImageLayout.Stretch;
+ buttonUp.Location = new Point(808, 244);
+ buttonUp.Name = "buttonUp";
+ buttonUp.Size = new Size(35, 35);
+ buttonUp.TabIndex = 5;
+ buttonUp.UseVisualStyleBackColor = true;
+ buttonUp.Click += ButtonMove_Click;
+ //
+ // FormExcavator
+ //
+ AutoScaleDimensions = new SizeF(8F, 20F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(898, 329);
+ Controls.Add(buttonUp);
+ Controls.Add(buttonDown);
+ Controls.Add(buttonRight);
+ Controls.Add(buttonLeft);
+ Controls.Add(buttonCreat);
+ Controls.Add(pictureBoxExcavator);
+ Name = "FormExcavator";
+ Text = "Экскаватор";
+ ((System.ComponentModel.ISupportInitialize)pictureBoxExcavator).EndInit();
+ ResumeLayout(false);
+ }
+
+ #endregion
+
+ private PictureBox pictureBoxExcavator;
+ private Button buttonLeft;
+ private Button buttonRight;
+ private Button buttonDown;
+ private Button buttonUp;
+ public Button buttonCreat;
+ }
+}
\ No newline at end of file
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.cs b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.cs
new file mode 100644
index 0000000..30c55b6
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.cs
@@ -0,0 +1,93 @@
+namespace WinFormsAppExcavator
+{
+ ///
+ /// форма с объектом Экскаватор
+ ///
+ public partial class FormExcavator : Form
+ {
+ ///
+ /// поле объект для прорисовки объекта
+ ///
+ private DrawingExcavator? _drawingExcavator;
+
+ ///
+ /// Конструктор формы
+ ///
+ public FormExcavator()
+ {
+ InitializeComponent();
+ }
+
+ ///
+ /// метод прорисовки экскаватора
+ ///
+
+ private void Draw()
+ {
+ if (_drawingExcavator == null)
+ {
+ return;
+ }
+
+ Bitmap bmp = new(pictureBoxExcavator.Width, pictureBoxExcavator.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _drawingExcavator.DrawTransport(gr);
+ pictureBoxExcavator.Image = bmp;
+ }
+
+ ///
+ /// обработка кнопки создать
+ ///
+ ///
+ ///
+ private void ButtonCreat_Click(object sender, EventArgs e)
+ {
+ Random random = new();
+ _drawingExcavator = new DrawingExcavator();
+ _drawingExcavator.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)));
+ _drawingExcavator.SetPictureSize(pictureBoxExcavator.Width, pictureBoxExcavator.Height);
+ _drawingExcavator.SetPosition(random.Next(10, 100), random.Next(10, 100));
+
+ Draw();
+ }
+
+ ///
+ /// перемещение объекта
+ ///
+ ///
+ ///
+ private void ButtonMove_Click(object sender, EventArgs e)
+ {
+ if (_drawingExcavator == null)
+ {
+ return;
+ }
+
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ bool result = false;
+ switch (name)
+ {
+ case "buttonUp":
+ result = _drawingExcavator.MoveTransport(DirectionType.Up);
+ break;
+ case "buttonDown":
+ result = _drawingExcavator.MoveTransport(DirectionType.Down);
+ break;
+ case "buttonLeft":
+ result = _drawingExcavator.MoveTransport(DirectionType.Left);
+ break;
+ case "buttonRight":
+ result = _drawingExcavator.MoveTransport(DirectionType.Right);
+ break;
+ }
+
+ if (result)
+ {
+ Draw();
+ }
+ }
+ }
+}
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.resx b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.resx
similarity index 93%
rename from WinFormsAppExcavator/WinFormsAppExcavator/Form1.resx
rename to WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.resx
index 1af7de1..af32865 100644
--- a/WinFormsAppExcavator/WinFormsAppExcavator/Form1.resx
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/FormExcavator.resx
@@ -1,17 +1,17 @@
-
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Program.cs b/WinFormsAppExcavator/WinFormsAppExcavator/Program.cs
index 84c9bb5..9552f97 100644
--- a/WinFormsAppExcavator/WinFormsAppExcavator/Program.cs
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/Program.cs
@@ -1,4 +1,4 @@
-namespace WinFormsAppExcavator
+namespace WinFormsAppExcavator
{
internal static class Program
{
@@ -11,7 +11,7 @@ namespace WinFormsAppExcavator
// 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 FormExcavator());
}
}
}
\ No newline at end of file
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Properties/Resources.Designer.cs b/WinFormsAppExcavator/WinFormsAppExcavator/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..1af2022
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace WinFormsAppExcavator.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("WinFormsAppExcavator.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 Down {
+ get {
+ object obj = ResourceManager.GetObject("Down", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap Left {
+ get {
+ object obj = ResourceManager.GetObject("Left", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap Right {
+ get {
+ object obj = ResourceManager.GetObject("Right", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap Up {
+ get {
+ object obj = ResourceManager.GetObject("Up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Properties/Resources.resx b/WinFormsAppExcavator/WinFormsAppExcavator/Properties/Resources.resx
new file mode 100644
index 0000000..fc8c15c
--- /dev/null
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/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\Down.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Right.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
\ No newline at end of file
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Down.bmp b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Down.bmp
new file mode 100644
index 0000000..9a978c3
Binary files /dev/null and b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Down.bmp differ
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Left.png b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Left.png
new file mode 100644
index 0000000..f20b33f
Binary files /dev/null and b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Left.png differ
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Right.bmp b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Right.bmp
new file mode 100644
index 0000000..75b6203
Binary files /dev/null and b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Right.bmp differ
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Up.png b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Up.png
new file mode 100644
index 0000000..14c6eab
Binary files /dev/null and b/WinFormsAppExcavator/WinFormsAppExcavator/Resources/Up.png differ
diff --git a/WinFormsAppExcavator/WinFormsAppExcavator/WinFormsAppExcavator.csproj b/WinFormsAppExcavator/WinFormsAppExcavator/WinFormsAppExcavator.csproj
index 663fdb8..af03d74 100644
--- a/WinFormsAppExcavator/WinFormsAppExcavator/WinFormsAppExcavator.csproj
+++ b/WinFormsAppExcavator/WinFormsAppExcavator/WinFormsAppExcavator.csproj
@@ -8,4 +8,19 @@
enable
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file