Compare commits

..

10 Commits

Author SHA1 Message Date
ac2f899de2 Lab5 2024-02-02 18:56:53 +03:00
66b1a27476 is done 2023-12-14 20:45:11 +04:00
3394c1cf58 70% 2023-12-14 20:42:45 +04:00
Илья Федотов
660f9be57c Revert "Revert "0.3""
This reverts commit 4120e4751f4f765243959480c2f20e3afd59f80d.
2023-12-14 19:05:03 +04:00
Илья Федотов
4120e4751f Revert "0.3"
This reverts commit 06859bbd85364af07df00aeb8cdd362b0eca65cf.
2023-12-14 19:03:48 +04:00
Илья Федотов
06859bbd85 0.3 2023-12-14 18:57:21 +04:00
b8e8988f4d 2.0 2023-12-13 23:44:18 +03:00
05ea4c6edb End version.Правки 2023-11-30 22:12:26 +03:00
53d159876e end wersion 2023-11-30 22:01:08 +03:00
SAliulov
35cc4284cb 0.1 2023-11-03 13:48:02 +04:00
28 changed files with 2722 additions and 33 deletions

View File

@ -8,4 +8,19 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser
{
public enum Direction
{
Up = 1,
Down = 2,
Left = 3,
Right = 4
}
}

View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bulldoser.Entities;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Bulldoser.Drawings
{
public class DrawingBulldoser : DrawingTractor
{
public DrawingBulldoser(int speed, double weight, Color bodyColor, Color additionalColor,
bool otval, bool seifBatteries, int width, int height) : base(speed, weight, bodyColor, width, height, 180, 120)
{
if (EntityTractor != null)
{
EntityTractor = new EntityBulldoser(speed, width, bodyColor, additionalColor, otval, seifBatteries);
}
}
public override void DrawTransport(Graphics g)
{
if (EntityTractor is not EntityBulldoser Bulldoser)
{
return;
}
Pen pen = new(Color.Black);
Brush blackBrush = new SolidBrush(Color.Black);
Brush windows = new SolidBrush(Color.LightBlue);
Brush bodyColor = new SolidBrush(Bulldoser.BodyColor);
Brush additionalBrush = new SolidBrush(Bulldoser.AdditionalColor);
Brush grayBrush = new SolidBrush(Color.Gray);
if (Bulldoser.Otval)
{
g.FillRectangle(additionalBrush, _startPosX + 20, _startPosY + 55, 15, 5);
g.FillRectangle(additionalBrush, _startPosX + 10, _startPosY + 35, 10, 70);
g.FillRectangle(additionalBrush, _startPosX + 0, _startPosY + 100, 10, 5);
}
if (Bulldoser.SeifBatteries)
{
g.FillRectangle(additionalBrush, _startPosX + 155, _startPosY + 65, 40, 10);
g.FillRectangle(additionalBrush, _startPosX + 185, _startPosY + 75, 5, 30);
g.FillRectangle(additionalBrush, _startPosX + 175, _startPosY + 75, 5, 30);
}
base.DrawTransport(g);
}
}
}

View File

