Compare commits

..

No commits in common. "LabWork3" and "main" have entirely different histories.

34 changed files with 75 additions and 1900 deletions

View File

@ -1,69 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Drawings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.CollectionGenericObjects;
public abstract class AbstractCompany
{
protected readonly int _placeSizeWidth = 300;
protected readonly int _placeSizeHeight = 110;
protected readonly int _pictureWidth;
protected readonly int _pictureHeight;
protected ICollectionGenericObjects<DrawingBase>? _collection = null;
private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth * _placeSizeHeight);
public AbstractCompany(int picWidth, int picHeigth, ICollectionGenericObjects<DrawingBase> collection)
{
_pictureWidth = picWidth;
_pictureHeight = picHeigth;
_collection = collection;
_collection.SetMaxCount = GetMaxCount;
}
public static int operator +(AbstractCompany company, DrawingBase sau)
{
return company._collection.Insert(sau);
}
public static DrawingBase operator -(AbstractCompany company, int position)
{
return company._collection.Remove(position);
}
public DrawingBase? GetRandomObject()
{
Random rnd = new();
return _collection?.Get(rnd.Next(GetMaxCount));
}
public Bitmap? Show()
{
Bitmap bitmap = new(_pictureWidth, _pictureHeight);
Graphics graphics = Graphics.FromImage(bitmap);
DrawBackground(graphics);
for (int i = 0; i < (_collection?.Count ?? 0); i++)
{
DrawingBase? obj = _collection?.Get(i);
SetObjectPosition(i, _collection?.Count ?? 0, obj);
obj?.DrawSAU(graphics);
}
return bitmap;
}
protected abstract void DrawBackground(Graphics g);
protected abstract void SetObjectPosition(int position, int MaxPos, DrawingBase? sau);
}

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.CollectionGenericObjects;
public interface ICollectionGenericObjects <T>
where T : class
{
int Count { get; }
int SetMaxCount { set; }
int Insert(T obj);
int Insert(T obj, int position);
T? Remove(int position);
T? Get(int position);
}

View File

@ -1,98 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Drawings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.CollectionGenericObjects;
public class MassiveGenericObjects <T> : ICollectionGenericObjects<T>
where T : class
{
private T?[] _collection;
public int Count => _collection.Length;
public int SetMaxCount { set { if (value > 0) { _collection = new T?[value]; } } }
public MassiveGenericObjects()
{
_collection = Array.Empty<T?>();
}
public T? Get(int position)
{
// TODO проверка позиции
if (position >= _collection.Length || position < 0)
{
return null;
}
return _collection[position];
}
public int Insert(T obj)
{
// TODO вставка в свободное место набора
int index = 0;
while (index < _collection.Length)
{
if (_collection[index] == null)
{
_collection[index] = obj;
return index;
}
index++;
}
return -1;
}
public int Insert(T obj, int position)
{
if (position >= _collection.Length || position < 0)
return -1;
//проверка, что элемент массива по этой позиции пустой
if (_collection[position] != null)
{
// проверка, что после вставляемого элемента в массиве есть пустой элемент
int nullIndex = -1;
for (int i = position + 1; i < Count; i++)
{
if (_collection[i] == null)
{
nullIndex = i;
break;
}
}
// Если пустого элемента нет, то выходим
if (nullIndex < 0)
{
return -1;
}
// сдвиг всех объектов, находящихся справа от позиции до первого пустого элемента
int j = nullIndex - 1;
while (j >= position)
{
_collection[j + 1] = _collection[j];
j--;
}
}
//вставка по позиции
_collection[position] = obj;
return position;
}
public T? Remove(int position)
{
//проверка позиции
//удаление объекта из массива, присвоив элементу массива значение null
if (position >= _collection.Length || position < 0)
{
return null;
}
T temp = _collection[position];
_collection[position] = null;
return temp;
}
}

View File

