diff --git a/ProjectAircraft12/ProjectAircraft12/DirectionType.cs b/ProjectAircraft12/ProjectAircraft12/DirectionType.cs new file mode 100644 index 0000000..57b33b3 --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/DirectionType.cs @@ -0,0 +1,26 @@ +namespace ProjectAircraft12; + +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Вверх + /// + Up = 1, + /// + /// Вниз + /// + Down = 2, + /// + /// Влево + /// + Left = 3, + /// + /// Вправо + /// + Right = 4 +} + + diff --git a/ProjectAircraft12/ProjectAircraft12/DrawningAircraft.cs b/ProjectAircraft12/ProjectAircraft12/DrawningAircraft.cs new file mode 100644 index 0000000..8bd500b --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/DrawningAircraft.cs @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAircraft12; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningAircraft +{ + + /// + /// Класс-сущность + /// + public EntityAircraft? EntityAircraft { get; private set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки самолета + /// + private int? _startPosX; + + /// + /// Верхняя координата прорисовки самолета + /// + private int? _startPosY; + + /// + /// Ширина прорисовки самолета + /// + private readonly int _drawingAircraftWidth = 100; + + /// + /// Высота прорисовки самолета + /// + private readonly int _drawingAircraftHeight = 50; + + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия радара + /// Признак наличия дополнительных топливных баков + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool radar, bool extraFuelTanks) + { + EntityAircraft = new EntityAircraft(); + EntityAircraft.Init(speed, weight, bodyColor, additionalColor, radar, extraFuelTanks); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // TODO: проверка, что объект "влезает" в размеры поля + if (width > _drawingAircraftWidth && height > _drawingAircraftHeight) + { + _pictureWidth = width; + _pictureHeight = height; + return true; + } + + else + { + return false; + } + + + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + + // TODO: если при установке объекта в эти координаты, он будет "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах + if (x < 0) + { + _startPosX = 0; + } + + if(_pictureWidth < x + _drawingAircraftWidth) + { + _startPosX = _drawingAircraftWidth - _drawingAircraftWidth; + } + + else + { + _startPosX = x; + } + + if (y < 0) + { + _startPosY = 0; + } + + if (_pictureHeight < y + _drawingAircraftWidth) + { + _startPosY = _pictureHeight - _drawingAircraftWidth; + } + + else + { + _startPosY = y; + } + + //_startPosX = x; + //_startPosY = y; + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещение выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntityAircraft == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + case DirectionType.Left: + if (_startPosX.Value - EntityAircraft.Step > 0) + { + _startPosX -= (int)EntityAircraft.Step; + } + return true; + + case DirectionType.Up: + if (_startPosY.Value - EntityAircraft.Step > 0) + { + _startPosY -= (int)EntityAircraft.Step; + } + return true; + + case DirectionType.Right: + if (_startPosX.Value + _drawingAircraftWidth + EntityAircraft.Step < _pictureWidth) + { + _startPosX += (int)EntityAircraft.Step; + } + return true; + + case DirectionType.Down: + if (_startPosY.Value + _drawingAircraftHeight + EntityAircraft.Step < _pictureHeight) + { + _startPosY += (int)EntityAircraft.Step; + } + return true; + } + return false; + + + + } + + + private GraphicsPath CreateRoundedRectangle(Rectangle rect, int radius) + { + GraphicsPath path = new GraphicsPath(); + int d = radius * 2; + + // Добавляем скруглённые углы + path.AddArc(rect.X, rect.Y, d, d, 180, 90); // Верхний левый + path.AddArc(rect.Right - d, rect.Y, d, d, 270, 90); // Верхний правый + path.AddArc(rect.Right - d, rect.Bottom - d, d, d, 0, 90); // Нижний правый + path.AddArc(rect.X, rect.Bottom - d, d, d, 90, 90); // Нижний левый + path.CloseFigure(); + + return path; + } + + private void DrawRoundedRectangle(Graphics g, Brush brush, Pen pen, Rectangle rect, int radius) + { + using (GraphicsPath path = CreateRoundedRectangle(rect, radius)) + { + g.FillPath(brush, path); // Закрашенный фон + g.DrawPath(pen, path); // Обводка + } + } + public void DrawTransport(Graphics g) + { + if (EntityAircraft == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + Brush bodyBrush = new SolidBrush(EntityAircraft.BodyColor); + Brush additionalBrush = new SolidBrush(EntityAircraft.AdditionalColor); + + // Основной корпус самолёта + g.FillRectangle(bodyBrush, _startPosX.Value, _startPosY.Value + 10, _drawingAircraftWidth, 20); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 10, _drawingAircraftWidth, 20); + + // orqa qanot + Point[] trianglePoints = { + new Point(_startPosX.Value, _startPosY.Value - 20), // Вершина + new Point(_startPosX.Value, _startPosY.Value+10), // Левый угол + new Point(_startPosX.Value + 30, _startPosY.Value+10) // Правый угол +}; + + g.FillPolygon(bodyBrush, trianglePoints); // Закрашенный треугольник + g.DrawPolygon(pen, trianglePoints); // Контур треугольника + + if (EntityAircraft.ExtraFuelTanks) + { + // бак + Rectangle extraFuelTanks = new Rectangle(_startPosX.Value - 5, _startPosY.Value + 5, 30, 10); // Прямоугольник от заданной точки + int radius_extraFuelTanks = 4; // Радиус скругления + DrawRoundedRectangle(g, bodyBrush, Pens.Black, extraFuelTanks, radius_extraFuelTanks); + } + + // oldi uchburchak + Point[] triangle_right = { + new Point(_startPosX.Value+120, _startPosY.Value + 20), // Вершина + new Point(_startPosX.Value+100, _startPosY.Value+10), // Левый угол + new Point(_startPosX.Value+100, _startPosY.Value+30) // Правый угол +}; + + g.FillPolygon(bodyBrush, triangle_right); // Закрашенный треугольник + g.DrawPolygon(pen, triangle_right); // Контур треугольника + + Pen line_triangle_right = new Pen(Color.Black, 1); // Чёрная линия толщиной 2 пикселя + g.DrawLine(line_triangle_right, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 120, _startPosY.Value + 20); + + //иллюминатор + Pen okno = new Pen(Color.Black, 3); // Чёрная линия толщиной 3 пикселя + g.DrawLine(okno, _startPosX.Value + 40, _startPosY.Value + 20, _startPosX.Value + 80, _startPosY.Value + 20); + + // шасси + Pen shassi1 = new Pen(Color.Black, 2); // Чёрная линия толщиной 2 пикселя + g.DrawLine(shassi1, _startPosX.Value + 40, _startPosY.Value + 30, _startPosX.Value + 40, _startPosY.Value + 36); + + Pen koliso1 = new Pen(Color.Black, 2); // Чёрная обводка толщиной 2 пикселя + g.DrawRectangle(koliso1, _startPosX.Value + 35, _startPosY.Value + 35, 4, 4); + Brush brush = new SolidBrush(Color.Black); + g.FillRectangle(brush, _startPosX.Value + 35, _startPosY.Value + 35, 4, 4); + + Pen koliso2 = new Pen(Color.Black, 2); // Чёрная обводка толщиной 2 пикселя + g.DrawRectangle(koliso2, _startPosX.Value + 42, _startPosY.Value + 35, 4, 4); + g.FillRectangle(brush, _startPosX.Value + 42, _startPosY.Value + 35, 4, 4); + + Pen shassi2 = new Pen(Color.Black, 2); // Чёрная линия толщиной 2 пикселя + g.DrawLine(shassi1, _startPosX.Value + 90, _startPosY.Value + 30, _startPosX.Value + 90, _startPosY.Value + 36); + + Pen koliso3 = new Pen(Color.Black, 2); // Чёрная обводка толщиной 2 пикселя + g.DrawRectangle(koliso3, _startPosX.Value + 88, _startPosY.Value + 35, 4, 4); + g.FillRectangle(brush, _startPosX.Value + 88, _startPosY.Value + 35, 4, 4); + + if (EntityAircraft.Radar) + { + // radar + Rectangle radar = new Rectangle(_startPosX.Value + 50, _startPosY.Value - 5, 20, 10); // Прямоугольник от заданной точки + int radius_radara = 6; // Радиус скругления + DrawRoundedRectangle(g, bodyBrush, Pens.Black, radar, radius_radara); + } + + Pen os_radar = new Pen(Color.Black, 2); // Чёрная линия толщиной 1 пикселя + g.DrawLine(os_radar, _startPosX.Value + 60, _startPosY.Value + 10, _startPosX.Value + 60, _startPosY.Value + 5); + + } + +} + diff --git a/ProjectAircraft12/ProjectAircraft12/EntityAircraft.cs b/ProjectAircraft12/ProjectAircraft12/EntityAircraft.cs new file mode 100644 index 0000000..03d1804 --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/EntityAircraft.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectAircraft12; + +public class EntityAircraft +{ + /// + /// Скорость + /// + public int Speed { get; private set; } + + /// + /// Вес + /// + public double Weight { get; private set; } + + /// + /// Основной цвет + /// + public Color BodyColor { get; private set; } + + /// + /// Дополнительный цвет (для опциональных элементов) + /// + public Color AdditionalColor { get; private set; } + + /// + /// Признак (опция) наличия радара + /// + public bool Radar { get; private set; } + + /// + /// Признак (опция) наличия дополнительных топливных баков + /// + public bool ExtraFuelTanks { get; private set; } + + /// + /// Шаг перемещения самолета + /// + public double Step => Speed * 100 / Weight; + + /// + /// Инициализация полей объекта-класса самолета + /// + + /// Скорость + /// Вес самолета + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия радара + /// Признак наличия дополнительных топливных баков + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool radar, bool extraFuelTanks) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Radar = radar; + ExtraFuelTanks = extraFuelTanks; + } + +} diff --git a/ProjectAircraft12/ProjectAircraft12/Form1.Designer.cs b/ProjectAircraft12/ProjectAircraft12/Form1.Designer.cs deleted file mode 100644 index 6ee4b2f..0000000 --- a/ProjectAircraft12/ProjectAircraft12/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectAircraft12 -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} diff --git a/ProjectAircraft12/ProjectAircraft12/Form1.cs b/ProjectAircraft12/ProjectAircraft12/Form1.cs deleted file mode 100644 index 4eac702..0000000 --- a/ProjectAircraft12/ProjectAircraft12/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectAircraft12 -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/ProjectAircraft12/ProjectAircraft12/FormAircraft.Designer.cs b/ProjectAircraft12/ProjectAircraft12/FormAircraft.Designer.cs new file mode 100644 index 0000000..12c9b70 --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/FormAircraft.Designer.cs @@ -0,0 +1,134 @@ +namespace ProjectAircraft12 +{ + partial class FormAircraft + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + pictureBoxAircraft = new PictureBox(); + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonDown = new Button(); + buttonRight = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxAircraft).BeginInit(); + SuspendLayout(); + // + // pictureBoxAircraft + // + pictureBoxAircraft.Dock = DockStyle.Fill; + pictureBoxAircraft.Location = new Point(0, 0); + pictureBoxAircraft.Name = "pictureBoxAircraft"; + pictureBoxAircraft.Size = new Size(1016, 487); + pictureBoxAircraft.TabIndex = 0; + pictureBoxAircraft.TabStop = false; + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(12, 445); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(94, 30); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += ButtonCreate_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.Left; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(861, 440); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.Up; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(902, 399); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 3; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.Down; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(902, 440); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 4; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.Right; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(943, 440); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 5; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // FormAircraft + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1016, 487); + Controls.Add(buttonRight); + Controls.Add(buttonDown); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxAircraft); + Name = "FormAircraft"; + Text = "Самолёт с радаром"; + ((System.ComponentModel.ISupportInitialize)pictureBoxAircraft).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBoxAircraft; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonUp; + private Button buttonDown; + private Button buttonRight; + } +} \ No newline at end of file diff --git a/ProjectAircraft12/ProjectAircraft12/FormAircraft.cs b/ProjectAircraft12/ProjectAircraft12/FormAircraft.cs new file mode 100644 index 0000000..be3e2f0 --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/FormAircraft.cs @@ -0,0 +1,98 @@ +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 ProjectAircraft12 +{ + public partial class FormAircraft : Form + { + + /// + /// Поле-объект для прорисовки объекта + /// + private DrawningAircraft? _drawningAircraft; + + /// + /// Конструктор формы + /// + + public FormAircraft() + { + InitializeComponent(); + } + + private void Draw() + { + if (_drawningAircraft == null) + { + return; + } + + + Bitmap bmp = new(pictureBoxAircraft.Width, pictureBoxAircraft.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningAircraft.DrawTransport(gr); + pictureBoxAircraft.Image = bmp; + } + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningAircraft = new DrawningAircraft(); + _drawningAircraft.Init(random.Next(100, 300), random.Next(100, 300), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), // bodyColor + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), // additionalColor + Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); + _drawningAircraft.SetPictureSize(pictureBoxAircraft.Width, pictureBoxAircraft.Height); + _drawningAircraft.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Draw(); + } + + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningAircraft == null) + { + return; + } + + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningAircraft.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningAircraft.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningAircraft.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningAircraft.MoveTransport(DirectionType.Right); + break; + } + if (result) + { + + Draw(); + } + } + } +} diff --git a/ProjectAircraft12/ProjectAircraft12/Form1.resx b/ProjectAircraft12/ProjectAircraft12/FormAircraft.resx similarity index 92% rename from ProjectAircraft12/ProjectAircraft12/Form1.resx rename to ProjectAircraft12/ProjectAircraft12/FormAircraft.resx index 1af7de1..8b2ff64 100644 --- a/ProjectAircraft12/ProjectAircraft12/Form1.resx +++ b/ProjectAircraft12/ProjectAircraft12/FormAircraft.resx @@ -1,17 +1,17 @@  - diff --git a/ProjectAircraft12/ProjectAircraft12/Program.cs b/ProjectAircraft12/ProjectAircraft12/Program.cs index 4c3fb1d..dff5b3b 100644 --- a/ProjectAircraft12/ProjectAircraft12/Program.cs +++ b/ProjectAircraft12/ProjectAircraft12/Program.cs @@ -11,7 +11,7 @@ namespace ProjectAircraft12 // 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 FormAircraft()); } } } \ No newline at end of file diff --git a/ProjectAircraft12/ProjectAircraft12/ProjectAircraft12.csproj b/ProjectAircraft12/ProjectAircraft12/ProjectAircraft12.csproj index 663fdb8..af03d74 100644 --- a/ProjectAircraft12/ProjectAircraft12/ProjectAircraft12.csproj +++ b/ProjectAircraft12/ProjectAircraft12/ProjectAircraft12.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectAircraft12/ProjectAircraft12/Properties/Resources.Designer.cs b/ProjectAircraft12/ProjectAircraft12/Properties/Resources.Designer.cs new file mode 100644 index 0000000..67260ac --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectAircraft12.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectAircraft12.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Down { + get { + object obj = ResourceManager.GetObject("Down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Left { + get { + object obj = ResourceManager.GetObject("Left", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Right { + get { + object obj = ResourceManager.GetObject("Right", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Up { + get { + object obj = ResourceManager.GetObject("Up", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ProjectAircraft12/ProjectAircraft12/Properties/Resources.resx b/ProjectAircraft12/ProjectAircraft12/Properties/Resources.resx new file mode 100644 index 0000000..38bb323 --- /dev/null +++ b/ProjectAircraft12/ProjectAircraft12/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ProjectAircraft12/ProjectAircraft12/Resources/Down.png b/ProjectAircraft12/ProjectAircraft12/Resources/Down.png new file mode 100644 index 0000000..2c72bcf Binary files /dev/null and b/ProjectAircraft12/ProjectAircraft12/Resources/Down.png differ diff --git a/ProjectAircraft12/ProjectAircraft12/Resources/Left.png b/ProjectAircraft12/ProjectAircraft12/Resources/Left.png new file mode 100644 index 0000000..545dad6 Binary files /dev/null and b/ProjectAircraft12/ProjectAircraft12/Resources/Left.png differ diff --git a/ProjectAircraft12/ProjectAircraft12/Resources/Right.png b/ProjectAircraft12/ProjectAircraft12/Resources/Right.png new file mode 100644 index 0000000..25b09ac Binary files /dev/null and b/ProjectAircraft12/ProjectAircraft12/Resources/Right.png differ diff --git a/ProjectAircraft12/ProjectAircraft12/Resources/Up.png b/ProjectAircraft12/ProjectAircraft12/Resources/Up.png new file mode 100644 index 0000000..e7431b3 Binary files /dev/null and b/ProjectAircraft12/ProjectAircraft12/Resources/Up.png differ