@ -0,0 +1,164 @@
using Bulldoser.Entities;
using Bulldoser.MovementStrategy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.Drawings
{
public class DrawingTractor
{
public EntityTractor? EntityTractor { get; set; }
protected int _pictureWidth;
protected int _pictureHeight;
protected int _startPosX;
protected int _startPosY;
private int tractWidth;
protected readonly int _tractWidth = 140;
protected readonly int _tractHeight = 123;
public int GetPosX => _startPosX;
public int GetPosY => _startPosY;
public int GetWidth => _tractWidth;
public int GetHeight => _tractHeight;
public IMoveableObject GetMoveableObject => new DrawingObjectTractor(this);
public DrawingTractor(int speed, double weight, Color bodyColor, int width, int heigth)
{
if (width < _tractWidth || heigth < _tractHeight)
{
return;
}
_pictureWidth = width;
_pictureHeight = heigth;
EntityTractor = new EntityTractor(speed, weight, bodyColor);
}
protected DrawingTractor(int speed, double weight, Color bodyColor, int width,
int height, int tractWidth, int tractHeight)
{
if (width < _tractWidth || height < _tractHeight)
{
return;
}
_pictureWidth = width;
_pictureHeight = height;
_tractWidth = tractWidth;
_tractHeight = tractHeight;
EntityTractor = new EntityTractor(speed, weight, bodyColor);
}
//Установка позиции
public void SetPosition(int x, int y)
{
if (x < 0 || x + _tractWidth > _pictureWidth)
{
x = _pictureWidth - tractWidth;
}
if (y < 0 || y + _tractHeight > _pictureHeight)
{
y = _pictureHeight - _tractHeight;
}
_startPosX = x;
_startPosY = y;
}
public void MoveTransport(Direction direction)
{
if (EntityTractor == null)
{
return;
}
switch (direction)
{
case Direction.Left:
if (_startPosX - EntityTractor.Step > 0)
{
_startPosX -= (int)EntityTractor.Step;
}
break;
case Direction.Up:
if (_startPosY - EntityTractor.Step > 0)
{
_startPosY -= (int)EntityTractor.Step;
}
break;
case Direction.Right:
if (_startPosX + EntityTractor.Step + _tractWidth < _pictureWidth)
{
_startPosX += (int)EntityTractor.Step;
}
break;
case Direction.Down:
if (_startPosY + EntityTractor.Step + _tractHeight < _pictureHeight)
{
_startPosY += (int)EntityTractor.Step;
}
break;
}
}
public virtual void DrawTransport(Graphics g)
{
{
if (EntityTractor == null) return;
}
Pen pen = new(Color.Black);
Brush brownBrush = new SolidBrush(Color.Brown);
Brush windows = new SolidBrush(Color.LightYellow);
Brush bodyColor = new SolidBrush(EntityTractor.BodyColor);
Brush blackBrush = new SolidBrush(Color.Black);
Brush grayBrush = new SolidBrush(Color.Gray);
//кузов
g.FillRectangle(bodyColor, _startPosX + 35, _startPosY + 35, 120, 40);
g.FillRectangle(bodyColor, _startPosX + 95, _startPosY + 0, 5, 35);
g.FillRectangle(bodyColor, _startPosX + 150, _startPosY + 0, 5, 35);
g.FillRectangle(bodyColor, _startPosX + 95, _startPosY + 0, 60, 5);
//труба
g.FillRectangle(bodyColor, _startPosX + 55, _startPosY + 5, 10, 30);
//кабина
g.FillRectangle(windows, _startPosX + 100, _startPosY + 5, 50, 30);
//гусеницы
g.FillEllipse(blackBrush, _startPosX + 25, _startPosY + 75, 30, 30);
g.FillEllipse(blackBrush, _startPosX + 135, _startPosY + 75, 30, 30);
g.FillRectangle(blackBrush, _startPosX + 35, _startPosY + 75, 120, 30);
g.FillEllipse(grayBrush, _startPosX + 28, _startPosY + 78, 25, 25);
g.FillEllipse(grayBrush, _startPosX + 138, _startPosY + 78, 25, 25);
g.FillEllipse(grayBrush, _startPosX + 58, _startPosY + 90, 15, 15);
g.FillEllipse(grayBrush, _startPosX + 88, _startPosY + 90, 15, 15);
g.FillEllipse(grayBrush, _startPosX + 118, _startPosY + 90, 15, 15);
g.FillEllipse(grayBrush, _startPosX + 78, _startPosY + 78, 10, 10);
g.FillEllipse(grayBrush, _startPosX + 105, _startPosY + 78, 10, 10);
}
public bool CanMove(Direction direction)
{
if (EntityTractor == null)
{
return false;
}
return direction switch
{
//влево
Direction.Left => _startPosX - EntityTractor.Step > 0,
//вверх
Direction.Up => _startPosY - EntityTractor.Step > 0,
// вправо
Direction.Right => _startPosX + EntityTractor.Step < _pictureWidth,
//вниз
Direction.Down => _startPosY + EntityTractor.Step < _pictureHeight,
};
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.Entities
{
public class EntityBulldoser : EntityTractor
{
public Color AdditionalColor { get; set; }
public bool Otval { get; private set; }
public bool SeifBatteries { get; private set; }
public EntityBulldoser(int speed, double weight, Color bodyColor, Color additionalColor, bool otval,
bool seifBatteries) : base(speed, weight, bodyColor)
{
AdditionalColor = additionalColor;
Otval = otval;
SeifBatteries = seifBatteries;
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.Entities
{
public class EntityTractor
{
public int Speed { get; private set; }
public double Weight { get; private set; }
public Color BodyColor { get; set; }
public double Step => (double)Speed * 100 / Weight;
public EntityTractor(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
}
}

View File

@ -1,6 +1,6 @@
namespace Bulldoser
{
partial class Form1
partial class FormBulldoser
{
/// <summary>
/// Required designer variable.
@ -28,12 +28,189 @@
/// </summary>
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";
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBulldoser));
pictureBoxBulldoser = new PictureBox();
buttonCreateBulldoser = new Button();
buttonRight = new Button();
buttonLeft = new Button();
buttonUp = new Button();
buttonDown = new Button();
comboBoxStrategy = new ComboBox();
buttonCreateTractor = new Button();
buttonStep = new Button();
fileSystemWatcher1 = new FileSystemWatcher();
buttonSelectTransport = new Button();
((System.ComponentModel.ISupportInitialize)pictureBoxBulldoser).BeginInit();
((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).BeginInit();
SuspendLayout();
//
// pictureBoxBulldoser
//
pictureBoxBulldoser.Dock = DockStyle.Fill;
pictureBoxBulldoser.Location = new Point(0, 0);
pictureBoxBulldoser.Margin = new Padding(2);
pictureBoxBulldoser.Name = "pictureBoxBulldoser";
pictureBoxBulldoser.Size = new Size(884, 461);
pictureBoxBulldoser.SizeMode = PictureBoxSizeMode.AutoSize;
pictureBoxBulldoser.TabIndex = 0;
pictureBoxBulldoser.TabStop = false;
//
// buttonCreateBulldoser
//
buttonCreateBulldoser.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
buttonCreateBulldoser.Font = new Font("Times New Roman", 11.25F, FontStyle.Regular, GraphicsUnit.Point);
buttonCreateBulldoser.Location = new Point(121, 403);
buttonCreateBulldoser.Margin = new Padding(2);
buttonCreateBulldoser.Name = "buttonCreateBulldoser";
buttonCreateBulldoser.Size = new Size(100, 47);
buttonCreateBulldoser.TabIndex = 1;
buttonCreateBulldoser.Text = "Создать бульдозер";
buttonCreateBulldoser.UseVisualStyleBackColor = true;
buttonCreateBulldoser.Click += buttonCreateBulldozer_Click;
//
// buttonRight
//
buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonRight.BackgroundImage = (Image)resources.GetObject("buttonRight.BackgroundImage");
buttonRight.BackgroundImageLayout = ImageLayout.Zoom;
buttonRight.Location = new Point(826, 425);
buttonRight.Margin = new Padding(2);
buttonRight.Name = "buttonRight";
buttonRight.Size = new Size(27, 25);
buttonRight.TabIndex = 4;
buttonRight.UseVisualStyleBackColor = true;
buttonRight.Click += buttonMove_Click;
//
// buttonLeft
//
buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonLeft.BackgroundImage = (Image)resources.GetObject("buttonLeft.BackgroundImage");
buttonLeft.BackgroundImageLayout = ImageLayout.Zoom;
buttonLeft.Location = new Point(762, 425);
buttonLeft.Margin = new Padding(2);
buttonLeft.Name = "buttonLeft";
buttonLeft.Size = new Size(26, 25);
buttonLeft.TabIndex = 3;
buttonLeft.UseVisualStyleBackColor = true;
buttonLeft.Click += buttonMove_Click;
//
// buttonUp
//
buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonUp.BackgroundImage = (Image)resources.GetObject("buttonUp.BackgroundImage");
buttonUp.BackgroundImageLayout = ImageLayout.Zoom;
buttonUp.Location = new Point(792, 394);
buttonUp.Margin = new Padding(2);
buttonUp.Name = "buttonUp";
buttonUp.Size = new Size(30, 27);
buttonUp.TabIndex = 3;
buttonUp.UseVisualStyleBackColor = true;
buttonUp.Click += buttonMove_Click;
//
// buttonDown
//
buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonDown.BackgroundImage = (Image)resources.GetObject("buttonDown.BackgroundImage");
buttonDown.BackgroundImageLayout = ImageLayout.Zoom;
buttonDown.Location = new Point(792, 425);
buttonDown.Margin = new Padding(2);
buttonDown.Name = "buttonDown";
buttonDown.Size = new Size(30, 25);
buttonDown.TabIndex = 5;
buttonDown.UseVisualStyleBackColor = true;
buttonDown.Click += buttonMove_Click;
//
// comboBoxStrategy
//
comboBoxStrategy.Anchor = AnchorStyles.Top | AnchorStyles.Right;
comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxStrategy.DropDownWidth = 150;
comboBoxStrategy.Font = new Font("Times New Roman", 11.25F, FontStyle.Regular, GraphicsUnit.Point);
comboBoxStrategy.FormattingEnabled = true;
comboBoxStrategy.Items.AddRange(new object[] { "К центру", "В угол" });
comboBoxStrategy.Location = new Point(723, 10);
comboBoxStrategy.Margin = new Padding(2);
comboBoxStrategy.Name = "comboBoxStrategy";
comboBoxStrategy.Size = new Size(150, 25);
comboBoxStrategy.TabIndex = 6;
//
// buttonCreateTractor
//
buttonCreateTractor.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
buttonCreateTractor.Font = new Font("Times New Roman", 11.25F, FontStyle.Regular, GraphicsUnit.Point);
buttonCreateTractor.Location = new Point(11, 403);
buttonCreateTractor.Margin = new Padding(2);
buttonCreateTractor.Name = "buttonCreateTractor";
buttonCreateTractor.Size = new Size(106, 47);
buttonCreateTractor.TabIndex = 7;
buttonCreateTractor.Text = "Создать трактор";
buttonCreateTractor.UseVisualStyleBackColor = true;
buttonCreateTractor.Click += buttonCreateTractor_Click;
//
// buttonStep
//
buttonStep.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonStep.Font = new Font("Times New Roman", 11.25F, FontStyle.Regular, GraphicsUnit.Point);
buttonStep.Location = new Point(785, 39);
buttonStep.Margin = new Padding(2);
buttonStep.Name = "buttonStep";
buttonStep.Size = new Size(88, 34);
buttonStep.TabIndex = 8;
buttonStep.Text = "Шаг";
buttonStep.UseVisualStyleBackColor = true;
buttonStep.Click += buttonStep_Click;
//
// fileSystemWatcher1
//
fileSystemWatcher1.EnableRaisingEvents = true;
fileSystemWatcher1.SynchronizingObject = this;
//
// buttonSelectTransport
//
buttonSelectTransport.Location = new Point(785, 78);
buttonSelectTransport.Name = "buttonSelectTransport";
buttonSelectTransport.Size = new Size(88, 34);
buttonSelectTransport.TabIndex = 9;
buttonSelectTransport.Text = "Выбор";
buttonSelectTransport.UseVisualStyleBackColor = true;
buttonSelectTransport.Click += ButtonSelect_Tractor_Click;
//
// FormBulldoser
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(884, 461);
Controls.Add(buttonSelectTransport);
Controls.Add(buttonStep);
Controls.Add(buttonCreateTractor);
Controls.Add(comboBoxStrategy);
Controls.Add(buttonDown);
Controls.Add(buttonUp);
Controls.Add(buttonLeft);
Controls.Add(buttonRight);
Controls.Add(buttonCreateBulldoser);
Controls.Add(pictureBoxBulldoser);
Name = "FormBulldoser";
StartPosition = FormStartPosition.CenterScreen;
Text = "Создать транспорт";
((System.ComponentModel.ISupportInitialize)pictureBoxBulldoser).EndInit();
((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private PictureBox pictureBoxBulldoser;
private Button buttonCreateBulldoser;
private Button buttonRight;
private Button buttonLeft;
private Button buttonUp;
private Button buttonDown;
private ComboBox comboBoxStrategy;
private Button buttonCreateTractor;
private Button buttonStep;
private FileSystemWatcher fileSystemWatcher1;
private Button buttonSelectTransport;
}
}

View File

@ -1,10 +1,127 @@
using Bulldoser.Drawings;
using Bulldoser.MovementStrategy;
namespace Bulldoser
{
public partial class Form1 : Form
public partial class FormBulldoser : Form
{
public Form1()
private DrawingTractor? _drawingTractor;
private AbstractStrategy? _abstractStrategy;
public DrawingTractor? SelectedTractor { get; private set; }
public FormBulldoser()
{
InitializeComponent();
_abstractStrategy = null;
SelectedTractor = null;
}
private void Draw()
{
if (_drawingTractor == null)
{
return;
}
Bitmap bmp = new(pictureBoxBulldoser.Width, pictureBoxBulldoser.Height);
Graphics gr = Graphics.FromImage(bmp);
_drawingTractor.DrawTransport(gr);
pictureBoxBulldoser.Image = bmp;
}
private void buttonCreateBulldozer_Click(object sender, EventArgs e)
{
Random random = new Random();
Color color = Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256));
ColorDialog colorDialog = new ColorDialog();
if (colorDialog.ShowDialog() == DialogResult.OK)
{
color = colorDialog.Color;
}
Color dopColor = Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256));
if (colorDialog.ShowDialog() == DialogResult.OK)
{
dopColor = colorDialog.Color;
}
_drawingTractor = new DrawingBulldoser(random.Next(100, 300), random.Next(1000, 3000), color, dopColor,
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)),
pictureBoxBulldoser.Width, pictureBoxBulldoser.Height);
_drawingTractor.SetPosition(random.Next(10, 100), random.Next(10, 100));
Draw();
}
private void buttonCreateTractor_Click(object sender, EventArgs e)
{
Random rnd = new Random();
Color color = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256));
ColorDialog colorDialog = new ColorDialog();
if (colorDialog.ShowDialog() == DialogResult.OK)
{
color = colorDialog.Color;
}
_drawingTractor = new DrawingTractor(rnd.Next(100, 300), rnd.Next(1000, 3000), color,
pictureBoxBulldoser.Width, pictureBoxBulldoser.Height);
_drawingTractor.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100));
Draw();
}
private void buttonMove_Click(object sender, EventArgs e)
{
if (_drawingTractor == null)
{
return;
}
string name = ((Button)sender)?.Name ?? string.Empty;
switch (name)
{
case "buttonUp":
_drawingTractor.MoveTransport(Direction.Up);
break;
case "buttonDown":
_drawingTractor.MoveTransport(Direction.Down);
break;
case "buttonLeft":
_drawingTractor.MoveTransport(Direction.Left);
break;
case "buttonRight":
_drawingTractor.MoveTransport(Direction.Right);
break;
}
Draw();
}
private void buttonStep_Click(object sender, EventArgs e)
{
if (_drawingTractor == null)
{
return;
}
if (comboBoxStrategy.Enabled)
{
_abstractStrategy = comboBoxStrategy.SelectedIndex switch
{
0 => new MoveToCenter(),
1 => new MoveToRightCorner(),
_ => null,
};
if (_abstractStrategy == null)
{
return;
}
_abstractStrategy.SetData(_drawingTractor.GetMoveableObject, pictureBoxBulldoser.Width,
pictureBoxBulldoser.Height);
}
if (_abstractStrategy == null)
{
return;
}
comboBoxStrategy.Enabled = false;
_abstractStrategy.MakeStep();
Draw();
if (_abstractStrategy.GetStatus() == Status.Finish)
{
comboBoxStrategy.Enabled = true;
_abstractStrategy = null;
}
}
private void ButtonSelect_Tractor_Click(object sender, EventArgs e)
{
SelectedTractor = _drawingTractor;
DialogResult = DialogResult.OK;
}
}
}

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@ -117,4 +117,296 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonRight.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAgMAAAHpCAYAAAAf7D8uAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAADj9JREFUeF7t1ltuY1cSRUHD8x9yodxguwm7WikVRfK+zooA9k8OILH++AsAyPr5
8+cPMQAAYWIAAOLEAADEiQEAiBMDABAnBgAgTgwAQJwYAIA4MQAAcWIAAOLEAADEiQEAiBMDABAnBgAg
TgwAQJwYAIA4MQAAcWIAAOLEAADEiQEAiBMDABAnBgAgTgwAQJwYAIA4MQAAcWIAAOLEAADEiQEAiBMD
ABAnBgAgTgwAQJwYAIA4MQAAcWIAAOLEAADEiQEAiBMDABAnBgAgTgwAQJwYAIA4MQAAcWIAAOLEAADE
iQEAiBMDABAnBgAgTgwAQJwYAIA4MQAAcWIAAOLEAADEiQEAiBMDABAnBgAgTgwAQJwYAIA4MQ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MAECcGACAODEAAHFiAADixAAAxIkBAIgTAwAQJwYAIE4MAECcGACAODEAAHFi
AADixAAAxIkBAIgTAwAQJwYAIE4MAECcGACAODEAAHFiAADixAAAxIkBAIgTAwAQJwYAIE4MAECcGACA
ODEAAHFiAADixAAAxIkBAIgTAwAQJwYAIE4MAECcGACAODEAAHFiAADixAAAxIkBAIgTAwAQ9/Pnzx//
AbKnmE6OL2IbAAAAAElFTkSuQmCC
</value>
</data>
<data name="buttonLeft.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAgMAAAHpCAYAAAAf7D8uAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAADxxJREFUeF7t2uFS28gWhdFkivd/30AyuRaDbkyOMcaWWt2916ralQT+gTFfHeXb
vye/AYBIpwz4ucTAr7d/AwBhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQ
TgwAQDgxAADhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADh
xAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMDABBO
DABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMDABBODABAODEAAOHE
AACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4M
AEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQA
AIQTAwAQTgwAQDgxAADhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwA
QDgxAADhxAAAhBMDABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA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AODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMD
ABBODABAODEAAOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQTgwAQDgxAADhxAAAhBMDABBODABAODEA
AOHEAACEEwMAEE4MAEA4MQAA4cQAAIQTAwAQbo2B5+UvZmZmlrh/f/wPXQx2whxr2+UAAAAASUVORK5C
YII=
</value>
</data>
<data name="buttonUp.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAekAAAIDCAYAAAAg+ebuAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAD+lJREFUeF7t1QuSI0cOREHd/9JaaWUazSd6uklWsVABd7N3gkQCf/wJAIzkSAPA
UI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzl
SAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40
AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPA
UI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzl
SAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40AAzlSAPAUI40
AAzlSEORP/7441vA/fnJUOL7A+1QQwe/GEqkI/13wH35wVAgHed/A+7LD4abS4f554B78nvhxtJB/ijg
fvxcuLF0jD8KuB8/F24qHeLPAu7Fr4UbSgf4qwH34cfCDaXj+9WA+/Bj4WbS4X004B78VriRdHCfDZjP
T4UbScf22YD5/FS4iXRoXw2YzS+FG0gH9qiAufxQuIF0XI8KmMsPheHSYT06YCa/EwZLB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GTQwyVRJy1o7gwYmmSppWWtn0MAkUyUta+0MGphkqqRlrZ1B
A5NMlbSstTNoYJKpkpa1dgYNTDJV0rLWzqCBSaZKWtbaGTQwyVRJy1o7gwYmmTppYWtX0MI0A8BQjjQA
DOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQ
jjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVI
A8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQA
DOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQ
jjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVIA8BQjjQADOVI
A8BIf/75P6f0psd4DXc2AAAAAElFTkSuQmCC
</value>
</data>
<data name="buttonDown.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAekAAAIDCAYAAAAg+ebuAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAEHBJREFUeF7t2dlylMcWhFHb4fd/XwJjDtjexwMSqNX/kJW1VkQS3Gv4tKt/+gwA
xPn9999/E2kACCTSABBKpAEglEgDQCiRBoBQIg0AoUQaAEKJNACEEmkACCXSABBKpAEglEgDQCiRBoBQ
Ig0AoUQaAEKJNACEEmkACCXSABBKpAEglEgDQCiRBoBQIg0AoUQaAEKJNACEEmkACCXSABBKpAEglEgD
QCiRBoBQIg0AoUQaAEKJNACEEmkACCXSABBKpAEglEgDQCiRBoBQIg0AoUQaAEKJNACEEmkACCXSABBK
pAEglEgDQCiRBoBQIg0AoUQaAEKJNACEEmkACCX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TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