@ -1,55 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Drawings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.CollectionGenericObjects;
public class SAUSharingService : AbstractCompany
{
public SAUSharingService(int picWidth, int picHeight, ICollectionGenericObjects<DrawingBase> collection) : base(picWidth, picHeight, collection)
{
}
protected override 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; j++)
{
g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2, j * _placeSizeHeight);
}
g.DrawLine(pen, i * _placeSizeWidth, 0, i * _placeSizeWidth, _pictureHeight / _placeSizeHeight * _placeSizeHeight);
}
}
protected override void SetObjectPosition(int position, int MaxPos, DrawingBase? sau)
{
int n = 0;
int m = 0;
for (int i = 0; i < (_collection?.Count ?? 0); i++)
{
if (_collection?.Get(i) != null)
{
int x = 5 + _placeSizeWidth * n;
int y = (10 + _placeSizeHeight * (_pictureHeight / _placeSizeHeight - 1)) - _placeSizeHeight * m;
_collection?.Get(i)?.SetPictureSize(_pictureWidth, _pictureHeight);
_collection?.Get(i)?.SetPosition(x, y);
}
if (n < _pictureWidth / _placeSizeWidth)
n++;
else
{
n = 0;
m++;
}
}
}
}

View File

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.Drawings;
public enum DirectionType
{
Unknow = -1,
Up = 1,
Down = 2,
Left = 3,
Right = 4
}

View File

@ -1,194 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.Drawings
{
public class DrawingBase
{
public BaseSAU? BaseSAU { get; protected set; }
private int? _pictureWidth;
private int? _pictureHeight;
protected int? _startPosX;
protected int? _startPosY;
private readonly int _drawingSAUWidth = 150;
private readonly int _drawingSAUHeight = 80;
public int? GetPosX => _startPosX;
public int? GetPosY => _startPosY;
public int GetWidth => _drawingSAUWidth;
public int GetHeight => _drawingSAUHeight;
public DrawingBase(int speed, double weight, Color bodyColor) : this()
{
BaseSAU =new BaseSAU(speed, weight, bodyColor);
}
public DrawingBase()
{
_pictureWidth = null;
_pictureHeight = null;
_startPosX = null;
_startPosY = null;
}
public DrawingBase(int width,int height) : this()
{
_drawingSAUWidth = width;
_drawingSAUHeight = height;
}
public bool SetPictureSize(int width, int height)
{
if (width > _pictureWidth || height > _pictureHeight)
{
return false;
}
_pictureWidth = width;
_pictureHeight = height;
if (_startPosX.HasValue && _startPosY.HasValue)
{
if (_startPosX + _pictureWidth > width)
{
_startPosX = width - _pictureWidth;
}
if (_startPosY + _pictureHeight > height)
{
_startPosY = height - _pictureHeight;
}
}
return false;
}
public void SetPosition(int x, int y)
{
if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
{
return;
}
if (x < 0)
{
_startPosX = 0;
}
if (y < 0)
{
_startPosY = 0;
}
if (x + _drawingSAUWidth > _pictureWidth)
{
_startPosX = _pictureWidth - _drawingSAUWidth;
}
if (y + _pictureHeight > _pictureHeight)
{
_startPosY = _pictureHeight - _drawingSAUHeight;
}
_startPosX = x;
_startPosY = y;
}
public bool MoveSAU(DirectionType direction)
{
if (BaseSAU == null || !_startPosX.HasValue || !_startPosY.HasValue)
{
return false;
}
switch (direction)
{
case DirectionType.Left:
if (_startPosX.Value - BaseSAU.Step > 0)
{
_startPosX -= (int)BaseSAU.Step;
}
return true;
case DirectionType.Up:
if (_startPosY.Value - BaseSAU.Step > 0)
{
_startPosY -= (int)BaseSAU.Step;
}
return true;
case DirectionType.Right:
if (_startPosX.Value + BaseSAU.Step + _drawingSAUWidth < _pictureWidth.Value)
{
_startPosX += (int)BaseSAU.Step;
}
return true;
case DirectionType.Down:
if (_startPosY.Value + BaseSAU.Step + _drawingSAUHeight < _pictureHeight.Value)
{
_startPosY += (int)BaseSAU.Step;
}
return true;
default:
return false;
}
}
public virtual void DrawSAU(Graphics g)
{
if (BaseSAU == null || !_startPosX.HasValue || !_startPosY.HasValue)
{
return;
}
Pen pen = new(Color.Black);
Brush BaseBrush = new SolidBrush(BaseSAU.BodyColor);
Brush WheelBrush = new SolidBrush(Color.Brown);
//колеса
g.FillEllipse(WheelBrush, _startPosX.Value, _startPosY.Value + 45, 40, 40);
g.FillEllipse(WheelBrush, _startPosX.Value + 40, _startPosY.Value + 45, 40, 40);
g.FillEllipse(WheelBrush, _startPosX.Value + 80, _startPosY.Value + 45, 40, 40);
//Корпус
Point point1 = new Point(_startPosX.Value, _startPosY.Value + 45);
Point point2 = new Point(_startPosX.Value + 120, _startPosY.Value + 45);
Point point3 = new Point(_startPosX.Value + 140, _startPosY.Value + 75);
Point point4 = new Point(_startPosX.Value + 120, _startPosY.Value + 65);
Point point5 = new Point(_startPosX.Value, _startPosY.Value + 65);
Point[] Points1 = { point1, point2, point3, point4, point5 };
g.FillPolygon(BaseBrush, Points1);
g.FillRectangle(BaseBrush, _startPosX.Value + 20, _startPosY.Value + 15, 80, 30);
//Ствол
Point point6 = new Point(_startPosX.Value + 100, _startPosY.Value + 25);
Point point7 = new Point(_startPosX.Value + 150, _startPosY.Value + 10);
Point point8 = new Point(_startPosX.Value + 150, _startPosY.Value + 20);
Point point9 = new Point(_startPosX.Value + 100, _startPosY.Value + 35);
Point[] Points2 = { point6, point7, point8, point9 };
g.FillPolygon(BaseBrush, Points2);
Point point10 = new Point(_startPosX.Value + 140, _startPosY.Value + 10);
Point point11 = new Point(_startPosX.Value + 145, _startPosY.Value + 5);
Point point12 = new Point(_startPosX.Value + 150, _startPosY.Value + 15);
Point point13 = new Point(_startPosX.Value + 145, _startPosY.Value + 20);
Point[] Points3 = { point10, point11, point12, point13 };
g.FillPolygon(BaseBrush, Points3);
}
}
}

View File

@ -1,55 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace Project_SelfPropelledArtilleryUnit.Drawings;
public class DrawingSAU : DrawingBase
{
public DrawingSAU(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool guns) : base(150, 100)
{
BaseSAU = new EntitySAU( speed, weight, bodyColor, additionalColor, wheels, guns);
}
public override void DrawSAU(Graphics g)
{
if (BaseSAU==null || BaseSAU is not EntitySAU SAU || !_startPosX.HasValue || !_startPosY.HasValue)
{
return;
}
Pen pen = new(Color.Black);
Brush additionalBrush = new SolidBrush(SAU.AdditionalColor);
//гусеницы
g.FillEllipse(additionalBrush, _startPosX.Value, _startPosY.Value + 55, 130, 40);
//пулеметы
if (SAU.Guns)
{
g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value, 5, 15);
g.FillRectangle(additionalBrush, _startPosX.Value + 75, _startPosY.Value, 5, 15);
}
base.DrawSAU(g);
//гусеницы
g.FillEllipse(additionalBrush, _startPosX.Value, _startPosY.Value + 55, 130, 40);
}
}

View File

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

View File

@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.Entity;
public class EntitySAU: BaseSAU
{
public Color AdditionalColor { get; private set; }
public bool Wheels { get; private set; }
//длина ствола
public bool Guns { get; private set; }
public EntitySAU(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool guns) : base(speed, weight, bodyColor)
{
AdditionalColor = additionalColor;
Wheels = wheels;
Guns = guns;
}
}