191
Bulldoser/Bulldoser/Form2.Designer.cs generated Normal file
View File

@ -0,0 +1,191 @@
namespace Bulldoser
{
partial class FormTractorCollection
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
pictureBoxCollections = new PictureBox();
groupBoxTools = new GroupBox();
groupBox1 = new GroupBox();
listBoxStorage = new ListBox();
DelNabor = new Button();
AddNabor = new Button();
InputNabor = new MaskedTextBox();
maskedTextBoxNumbers = new MaskedTextBox();
buttonUpdateCollection = new Button();
buttonRemoveTransport = new Button();
buttonAddTransport = new Button();
((System.ComponentModel.ISupportInitialize)pictureBoxCollections).BeginInit();
groupBoxTools.SuspendLayout();
groupBox1.SuspendLayout();
SuspendLayout();
//
// pictureBoxCollections
//
pictureBoxCollections.Location = new Point(12, 6);
pictureBoxCollections.Name = "pictureBoxCollections";
pictureBoxCollections.Size = new Size(570, 432);
pictureBoxCollections.TabIndex = 1;
pictureBoxCollections.TabStop = false;
//
// groupBoxTools
//
groupBoxTools.Controls.Add(groupBox1);
groupBoxTools.Controls.Add(maskedTextBoxNumbers);
groupBoxTools.Controls.Add(buttonUpdateCollection);
groupBoxTools.Controls.Add(buttonRemoveTransport);
groupBoxTools.Controls.Add(buttonAddTransport);
groupBoxTools.Location = new Point(588, 6);
groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Size = new Size(200, 432);
groupBoxTools.TabIndex = 2;
groupBoxTools.TabStop = false;
groupBoxTools.Text = "Инструменты";
//
// groupBox1
//
groupBox1.Controls.Add(listBoxStorage);
groupBox1.Controls.Add(DelNabor);
groupBox1.Controls.Add(AddNabor);
groupBox1.Controls.Add(InputNabor);
groupBox1.Location = new Point(6, 22);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(188, 223);
groupBox1.TabIndex = 6;
groupBox1.TabStop = false;
groupBox1.Text = "Наборы";
//
// listBoxStorage
//
listBoxStorage.FormattingEnabled = true;
listBoxStorage.ItemHeight = 15;
listBoxStorage.Location = new Point(6, 85);
listBoxStorage.Name = "listBoxStorage";
listBoxStorage.Size = new Size(176, 94);
listBoxStorage.TabIndex = 10;
listBoxStorage.SelectedIndexChanged += listBoxStorage_SelectedIndexChanged;
//
// DelNabor
//
DelNabor.Location = new Point(6, 187);
DelNabor.Name = "DelNabor";
DelNabor.Size = new Size(176, 30);
DelNabor.TabIndex = 9;
DelNabor.Text = "Удалить набор";
DelNabor.UseVisualStyleBackColor = true;
DelNabor.Click += ButtonRemoveObject_Click;
//
// AddNabor
//
AddNabor.Location = new Point(6, 49);
AddNabor.Name = "AddNabor";
AddNabor.Size = new Size(176, 30);
AddNabor.TabIndex = 8;
AddNabor.Text = "Добавить набор";
AddNabor.UseVisualStyleBackColor = true;
AddNabor.Click += ButtonAddObject_Click;
//
// InputNabor
//
InputNabor.Location = new Point(6, 21);
InputNabor.Margin = new Padding(3, 2, 3, 2);
InputNabor.Mask = "0";
InputNabor.Name = "InputNabor";
InputNabor.Size = new Size(176, 23);
InputNabor.TabIndex = 7;
//
// maskedTextBoxNumbers
//
maskedTextBoxNumbers.Location = new Point(6, 312);
maskedTextBoxNumbers.Margin = new Padding(3, 2, 3, 2);
maskedTextBoxNumbers.Mask = "0";
maskedTextBoxNumbers.Name = "maskedTextBoxNumbers";
maskedTextBoxNumbers.Size = new Size(188, 23);
maskedTextBoxNumbers.TabIndex = 5;
//
// buttonUpdateCollection
//
buttonUpdateCollection.Location = new Point(6, 386);
buttonUpdateCollection.Name = "buttonUpdateCollection";
buttonUpdateCollection.Size = new Size(188, 40);
buttonUpdateCollection.TabIndex = 3;
buttonUpdateCollection.Text = "Обновление коллекции";
buttonUpdateCollection.UseVisualStyleBackColor = true;
buttonUpdateCollection.Click += ButtonRefreshCollection_Click;
//
// buttonRemoveTransport
//
buttonRemoveTransport.Location = new Point(6, 340);
buttonRemoveTransport.Name = "buttonRemoveTransport";
buttonRemoveTransport.Size = new Size(188, 40);
buttonRemoveTransport.TabIndex = 2;
buttonRemoveTransport.Text = "Удалить транспорт";
buttonRemoveTransport.UseVisualStyleBackColor = true;
buttonRemoveTransport.Click += ButtonRemoveTractor_Click;
//
// buttonAddTransport
//
buttonAddTransport.Location = new Point(6, 260);
buttonAddTransport.Name = "buttonAddTransport";
buttonAddTransport.Size = new Size(188, 47);
buttonAddTransport.TabIndex = 0;
buttonAddTransport.Text = "Добавить транспорт";
buttonAddTransport.UseVisualStyleBackColor = true;
buttonAddTransport.Click += ButtonAddTractor_Click;
//
// FormTractorCollection
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(groupBoxTools);
Controls.Add(pictureBoxCollections);
Name = "FormTractorCollection";
Text = "Набор автомобилей";
((System.ComponentModel.ISupportInitialize)pictureBoxCollections).EndInit();
groupBoxTools.ResumeLayout(false);
groupBoxTools.PerformLayout();
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
ResumeLayout(false);
}
#endregion
private PictureBox pictureBoxCollections;
private GroupBox groupBoxTools;
private Button buttonUpdateCollection;
private Button buttonRemoveTransport;
private Button buttonAddTransport;
private MaskedTextBox maskedTextBoxNumbers;
private GroupBox groupBox1;
private ListBox listBoxStorage;
private Button DelNabor;
private Button AddNabor;
private MaskedTextBox InputNabor;
}
}