View File

@ -0,0 +1,39 @@
namespace Project_SelfPropelledArtilleryUnit
{
partial class Form1
{
/// <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()
{
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
}
}

View File

@ -0,0 +1,10 @@
namespace Project_SelfPropelledArtilleryUnit
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

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.
-->

View File

@ -1,146 +0,0 @@
namespace Project_SelfPropelledArtilleryUnit
{
partial class FormSAU
{
/// <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()
{
pictureBox1 = new PictureBox();
left = new Button();
up = new Button();
right = new Button();
down = new Button();
comboBoxStrategy = new ComboBox();
strategyStep = new Button();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
SuspendLayout();
//
// pictureBox1
//
pictureBox1.Dock = DockStyle.Fill;
pictureBox1.Location = new Point(0, 0);
pictureBox1.Name = "pictureBox1";
pictureBox1.Size = new Size(1054, 522);
pictureBox1.TabIndex = 0;
pictureBox1.TabStop = false;
//
// left
//
left.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
left.BackgroundImage = Properties.Resources.left;
left.BackgroundImageLayout = ImageLayout.Stretch;
left.Location = new Point(904, 467);
left.Name = "left";
left.Size = new Size(40, 40);
left.TabIndex = 2;
left.UseVisualStyleBackColor = true;
left.Click += Move_Click;
//
// up
//
up.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
up.BackgroundImage = Properties.Resources.up;
up.BackgroundImageLayout = ImageLayout.Stretch;
up.Location = new Point(950, 421);
up.Name = "up";
up.Size = new Size(40, 40);
up.TabIndex = 3;
up.UseVisualStyleBackColor = true;
up.Click += Move_Click;
//
// right
//
right.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
right.BackgroundImage = Properties.Resources.right;
right.BackgroundImageLayout = ImageLayout.Stretch;
right.Location = new Point(996, 467);
right.Name = "right";
right.Size = new Size(40, 40);
right.TabIndex = 4;
right.UseVisualStyleBackColor = true;
right.Click += Move_Click;
//
// down
//
down.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
down.BackgroundImage = Properties.Resources.down;
down.BackgroundImageLayout = ImageLayout.Stretch;
down.Location = new Point(950, 467);
down.Name = "down";
down.Size = new Size(40, 40);
down.TabIndex = 5;
down.UseVisualStyleBackColor = true;
down.Click += Move_Click;
//
// comboBoxStrategy
//
comboBoxStrategy.FormattingEnabled = true;
comboBoxStrategy.Items.AddRange(new object[] { "to the center", "to the edge" });
comboBoxStrategy.Location = new Point(891, 12);
comboBoxStrategy.Name = "comboBoxStrategy";
comboBoxStrategy.Size = new Size(151, 28);
comboBoxStrategy.TabIndex = 7;
//
// strategyStep
//
strategyStep.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
strategyStep.Location = new Point(948, 46);
strategyStep.Name = "strategyStep";
strategyStep.Size = new Size(94, 29);
strategyStep.TabIndex = 8;
strategyStep.Text = "Step";
strategyStep.UseVisualStyleBackColor = true;
strategyStep.Click += strategyStep_Click;
//
// FormSAU
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1054, 522);
Controls.Add(strategyStep);
Controls.Add(comboBoxStrategy);
Controls.Add(down);
Controls.Add(right);
Controls.Add(up);
Controls.Add(left);
Controls.Add(pictureBox1);
Name = "FormSAU";
Text = "Самоходная артиллерийская установка";
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
ResumeLayout(false);
}
#endregion
private PictureBox pictureBox1;
private Button left;
private Button up;
private Button right;
private Button down;
private ComboBox comboBoxStrategy;
private Button strategyStep;
}
}

View File

@ -1,126 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Project_SelfPropelledArtilleryUnit.Drawings;
using Project_SelfPropelledArtilleryUnit.MovementStrategy;
namespace Project_SelfPropelledArtilleryUnit;
public partial class FormSAU : Form
{
private DrawingBase? _drawingBase;
private AbstractStrategy? _strategy;
public DrawingBase SetSAU
{
set
{
_drawingBase = value;
_drawingBase.SetPictureSize(pictureBox1.Width, pictureBox1.Height);
comboBoxStrategy.Enabled = true;
_strategy = null;
Draw();
}
}
public FormSAU()
{
InitializeComponent();
}
private void Draw()
{
if (_drawingBase == null)
{
return;
}
Bitmap bmp = new(pictureBox1.Width, pictureBox1.Height);
Graphics gr = Graphics.FromImage(bmp);
_drawingBase.DrawSAU(gr);
pictureBox1.Image = bmp;
}
private void Move_Click(object sender, EventArgs e)
{
if (_drawingBase == null)
{
return;
}
string name = ((Button)sender)?.Name ?? string.Empty;
bool result = false;
switch (name)
{
case "up":
result = _drawingBase.MoveSAU(DirectionType.Up);
break;
case "down":
result = _drawingBase.MoveSAU(DirectionType.Down);
break;
case "left":
result = _drawingBase.MoveSAU(DirectionType.Left);
break;
case "right":
result = _drawingBase.MoveSAU(DirectionType.Right);
break;
}
if (result)
{
Draw();
}
}
private void strategyStep_Click(object sender, EventArgs e)
{
if (_drawingBase == null)
{
return;
}
if (comboBoxStrategy.Enabled)
{
_strategy = comboBoxStrategy.SelectedIndex
switch
{
0 => new MoveToCenter(),
1 => new MoveToBorder(),
_ => null,
};
if (_strategy == null)
{
return;
}
_strategy.SetData(new MoveableSAU(_drawingBase), pictureBox1.Width, pictureBox1.Height);
}
if (_strategy == null)
{
return;
}
comboBoxStrategy.Enabled = false;
_strategy.MakeStep();
Draw();
if (_strategy.GetStatus() == StrategyStatus.Finish)
{
comboBoxStrategy.Enabled = true;
_strategy = null;
}
}
}

View File