View File

@ -0,0 +1,135 @@
using Bulldoser.Drawings;
using Bulldoser.Generic;
using Bulldoser.MovementStrategy;
using Bulldozer.Generics;
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 Bulldoser
{
public partial class FormTractorCollection : Form
{
private readonly TractorGenericStorage _storage;
public FormTractorCollection()
{
InitializeComponent();
_storage = new TractorGenericStorage(pictureBoxCollections.Width, pictureBoxCollections.Height);
}
private void ReloadObjects()
{
int index = listBoxStorage.SelectedIndex;
listBoxStorage.Items.Clear();
for (int i = 0; i < _storage.Keys.Count; i++)
{
listBoxStorage.Items.Add(_storage.Keys[i]);
}
if (listBoxStorage.Items.Count > 0 && (index == -1 || index >= listBoxStorage.Items.Count))
{
listBoxStorage.SelectedIndex = 0;
}
else if (listBoxStorage.Items.Count > 0 && index > -1 && index < listBoxStorage.Items.Count)
{
listBoxStorage.SelectedIndex = index;
}
}
private void ButtonAddObject_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(InputNabor.Text))
{
MessageBox.Show("Не всё заполнено", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_storage.AddSet(InputNabor.Text);
ReloadObjects();
}
private void listBoxStorage_SelectedIndexChanged(object sender, EventArgs e)
{
pictureBoxCollections.Image = _storage[listBoxStorage.SelectedItem?.ToString() ?? string.Empty]?.ShowTractors();
}
private void ButtonRemoveObject_Click(object sender, EventArgs e)
{
if (listBoxStorage.SelectedIndex == -1)
{
return;
}
if (MessageBox.Show($"Удалить объект {listBoxStorage.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo,
MessageBoxIcon.Question) == DialogResult.Yes)
{
_storage.DelSet(listBoxStorage.SelectedItem.ToString() ?? string.Empty);
ReloadObjects();
}
}
private void ButtonAddTractor_Click(object sender, EventArgs e)
{
if (listBoxStorage.SelectedIndex == -1)
{
return;
}
var formBulldozerConfig = new FormBulldoserConfig();
formBulldozerConfig.AddEvent(usta =>
{
if (listBoxStorage.SelectedIndex != -1)
{
var obj = _storage[listBoxStorage.SelectedItem?.ToString() ?? string.Empty];
if (obj != null)
{
if (obj + usta != 1)
{
MessageBox.Show("Объект добавлен");
pictureBoxCollections.Image = obj.ShowTractors();
}
else
{
MessageBox.Show("Не удалось добавить объект");
}
}
}
});
formBulldozerConfig.Show();
}
private void ButtonRemoveTractor_Click(object sender, EventArgs e)
{
if (listBoxStorage.SelectedIndex == -1) return;
var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty];
if (obj == null)
{
return;
}
if (MessageBox.Show("Удалить объект?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
int pos = Convert.ToInt32(maskedTextBoxNumbers.Text);
if (obj - pos != null)
{
MessageBox.Show("Объект удален");
pictureBoxCollections.Image = obj.ShowTractors();
}
else
{
MessageBox.Show("Не удалось удалить объект");
}
}
private void ButtonRefreshCollection_Click(object sender, EventArgs e)
{
if (listBoxStorage.SelectedIndex == -1) return;
var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty];
if (obj == null)
{
return;
}
pictureBoxCollections.Image = obj.ShowTractors();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,362 @@
namespace Bulldoser
{
partial class FormBulldoserConfig
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
groupBox1 = new GroupBox();
labelModifiedObject = new Label();
labelSimpleObject = new Label();
groupBox2 = new GroupBox();
panelPurple = new Panel();
panelYellow = new Panel();
panelBlack = new Panel();
panelBlue = new Panel();
panelGray = new Panel();
panelGreen = new Panel();
panelWhite = new Panel();
panelRed = new Panel();
checkBoxSeifBatteries = new CheckBox();
checkBoxOtval = new CheckBox();
numericUpDownWeight = new NumericUpDown();
numericUpDownSpeed = new NumericUpDown();
label2 = new Label();
label1 = new Label();
panelColor = new Panel();
labelDopColor = new Label();
labelBaseColor = new Label();
pictureBoxObject = new PictureBox();
ButtonOk = new Button();
buttonCancel = new Button();
groupBox1.SuspendLayout();
groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericUpDownWeight).BeginInit();
((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).BeginInit();
panelColor.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxObject).BeginInit();
SuspendLayout();
//
// groupBox1
//
groupBox1.Controls.Add(labelModifiedObject);
groupBox1.Controls.Add(labelSimpleObject);
groupBox1.Controls.Add(groupBox2);
groupBox1.Controls.Add(checkBoxSeifBatteries);
groupBox1.Controls.Add(checkBoxOtval);
groupBox1.Controls.Add(numericUpDownWeight);
groupBox1.Controls.Add(numericUpDownSpeed);
groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(label1);
groupBox1.Location = new Point(12, 12);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(454, 228);
groupBox1.TabIndex = 1;
groupBox1.TabStop = false;
groupBox1.Text = "Параметры";
//
// labelModifiedObject
//
labelModifiedObject.BorderStyle = BorderStyle.FixedSingle;
labelModifiedObject.Location = new Point(345, 146);
labelModifiedObject.Name = "labelModifiedObject";
labelModifiedObject.Size = new Size(87, 27);
labelModifiedObject.TabIndex = 8;
labelModifiedObject.Text = "Продвинутый";
labelModifiedObject.TextAlign = ContentAlignment.MiddleCenter;
labelModifiedObject.MouseDown += LabelObject_MouseDown;
//
// labelSimpleObject
//
labelSimpleObject.BorderStyle = BorderStyle.FixedSingle;
labelSimpleObject.Location = new Point(247, 146);
labelSimpleObject.Name = "labelSimpleObject";
labelSimpleObject.Size = new Size(87, 27);
labelSimpleObject.TabIndex = 7;
labelSimpleObject.Text = "Простой";
labelSimpleObject.TextAlign = ContentAlignment.MiddleCenter;
labelSimpleObject.MouseDown += LabelObject_MouseDown;
//
// groupBox2
//
groupBox2.Controls.Add(panelPurple);
groupBox2.Controls.Add(panelYellow);
groupBox2.Controls.Add(panelBlack);
groupBox2.Controls.Add(panelBlue);
groupBox2.Controls.Add(panelGray);
groupBox2.Controls.Add(panelGreen);
groupBox2.Controls.Add(panelWhite);
groupBox2.Controls.Add(panelRed);
groupBox2.Location = new Point(247, 31);
groupBox2.Name = "groupBox2";
groupBox2.Size = new Size(185, 106);
groupBox2.TabIndex = 6;
groupBox2.TabStop = false;
groupBox2.Text = "Цвета";
//
// panelPurple
//
panelPurple.BackColor = Color.Purple;
panelPurple.Location = new Point(139, 63);
panelPurple.Name = "panelPurple";
panelPurple.Size = new Size(35, 30);
panelPurple.TabIndex = 7;
panelPurple.MouseDown += panelColor_MouseDown;
//
// panelYellow
//
panelYellow.BackColor = Color.Yellow;
panelYellow.Location = new Point(139, 22);
panelYellow.Name = "panelYellow";
panelYellow.Size = new Size(35, 30);
panelYellow.TabIndex = 3;
panelYellow.MouseDown += panelColor_MouseDown;
//
// panelBlack
//
panelBlack.BackColor = Color.Black;
panelBlack.Location = new Point(98, 63);
panelBlack.Name = "panelBlack";
panelBlack.Size = new Size(35, 30);
panelBlack.TabIndex = 6;
panelBlack.MouseDown += panelColor_MouseDown;
//
// panelBlue
//
panelBlue.BackColor = Color.Blue;
panelBlue.Location = new Point(98, 22);
panelBlue.Name = "panelBlue";
panelBlue.Size = new Size(35, 30);
panelBlue.TabIndex = 2;
panelBlue.MouseDown += panelColor_MouseDown;
//
// panelGray
//
panelGray.BackColor = Color.Gray;
panelGray.Location = new Point(57, 63);
panelGray.Name = "panelGray";
panelGray.Size = new Size(35, 30);
panelGray.TabIndex = 5;
panelGray.MouseDown += panelColor_MouseDown;
//
// panelGreen
//
panelGreen.BackColor = Color.Green;
panelGreen.Location = new Point(57, 22);
panelGreen.Name = "panelGreen";
panelGreen.Size = new Size(35, 30);
panelGreen.TabIndex = 1;
panelGreen.MouseDown += panelColor_MouseDown;
//
// panelWhite
//
panelWhite.BackColor = Color.White;
panelWhite.Location = new Point(16, 63);
panelWhite.Name = "panelWhite";
panelWhite.Size = new Size(35, 30);
panelWhite.TabIndex = 4;
panelWhite.MouseDown += panelColor_MouseDown;
//
// panelRed
//
panelRed.BackColor = Color.Red;
panelRed.Location = new Point(16, 22);
panelRed.Name = "panelRed";
panelRed.Size = new Size(35, 30);
panelRed.TabIndex = 0;
panelRed.MouseDown += panelColor_MouseDown;
//
// checkBoxSeifBatteries
//
checkBoxSeifBatteries.AutoSize = true;
checkBoxSeifBatteries.Location = new Point(10, 154);
checkBoxSeifBatteries.Name = "checkBoxSeifBatteries";
checkBoxSeifBatteries.Size = new Size(208, 19);
checkBoxSeifBatteries.TabIndex = 5;
checkBoxSeifBatteries.Text = "Признак наличия заднего отвала";
checkBoxSeifBatteries.UseVisualStyleBackColor = true;
//
// checkBoxOtval
//
checkBoxOtval.AutoSize = true;
checkBoxOtval.Location = new Point(10, 119);
checkBoxOtval.Name = "checkBoxOtval";
checkBoxOtval.Size = new Size(163, 19);
checkBoxOtval.TabIndex = 4;
checkBoxOtval.Text = "Признак наличия отвала";
checkBoxOtval.UseVisualStyleBackColor = true;
//
// numericUpDownWeight
//
numericUpDownWeight.Location = new Point(76, 60);
numericUpDownWeight.Name = "numericUpDownWeight";
numericUpDownWeight.Size = new Size(73, 23);
numericUpDownWeight.TabIndex = 3;
numericUpDownWeight.Value = new decimal(new int[] { 100, 0, 0, 0 });
//
// numericUpDownSpeed
//
numericUpDownSpeed.Location = new Point(76, 31);
numericUpDownSpeed.Name = "numericUpDownSpeed";
numericUpDownSpeed.Size = new Size(73, 23);
numericUpDownSpeed.TabIndex = 2;
numericUpDownSpeed.Value = new decimal(new int[] { 100, 0, 0, 0 });
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(10, 62);
label2.Name = "label2";
label2.Size = new Size(29, 15);
label2.TabIndex = 1;
label2.Text = "Вес:";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(10, 33);
label1.Name = "label1";
label1.Size = new Size(62, 15);
label1.TabIndex = 0;
label1.Text = "Скорость:";
//
// panelColor
//
panelColor.AllowDrop = true;
panelColor.Controls.Add(labelDopColor);
panelColor.Controls.Add(labelBaseColor);
panelColor.Controls.Add(pictureBoxObject);
panelColor.Location = new Point(492, 12);
panelColor.Name = "panelColor";
panelColor.Size = new Size(276, 184);
panelColor.TabIndex = 2;
panelColor.DragDrop += PanelObject_DragDrop;
panelColor.DragEnter += PanelObject_DragEnter;
//
// labelDopColor
//
labelDopColor.AllowDrop = true;
labelDopColor.BorderStyle = BorderStyle.FixedSingle;
labelDopColor.Location = new Point(164, 10);
labelDopColor.Name = "labelDopColor";
labelDopColor.Size = new Size(100, 29);
labelDopColor.TabIndex = 2;
labelDopColor.Text = "Доп. цвет";
labelDopColor.TextAlign = ContentAlignment.MiddleCenter;
labelDopColor.DragDrop += LabelDopColor_DragDrop;
labelDopColor.DragEnter += LabelColor_DragEnter;
labelDopColor.MouseDown += LabelObject_MouseDown;
//
// labelBaseColor
//
labelBaseColor.AllowDrop = true;
labelBaseColor.BorderStyle = BorderStyle.FixedSingle;
labelBaseColor.Location = new Point(12, 10);
labelBaseColor.Name = "labelBaseColor";
labelBaseColor.Size = new Size(100, 29);
labelBaseColor.TabIndex = 2;
labelBaseColor.Text = "Цвет";
labelBaseColor.TextAlign = ContentAlignment.MiddleCenter;
labelBaseColor.DragDrop += LabelBaseColor_DragDrop;
labelBaseColor.DragEnter += LabelColor_DragEnter;
labelBaseColor.MouseDown += LabelObject_MouseDown;
//
// pictureBoxObject
//
pictureBoxObject.Location = new Point(12, 46);
pictureBoxObject.Name = "pictureBoxObject";
pictureBoxObject.Size = new Size(252, 127);
pictureBoxObject.TabIndex = 0;
pictureBoxObject.TabStop = false;
//
// ButtonOk
//
ButtonOk.Location = new Point(492, 202);
ButtonOk.Name = "ButtonOk";
ButtonOk.Size = new Size(100, 32);
ButtonOk.TabIndex = 3;
ButtonOk.Text = "Добавить";
ButtonOk.UseVisualStyleBackColor = true;
ButtonOk.Click += ButtonOk_Click;
//
// buttonCancel
//
buttonCancel.Location = new Point(668, 202);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(100, 32);
buttonCancel.TabIndex = 4;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
//
// FormBulldoserConfig
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 247);
Controls.Add(buttonCancel);
Controls.Add(ButtonOk);
Controls.Add(panelColor);
Controls.Add(groupBox1);
Name = "FormBulldoserConfig";
Text = "FormBulldoserConfig";
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)numericUpDownWeight).EndInit();
((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).EndInit();
panelColor.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)pictureBoxObject).EndInit();
ResumeLayout(false);
}
#endregion
private GroupBox groupBox1;
private Label labelModifiedObject;
private Label labelSimpleObject;
private GroupBox groupBox2;
private Panel panelPurple;
private Panel panelYellow;
private Panel panelBlack;
private Panel panelBlue;
private Panel panelGray;
private Panel panelGreen;
private Panel panelWhite;
private Panel panelRed;
private CheckBox checkBoxSeifBatteries;
private CheckBox checkBoxOtval;
private NumericUpDown numericUpDownWeight;
private NumericUpDown numericUpDownSpeed;
private Label label2;
private Label label1;
private Panel panelColor;
private Label labelDopColor;
private Label labelBaseColor;
private PictureBox pictureBoxObject;
private Button ButtonOk;
private Button buttonCancel;
}
}