@ -1,172 +0,0 @@
namespace Project_SelfPropelledArtilleryUnit
{
partial class FormSAUCollection
{
/// <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()
{
groupBoxTools = new GroupBox();
buttonUpdate = new Button();
buttonGoToCheck = new Button();
buttonRemoveSAU = new Button();
maskedTextBox = new MaskedTextBox();
buttonAddSAU = new Button();
buttonAddBaseSAU = new Button();
comboBoxSelectorCompany = new ComboBox();
pictureBox = new PictureBox();
groupBoxTools.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit();
SuspendLayout();
//
// groupBoxTools
//
groupBoxTools.Controls.Add(buttonUpdate);
groupBoxTools.Controls.Add(buttonGoToCheck);
groupBoxTools.Controls.Add(buttonRemoveSAU);
groupBoxTools.Controls.Add(maskedTextBox);
groupBoxTools.Controls.Add(buttonAddSAU);
groupBoxTools.Controls.Add(buttonAddBaseSAU);
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(1113, 0);
groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Size = new Size(218, 591);
groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false;
groupBoxTools.Text = "Инструменты";
//
// buttonUpdate
//
buttonUpdate.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonUpdate.Location = new Point(6, 544);
buttonUpdate.Name = "buttonUpdate";
buttonUpdate.Size = new Size(206, 41);
buttonUpdate.TabIndex = 8;
buttonUpdate.Text = "Обновить";
buttonUpdate.UseVisualStyleBackColor = true;
buttonUpdate.Click += buttonUpdate_Click;
//
// buttonGoToCheck
//
buttonGoToCheck.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonGoToCheck.Location = new Point(6, 497);
buttonGoToCheck.Name = "buttonGoToCheck";
buttonGoToCheck.Size = new Size(206, 41);
buttonGoToCheck.TabIndex = 7;
buttonGoToCheck.Text = "Передать на тесты";
buttonGoToCheck.UseVisualStyleBackColor = true;
buttonGoToCheck.Click += buttonGoToCheck_Click;
//
// buttonRemoveSAU
//
buttonRemoveSAU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonRemoveSAU.Location = new Point(6, 259);
buttonRemoveSAU.Name = "buttonRemoveSAU";
buttonRemoveSAU.Size = new Size(206, 41);
buttonRemoveSAU.TabIndex = 6;
buttonRemoveSAU.Text = "Удаление САУ";
buttonRemoveSAU.UseVisualStyleBackColor = true;
buttonRemoveSAU.Click += buttonRemoveSAU_Click;
//
// maskedTextBox
//
maskedTextBox.Location = new Point(6, 226);
maskedTextBox.Mask = "00";
maskedTextBox.Name = "maskedTextBox";
maskedTextBox.Size = new Size(206, 27);
maskedTextBox.TabIndex = 5;
maskedTextBox.ValidatingType = typeof(int);
//
// buttonAddSAU
//
buttonAddSAU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonAddSAU.Location = new Point(6, 128);
buttonAddSAU.Name = "buttonAddSAU";
buttonAddSAU.Size = new Size(206, 41);
buttonAddSAU.TabIndex = 3;
buttonAddSAU.Text = "Добавление САУ";
buttonAddSAU.UseVisualStyleBackColor = true;
buttonAddSAU.Click += buttonAddSAU_Click;
//
// buttonAddBaseSAU
//
buttonAddBaseSAU.Location = new Point(6, 81);
buttonAddBaseSAU.Name = "buttonAddBaseSAU";
buttonAddBaseSAU.Size = new Size(206, 41);
buttonAddBaseSAU.TabIndex = 2;
buttonAddBaseSAU.Text = "Добавление базовой САУ";
buttonAddBaseSAU.UseVisualStyleBackColor = true;
buttonAddBaseSAU.Click += buttonAddBaseSAU_Click;
//
// comboBoxSelectorCompany
//
comboBoxSelectorCompany.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxSelectorCompany.FormattingEnabled = true;
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
comboBoxSelectorCompany.Location = new Point(6, 26);
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
comboBoxSelectorCompany.Size = new Size(206, 28);
comboBoxSelectorCompany.TabIndex = 1;
comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged;
//
// pictureBox
//
pictureBox.Dock = DockStyle.Fill;
pictureBox.Location = new Point(0, 0);
pictureBox.Name = "pictureBox";
pictureBox.Size = new Size(1113, 591);
pictureBox.TabIndex = 4;
pictureBox.TabStop = false;
//
// FormSAUCollection
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1331, 591);
Controls.Add(pictureBox);
Controls.Add(groupBoxTools);
Name = "FormSAUCollection";
Text = "FormSAUCollection";
groupBoxTools.ResumeLayout(false);
groupBoxTools.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBox).EndInit();
ResumeLayout(false);
}
#endregion
private GroupBox groupBoxTools;
private ComboBox comboBoxSelectorCompany;
private Button buttonAddSAU;
private Button buttonAddBaseSAU;
private PictureBox pictureBox;
private Button buttonGoToCheck;
private Button buttonRemoveSAU;
private MaskedTextBox maskedTextBox;
private Button buttonUpdate;
}
}

View File

@ -1,140 +0,0 @@
using Project_SelfPropelledArtilleryUnit.CollectionGenericObjects;
using Project_SelfPropelledArtilleryUnit.Drawings;
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 Project_SelfPropelledArtilleryUnit;
public partial class FormSAUCollection : Form
{
private AbstractCompany? _company;
public FormSAUCollection()
{
InitializeComponent();
}
private void comboBoxSelectorCompany_SelectedIndexChanged(object sender, EventArgs e)
{
switch (comboBoxSelectorCompany.Text)
{
case "Хранилище":
_company = new SAUSharingService(pictureBox.Width, pictureBox.Height, new MassiveGenericObjects<DrawingBase>());
break;
}
}
private void CreateObject(string type)
{
if (_company == null) { return; }
DrawingBase drawingbase;
Random random = new();
switch (type)
{
case nameof(DrawingBase):
drawingbase = new DrawingBase(random.Next(100, 300), random.Next(1000, 3000), GetColor(random));
break;
case nameof(DrawingSAU):
drawingbase = new DrawingSAU(random.Next(100, 300), random.Next(1000, 3000),
GetColor(random), GetColor(random),
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
break;
default:
return;
}
if (_company + drawingbase !=-1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _company.Show();
}
else
{
MessageBox.Show("Не удалось добавить объект");
}
}
private static Color GetColor(Random random)
{
Color color = Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256));
ColorDialog dialog = new();
if (dialog.ShowDialog() == DialogResult.OK)
{
color = dialog.Color;
}
return color;
}
private void buttonAddBaseSAU_Click(object sender, EventArgs e) => CreateObject(nameof(DrawingBase));
private void buttonAddSAU_Click(object sender, EventArgs e) => CreateObject(nameof(DrawingSAU));
private void buttonRemoveSAU_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(maskedTextBox.Text) || _company == null)
{
return;
}
if (MessageBox.Show("Удалить объект?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
{
return;
}
int pos = Convert.ToInt32(maskedTextBox.Text);
if (_company - pos != null)
{
MessageBox.Show("Объект удален");
pictureBox.Image = _company.Show();
}
else
{
MessageBox.Show("Не удалось удалить объект");
}
}
private void buttonGoToCheck_Click(object sender, EventArgs e)
{
if (_company == null)
{
return;
}
DrawingBase? sau = null;
int counter = 100;
while (sau == null)
{
sau = _company.GetRandomObject();
counter--;
}
if (sau == null)
{
return;
}
FormSAU form = new()
{
SetSAU = sau
};
form.ShowDialog();
}
private void buttonUpdate_Click(object sender, EventArgs e)
{
if (_company == null)
{
return;
}
pictureBox.Image = _company.Show();
}
}

View File

@ -1,120 +0,0 @@
<?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

@ -1,97 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public abstract class AbstractStrategy
{
private IMoveableObject? _moveableObject;
private StrategyStatus _state = StrategyStatus.NotInit;
protected int FieldWidth { get; private set; }
protected int FieldHeight { get; private set; }
public StrategyStatus GetStatus() { return _state; }
public void SetData(IMoveableObject moveableObject, int width, int height)
{
if (moveableObject == null)
{
_state = StrategyStatus.NotInit;
return;
}
_state = StrategyStatus.InProgress;
_moveableObject = moveableObject;
FieldWidth = width;
FieldHeight = height;
}
public void MakeStep()
{
if (_state != StrategyStatus.InProgress)
{
return;
}
if (IsTargetDestination())
{
_state = StrategyStatus.Finish;
return;
}
MoveToTarget();
}
protected bool MoveLeft() => MoveTo(MovementDirection.Left);
protected bool MoveRight() => MoveTo(MovementDirection.Right);
protected bool MoveUp() => MoveTo(MovementDirection.Up);
protected bool MoveDown() => MoveTo(MovementDirection.Down);
protected ObjectParameters? GetObjectParameters => _moveableObject?.GetObjectPosition;
protected int? GetStep()
{
if (_state != StrategyStatus.InProgress)
{
return null;
}
return _moveableObject?.GetStep;
}
protected abstract void MoveToTarget();
protected abstract bool IsTargetDestination();
private bool MoveTo(MovementDirection movementDirection)
{
if (_state != StrategyStatus.InProgress)
{
return false;
}
return _moveableObject?.TryMoveObject(movementDirection) ?? false;
}
}