View File

@ -0,0 +1,144 @@
using Bulldoser.Drawings;
using Bulldoser.Entities;
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 Bulldoser
{
public partial class FormBulldoserConfig : Form
{
/// <summary>
/// Переменная-выбранная установка
/// </summary>
DrawingTractor? _bulldozer = null;
/// <summary>
/// Событие
/// </summary>
private event Action<DrawingTractor> EventAddBulldozer;
/// <summary>
/// Конструктор
/// </summary>
public FormBulldoserConfig()
{
InitializeComponent();
panelBlack.MouseDown += panelColor_MouseDown;
panelPurple.MouseDown += panelColor_MouseDown;
panelGray.MouseDown += panelColor_MouseDown;
panelGreen.MouseDown += panelColor_MouseDown;
panelRed.MouseDown += panelColor_MouseDown;
panelWhite.MouseDown += panelColor_MouseDown;
panelYellow.MouseDown += panelColor_MouseDown;
panelBlue.MouseDown += panelColor_MouseDown;
// TODO buttonCancel.Click with lambda
buttonCancel.Click += (sender, e) => Close();
}
private void DrawBulldozer()
{
Bitmap bmp = new(pictureBoxObject.Width, pictureBoxObject.Height);
Graphics gr = Graphics.FromImage(bmp);
_bulldozer?.SetPosition(5, 5);
_bulldozer?.DrawTransport(gr);
pictureBoxObject.Image = bmp;
}
public void AddEvent(Action<DrawingTractor> ev)
{
if (EventAddBulldozer == null)
{
EventAddBulldozer = new Action<DrawingTractor>(ev);
}
else
{
EventAddBulldozer += ev;
}
}
private void LabelObject_MouseDown(object sender, MouseEventArgs e)
{
(sender as Label)?.DoDragDrop((sender as Label)?.Name, DragDropEffects.Move | DragDropEffects.Copy);
}
private void PanelObject_DragEnter(object sender, DragEventArgs e)
{
if (e.Data?.GetDataPresent(DataFormats.Text) ?? false)
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void panelColor_MouseDown(object sender, MouseEventArgs e)
{
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor, DragDropEffects.Move | DragDropEffects.Copy);
}
private void PanelObject_DragDrop(object sender, DragEventArgs e)
{
switch (e.Data?.GetData(DataFormats.Text).ToString())
{
case "labelModifiedObject":
_bulldozer = new DrawingBulldoser((int)numericUpDownSpeed.Value, (double)numericUpDownWeight.Value, Color.White, Color.Black, checkBoxSeifBatteries.Checked,
checkBoxOtval.Checked, pictureBoxObject.Width, pictureBoxObject.Height);
break;
case "labelSimpleObject":
_bulldozer = new DrawingTractor((int)numericUpDownSpeed.Value, (double)numericUpDownWeight.Value, Color.White, pictureBoxObject.Width,
pictureBoxObject.Height);
break;
}
DrawBulldozer();
}
private void LabelBaseColor_DragDrop(object sender, DragEventArgs e)
{
if (_bulldozer != null)
{
if (e.Data.GetDataPresent(typeof(Color)))
{
_bulldozer.EntityTractor.BodyColor = (Color)e.Data.GetData(typeof(Color));
}
DrawBulldozer();
}
}
private void LabelColor_DragEnter(object sender, DragEventArgs e)
{
if (_bulldozer != null && _bulldozer.EntityTractor is EntityBulldoser entitybulldoser)
{
labelDopColor.AllowDrop = true;
}
else
labelDopColor.AllowDrop = false;
if (e.Data.GetDataPresent(typeof(Color)))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void LabelDopColor_DragDrop(object sender, DragEventArgs e)
{
if (_bulldozer != null && _bulldozer.EntityTractor is EntityBulldoser entitybulldoser)
{
if (e.Data.GetDataPresent(typeof(Color)))
{
entitybulldoser.AdditionalColor = (Color)e.Data.GetData(typeof(Color));
}
DrawBulldozer();
}
}
private void ButtonOk_Click(object sender, EventArgs e)
{
EventAddBulldozer?.Invoke(_bulldozer);
Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,95 @@
using Bulldoser.Drawings;
using Bulldoser.MovementStrategy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.Generic
{
public class TractorGenericCollection<T, U> where T : DrawingTractor where U : IMoveableObject
{
//ширина /высота окна
private readonly int _pictureWidth;
private readonly int _pictureHeight;
//ширина /высота занимаемого места
private readonly int _placeSizeWidth = 170;
private readonly int _placeSizeHeight = 130;
/// Набор объектов
private readonly SetGeneric<T> _collection;
public TractorGenericCollection(int picWidth, int picHeight)
{
// высчитываем размер массива для setgeneric
int width = picWidth / _placeSizeWidth;
int height = picHeight / _placeSizeHeight;
_pictureWidth = picWidth;
_pictureHeight = picHeight;
_collection = new SetGeneric<T>(width * height);
}
/// Перегрузка оператора сложения
public static int operator +(TractorGenericCollection<T, U> collect, T tract)
{
if (tract == null)
{
return -1;
}
return collect._collection.Insert(tract);
}
public static T? operator -(TractorGenericCollection<T, U> collect, int
pos)
{
T obj = collect._collection[pos];
if (obj != null)
{
return collect._collection.Remove(pos);
}
return obj;
}
// получение объекта imoveableObj
public U? GetU(int pos)
{
return (U?)_collection[pos]?.GetMoveableObject;
}
/// Вывод всего набора объектов
public Bitmap ShowTractors()
{
Bitmap bmp = new(_pictureWidth, _pictureHeight);
Graphics gr = Graphics.FromImage(bmp);
DrawBackground(gr);
DrawObjects(gr);
return bmp;
}
private void DrawBackground(Graphics g)
{
Pen pen = new(Color.Black, 3);
for (int i = 0; i < _pictureWidth / _placeSizeWidth; i++)
{
for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j)
{
//линия рамзетки места
g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 3, j * _placeSizeHeight);
}
g.DrawLine(pen, i * _placeSizeWidth, 0, i * _placeSizeWidth, _pictureHeight / _placeSizeHeight * _placeSizeHeight);
}
}
private void DrawObjects(Graphics g)
{
int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight;
for (int i = 0; i < _collection.Count; i++)
{
// Получение объекта
var obj = _collection[i];
// Установка позиции
obj?.SetPosition(
(int)((width - 1) * _placeSizeWidth - (i % width * _placeSizeWidth)),
(int)((height - 1) * _placeSizeHeight - (i / width * _placeSizeHeight))
);
// Прорисовка объекта
obj?.DrawTransport(g);
}
}
}
}

View File

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.Generic
{
internal class SetGeneric<T> where T : class
{
private readonly List<T?> _places;
public int Count => _places.Count;
private readonly int _maxCount;
public SetGeneric(int count)
{
_places = new List<T?>(count);
_maxCount = count;
}
public int Insert(T tract)
{
return Insert(tract, 0);
}
public int Insert(T tract, int position)
{
if (position < 0 || position >= _maxCount) return -1;
_places.Insert(position, tract);
return position;
}
public T? Remove(int position)
{
if (position >= Count || position < 0)
return null;
T? tmp = _places[position];
_places[position] = null;
return tmp;
}
//Получение объекта из набора по позиции
public T? this[int position]
{
get
{
if (position < 0 || position >= Count) return null;
return _places[position];
}
set
{
if (position < 0 || position >= Count || Count == _maxCount) return;
_places.Insert(position, value);
}
}
public IEnumerable<T?> GetTractors(int? maxTracts = null)
{
for (int i = 0; i < _places.Count; ++i)
{
yield return _places[i];
if (maxTracts.HasValue && i == maxTracts.Value)
{
yield break;
}
}
}
}
}

View File

@ -0,0 +1,47 @@

using Bulldoser.Drawings;
using Bulldoser.Generic;
using Bulldoser.MovementStrategy;
namespace Bulldozer.Generics
{
internal class TractorGenericStorage
{
readonly Dictionary<string, TractorGenericCollection<DrawingTractor, DrawingObjectTractor>> _TractorsStorage;
public List<string> Keys => _TractorsStorage.Keys.ToList();
private readonly int _pictureWidth;
private readonly int _pictureHeight;
public TractorGenericStorage(int pictureWidth, int pictureHeight)
{
_TractorsStorage = new Dictionary<string, TractorGenericCollection<DrawingTractor, DrawingObjectTractor>>();
_pictureWidth = pictureWidth;
_pictureHeight = pictureHeight;
}
public void AddSet(string name)
{
if (!_TractorsStorage.ContainsKey(name))
{
_TractorsStorage.Add(name, new TractorGenericCollection<DrawingTractor, DrawingObjectTractor>(_pictureWidth, _pictureHeight));
}
}
public void DelSet(string name)
{
if (_TractorsStorage.ContainsKey(name))
{
_TractorsStorage.Remove(name);
}
}
public TractorGenericCollection<DrawingTractor, DrawingObjectTractor>?
this[string ind]
{
get
{
if (_TractorsStorage.ContainsKey(ind))
{
return _TractorsStorage[ind];
}
return null;
}
}
}
}

View File

@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public abstract class AbstractStrategy
{
/// <summary>
/// Перемещаемый объект
/// </summary>
private IMoveableObject? _moveableObject;
/// <summary>
/// Статус перемещения
/// </summary>
private Status _state = Status.NotInit;
/// <summary>
/// Ширина поля
/// </summary>
protected int FieldWidth { get; private set; }
/// <summary>
/// Высота поля
/// </summary>
protected int FieldHeight { get; private set; }
/// <summary>
/// Статус перемещения
/// </summary>
public Status GetStatus() { return _state; }
/// <summary>
/// Установка данных
/// </summary>
/// <param name="moveableObject">Перемещаемый объект</param>
/// <param name="width">Ширина поля</param>
/// <param name="height">Высота поля</param>
public void SetData(IMoveableObject moveableObject, int width, int
height)
{
if (moveableObject == null)
{
_state = Status.NotInit;
return;
}
_state = Status.InProgress;
_moveableObject = moveableObject;
FieldWidth = width;
FieldHeight = height;
}
/// <summary>
/// Шаг перемещения
/// </summary>
public void MakeStep()
{
if (_state != Status.InProgress)
{
return;
}
if (IsTargetDestinaion())
{
_state = Status.Finish;
return;
}
MoveToTarget();
}
/// <summary>
/// Перемещение влево
/// </summary>
/// <returns>Результат перемещения (true - удалось переместиться, false -
///неудача)</returns>
protected bool MoveLeft() => MoveTo(Direction.Left);
/// <summary>
/// Перемещение вправо
/// </summary>
/// <returns>Результат перемещения (true - удалось переместиться,
///false - неудача)</returns>
protected bool MoveRight() => MoveTo(Direction.Right);
/// <summary>
/// Перемещение вверх
/// </summary>
/// <returns>Результат перемещения (true - удалось переместиться,
///false - неудача)</returns>
protected bool MoveUp() => MoveTo(Direction.Up);
/// <summary>
/// Перемещение вниз
/// </summary>
/// <returns>Результат перемещения (true - удалось переместиться,
///false - неудача)</returns>
protected bool MoveDown() => MoveTo(Direction.Down);
/// <summary>
/// Параметры объекта
/// </summary>
protected ObjectParameters? GetObjectParameters =>
_moveableObject?.GetObjectPosition;
/// <summary>
/// Шаг объекта
/// </summary>
/// <returns></returns>
protected int? GetStep()
{
if (_state != Status.InProgress)
{
return null;
}
return _moveableObject?.GetStep;
}
/// <summary>
/// Перемещение к цели
/// </summary>
protected abstract void MoveToTarget();
/// <summary>
/// Достигнута ли цель
/// </summary>
/// <returns></returns>
protected abstract bool IsTargetDestinaion();
/// <summary>
/// Попытка перемещения в требуемом направлении
/// </summary>
/// <param name="Direction">Направление</param>
/// <returns>Результат попытки (true - удалось переместиться, false -
///неудача)</returns>
private bool MoveTo(Direction Direction)
{
if (_state != Status.InProgress)
{
return false;
}
if (_moveableObject?.CheckCanMove(Direction) ?? false)
{
_moveableObject.MoveObject(Direction);
return true;
}
return false;
}
}
}

View File

@ -0,0 +1,34 @@
using Bulldoser.Drawings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public class DrawingObjectTractor : IMoveableObject
{
private readonly DrawingTractor? _drawningTractor = null;
public DrawingObjectTractor(DrawingTractor drawningTractor)
{
_drawningTractor = drawningTractor;
}
public ObjectParameters? GetObjectPosition
{
get
{
if (_drawningTractor == null || _drawningTractor.EntityTractor == null)
{
return null;
}
return new ObjectParameters(_drawningTractor.GetPosX,
_drawningTractor.GetPosY, _drawningTractor.GetWidth, _drawningTractor.GetHeight);
}
}
public int GetStep => (int)(_drawningTractor?.EntityTractor?.Step ?? 0);
public bool CheckCanMove(Direction direction) => _drawningTractor?.CanMove(direction) ?? false;
public void MoveObject(Direction direction) => _drawningTractor?.MoveTransport(direction);
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public interface IMoveableObject
{
ObjectParameters? GetObjectPosition { get; }
int GetStep { get; }
bool CheckCanMove(Direction direction);
void MoveObject(Direction direction);
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public class MoveToCenter : AbstractStrategy
{
protected override bool IsTargetDestinaion()
{
var objParams = GetObjectParameters;
if (objParams == null) return false;
return objParams.ObjectMiddleHorizontal <= FieldWidth / 2 && objParams.ObjectMiddleHorizontal
+ GetStep() >= FieldWidth / 2 && objParams.ObjectMiddleVertical <= FieldHeight / 2 &&
objParams.ObjectMiddleVertical + GetStep() >= FieldHeight / 2;
}
protected override void MoveToTarget()
{
var objParams = GetObjectParameters;
if (objParams == null) return;
var diffX = objParams.ObjectMiddleHorizontal - FieldWidth / 2;
if (Math.Abs(diffX) > GetStep())
{
if (diffX > 0)
{
MoveLeft();
}
else
{
MoveRight();
}
}
var diffY = objParams.ObjectMiddleVertical - FieldHeight / 2;
if (Math.Abs(diffY) > GetStep())
{
if (diffY > 0)
{
MoveUp();
}
else
{
MoveDown();
}
}
}
}
}

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public class MoveToRightCorner : AbstractStrategy
{
protected override bool IsTargetDestinaion()
{
var objParams = GetObjectParameters;
if (objParams == null) return false;
return objParams.RightBorder >= FieldWidth - GetStep() && objParams.DownBorder >= FieldHeight - GetStep();
}
protected override void MoveToTarget()
{
var objParams = GetObjectParameters;
if (objParams == null) return;
if (objParams.RightBorder < FieldWidth - GetStep()) MoveRight();
if (objParams.DownBorder < FieldHeight - GetStep()) MoveDown();
}
}
}

View File

@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
public class ObjectParameters
{
private readonly int _x;
private readonly int _y;
private readonly int _width;
private readonly int _height;
/// <summary>
/// Левая граница
/// </summary>
public int LeftBorder => _x;
/// <summary>
/// Верхняя граница
/// </summary>
public int TopBorder => _y;
/// <summary>
/// Правая граница
/// </summary>
public int RightBorder => _x + _width;
/// <summary>
/// Нижняя граница
/// </summary>
public int DownBorder => _y + _height;
/// <summary>
/// Середина объекта
/// </summary>
public int ObjectMiddleHorizontal => _x + _width / 2;
/// <summary>
/// Середина объекта
/// </summary>
public int ObjectMiddleVertical => _y + _height / 2;
/// <summary>
/// Конструктор
/// </summary>
/// <param name="x">Координата X</param>
/// <param name="y">Координата Y</param>
/// <param name="width">Ширина</param>
/// <param name="height">Высота</param>
public ObjectParameters(int x, int y, int width, int height)
{
_x = x;
_y = y;
_width = width;
_height = height;
}
}
}

View File

@ -11,7 +11,7 @@ namespace Bulldoser
// 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 FormTractorCollection());
}
}
}

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Bulldoser.Properties {
using System;
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// </summary>
// Этот класс создан автоматически классом 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() {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// </summary>
[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("Bulldoser.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bulldoser.MovementStrategy
{
/// <summary>
/// Статус выполнения операции перемещения
/// </summary>
public enum Status
{
NotInit,
InProgress,
Finish
}
}