View File

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public interface IMoveableObject
{
ObjectParameters? GetObjectPosition { get; }
int GetStep { get; }
bool TryMoveObject(MovementDirection direction);
}

View File

@ -1,55 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public class MoveToBorder : AbstractStrategy
{
protected override bool IsTargetDestination()
{
ObjectParameters? objParams = GetObjectParameters;
if (objParams == null)
{
return false;
}
return objParams.RightBorder <= FieldWidth && objParams.RightBorder + GetStep() >= FieldWidth &&
objParams.DownBorder <= FieldHeight && objParams.DownBorder + GetStep() >= FieldHeight;
}
protected override void MoveToTarget()
{
ObjectParameters? objParams = GetObjectParameters;
if (objParams == null)
{
return;
}
int diffX = objParams.RightBorder - FieldWidth;
if (Math.Abs(diffX) > GetStep())
{
if (diffX > 0)
{
MoveLeft();
}
else
{
MoveRight();
}
}
int diffY = objParams.DownBorder - FieldHeight;
if (Math.Abs(diffY) > GetStep())
{
if (diffY > 0)
{
MoveUp();
}
else
{
MoveDown();
}
}
}
}

View File

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

View File

@ -1,61 +0,0 @@
using Project_SelfPropelledArtilleryUnit.Drawings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public class MoveableSAU : IMoveableObject
{
private readonly DrawingBase? _SAU = null;
public MoveableSAU(DrawingBase sau)
{
_SAU = sau;
}
public ObjectParameters? GetObjectPosition
{
get
{
if (_SAU == null || _SAU.BaseSAU == null || !_SAU.GetPosX.HasValue || !_SAU.GetPosY.HasValue)
{
return null;
}
return new ObjectParameters(_SAU.GetPosX.Value, _SAU.GetPosY.Value, _SAU.GetWidth, _SAU.GetHeight);
}
}
public int GetStep => (int)(_SAU?.BaseSAU.Step ?? 0);
public bool TryMoveObject(MovementDirection direction)
{
if (_SAU == null || _SAU.BaseSAU == null)
{
return false;
}
return _SAU.MoveSAU(GetDirectionType(direction));
}
private static DirectionType GetDirectionType(MovementDirection direction)
{
return direction switch
{
MovementDirection.Left => DirectionType.Left,
MovementDirection.Right => DirectionType.Right,
MovementDirection.Up => DirectionType.Up,
MovementDirection.Down => DirectionType.Down,
_ => DirectionType.Unknow,
};
}
}

View File

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

View File

@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public class ObjectParameters
{
private readonly int _x;
private readonly int _y;
private readonly int _width;
private readonly int _height;
public int LeftBorder => _x;
public int TopBorder => _y;
public int RightBorder => _x + _width;
public int DownBorder => _y + _height;
public int ObjectMiddleHorizontal => _x + _width / 2;
public int ObjectMiddleVertical => _y + _height / 2;
public ObjectParameters(int x, int y, int width, int height)
{
_x = x;
_y = y;
_width = width;
_height = height;
}
}

View File

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project_SelfPropelledArtilleryUnit.MovementStrategy;
public enum StrategyStatus
{
NotInit,
InProgress,
Finish
}

View File

@ -11,7 +11,7 @@ namespace Project_SelfPropelledArtilleryUnit
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new FormSAUCollection());
Application.Run(new Form1());
}
}
}

View File

@ -8,19 +8,4 @@
<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

@ -1,113 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Project_SelfPropelledArtilleryUnit.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("Project_SelfPropelledArtilleryUnit.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;
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap arrow {
get {
object obj = ResourceManager.GetObject("arrow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap down {
get {
object obj = ResourceManager.GetObject("down", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap left {
get {
object obj = ResourceManager.GetObject("left", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap right {
get {
object obj = ResourceManager.GetObject("right", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap up {
get {
object obj = ResourceManager.GetObject("up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -1,136 +0,0 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="left" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="right" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB