diff --git a/ProjectPlane/ProjectPlane/Direction.cs b/ProjectPlane/ProjectPlane/Direction.cs new file mode 100644 index 0000000..ae7d03e --- /dev/null +++ b/ProjectPlane/ProjectPlane/Direction.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPlane +{ + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/ProjectPlane/ProjectPlane/DrawingPlane.cs b/ProjectPlane/ProjectPlane/DrawingPlane.cs new file mode 100644 index 0000000..83e935c --- /dev/null +++ b/ProjectPlane/ProjectPlane/DrawingPlane.cs @@ -0,0 +1,229 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPlane +{ + internal class DrawingPlane + { + + /// + /// Класс-сущность + /// + public EntityPlane Plane { get; private set; } + /// + /// Левая координата отрисовки самолета + /// + private float _startPosX; + /// + /// Верхняя кооридната отрисовки самолета + /// + private float _startPosY; + /// + /// Ширина окна отрисовки + /// + private int? _pictureWidth = null; + /// + /// Высота окна отрисовки + /// + private int? _pictureHeight = null; + /// + /// Ширина отрисовки самолета + /// + private readonly int _planeWidth = 120; + /// + /// Высота отрисовки самолета + /// + private readonly int _planeHeight = 50; + /// + /// Левый край + /// + private readonly int _minX = 5; + /// + /// Верхний край + /// + private readonly int _minY = 40; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес самолета + /// Цвет корпуса + public void Init(int speed, float weight, Color bodyColor) + { + Plane = new EntityPlane(); + Plane.Init(speed, weight, bodyColor); + } + /// + /// Установка позиции самолета + /// + /// Координата X + /// Координата Y + /// Ширина картинки + /// Высота картинки + public void SetPosition(int x, int y, int width, int height) + { + if (x >= _minX && x <= width && y >= _minY && y <= height) + { + _startPosX = x; + _startPosY = y; + _pictureWidth = width; + _pictureHeight = height; + } + else SetPosition(_minX, _minY, width, height); + } + /// + /// Изменение направления пермещения + /// + /// Направление + public void MoveTransport(Direction direction) + { + if (!_pictureWidth.HasValue || !_pictureHeight.HasValue) + { + return; + } + switch (direction) + { + // вправо + case Direction.Right: + if (_startPosX + _planeWidth + Plane.Step < _pictureWidth) + { + _startPosX += Plane.Step; + } + break; + //влево + case Direction.Left: + if (_startPosX - Plane.Step > 0) + { + _startPosX -= Plane.Step; + } + break; + //вверх + case Direction.Up: + if (_startPosY - Plane.Step > 35) + { + _startPosY -= Plane.Step; + } + break; + break; + //вниз + case Direction.Down: + if (_startPosY + _planeHeight + Plane.Step < _pictureHeight) + { + _startPosY += Plane.Step; + } + break; + } + } + /// + /// Отрисовка самолета + /// + /// + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + //границы самолета + Pen pen = new(Color.Black); + + g.DrawEllipse(pen, _startPosX, _startPosY, 20, 20); + + g.DrawRectangle(pen, _startPosX + 8, _startPosY, 100, 20); + + Point[] Triangle0 = new Point[3]; + Triangle0[0].X = Convert.ToInt32(_startPosX + 108); Triangle0[0].Y = Convert.ToInt32(_startPosY - 2); + Triangle0[1].X = Convert.ToInt32(_startPosX + 125); Triangle0[1].Y = Convert.ToInt32(_startPosY + 10); + Triangle0[2].X = Convert.ToInt32(_startPosX + 108); Triangle0[2].Y = Convert.ToInt32(_startPosY + 10); + g.DrawPolygon(pen, Triangle0); + + Point[] Triangle1 = new Point[3]; + Triangle1[0].X = Convert.ToInt32(_startPosX + 108); Triangle1[0].Y = Convert.ToInt32(_startPosY + 10); + Triangle1[1].X = Convert.ToInt32(_startPosX + 125); Triangle1[1].Y = Convert.ToInt32(_startPosY + 10); + Triangle1[2].X = Convert.ToInt32(_startPosX + 108); Triangle1[2].Y = Convert.ToInt32(_startPosY + 22); + g.DrawPolygon(pen, Triangle1); + + Point[] Triangle = new Point[3]; + Triangle[0].X = Convert.ToInt32(_startPosX + 5); Triangle[0].Y = Convert.ToInt32(_startPosY); + Triangle[1].X = Convert.ToInt32(_startPosX + 5); Triangle[1].Y = Convert.ToInt32(_startPosY - 20); + Triangle[2].X = Convert.ToInt32(_startPosX + 35); Triangle[2].Y = Convert.ToInt32(_startPosY); + g.DrawPolygon(pen, Triangle); + + ////корпус + + Brush br = new SolidBrush(Plane?.BodyColor ?? Color.Black); + + g.FillEllipse(br, _startPosX, _startPosY, 20, 20); + + g.FillRectangle(br, _startPosX + 8, _startPosY, 100, 20); + + Point[] Triangle2 = new Point[3]; + Triangle2[0].X = Convert.ToInt32(_startPosX + 5); Triangle2[0].Y = Convert.ToInt32(_startPosY); + Triangle2[1].X = Convert.ToInt32(_startPosX + 5); Triangle2[1].Y = Convert.ToInt32(_startPosY - 20); + Triangle2[2].X = Convert.ToInt32(_startPosX + 35); Triangle2[2].Y = Convert.ToInt32(_startPosY); + g.FillPolygon(br, Triangle2); + + Point[] Triangle4 = new Point[3]; + Triangle4[0].X = Convert.ToInt32(_startPosX + 108); Triangle4[0].Y = Convert.ToInt32(_startPosY + 10); + Triangle4[1].X = Convert.ToInt32(_startPosX + 125); Triangle4[1].Y = Convert.ToInt32(_startPosY + 10); + Triangle4[2].X = Convert.ToInt32(_startPosX + 108); Triangle4[2].Y = Convert.ToInt32(_startPosY + 22); + g.FillPolygon(br, Triangle4); + + // window + + Brush brBlue = new SolidBrush(Color.LightBlue); + + Point[] Triangle3 = new Point[3]; + Triangle3[0].X = Convert.ToInt32(_startPosX + 108); Triangle3[0].Y = Convert.ToInt32(_startPosY - 2); + Triangle3[1].X = Convert.ToInt32(_startPosX + 125); Triangle3[1].Y = Convert.ToInt32(_startPosY + 10); + Triangle3[2].X = Convert.ToInt32(_startPosX + 108); Triangle3[2].Y = Convert.ToInt32(_startPosY + 10); + g.FillPolygon(brBlue, Triangle3); + + g.DrawLine(pen, _startPosX + 37, _startPosY + 20, _startPosX + 37, _startPosY + 25); + g.DrawLine(pen, _startPosX + 32, _startPosY + 25, _startPosX + 40, _startPosY + 25); + g.DrawRectangle(pen, _startPosX + 32, _startPosY + 25, 3, 3); + g.DrawRectangle(pen, _startPosX + 39, _startPosY + 25, 3, 3); + + g.DrawLine(pen, _startPosX + 102, _startPosY + 20, _startPosX + 102, _startPosY + 25); + g.DrawRectangle(pen, _startPosX + 101, _startPosY + 25, 3, 3); + + Brush brBlack = new SolidBrush(Color.Black); + + g.FillRectangle(brBlack, _startPosX + 5, _startPosY - 2, 18, 7); + g.FillEllipse(brBlack, _startPosX, _startPosY - 2, 7, 7); + g.FillEllipse(brBlack, _startPosX + 20, _startPosY - 2, 7, 7); + + g.FillRectangle(brBlack, _startPosX + 41, _startPosY + 8, 42, 4); + g.FillEllipse(brBlack, _startPosX + 39, _startPosY + 8, 4, 4); + g.FillEllipse(brBlack, _startPosX + 81, _startPosY + 8, 4, 4); + } + /// + /// Смена границ формы отрисовки + /// + /// Ширина картинки + /// Высота картинки + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_pictureWidth <= _planeWidth || _pictureHeight <= _planeHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + if (_startPosX + _planeWidth > _pictureWidth) + { + _startPosX = _pictureWidth.Value - _planeWidth; + } + if (_startPosY + _planeHeight > _pictureHeight) + { + _startPosY = _pictureHeight.Value - _planeHeight; + } + } + } +} diff --git a/ProjectPlane/ProjectPlane/EntityPlane.cs b/ProjectPlane/ProjectPlane/EntityPlane.cs new file mode 100644 index 0000000..c7bc004 --- /dev/null +++ b/ProjectPlane/ProjectPlane/EntityPlane.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPlane +{ + internal class EntityPlane + { + + /// + /// Скорость + /// + public int Speed { get; private set; } + /// + /// Вес + /// + public float Weight { get; private set; } + /// + /// Цвет корпуса + /// + public Color BodyColor { get; private set; } + /// + /// Шаг перемещения самолета + /// + public float Step => Speed * 100 / Weight; + /// + /// Инициализация полей объекта-класса самолета + /// + /// + /// + /// + /// + public void Init(int speed, float weight, Color bodyColor) + { + Random rnd = new(); + Speed = speed <= 0 ? rnd.Next(350, 550) : speed; + Weight = weight <= 0 ? rnd.Next(40, 70) : weight; + BodyColor = bodyColor; + } + } +} diff --git a/ProjectPlane/ProjectPlane/Form1.Designer.cs b/ProjectPlane/ProjectPlane/Form1.Designer.cs deleted file mode 100644 index 55294cb..0000000 --- a/ProjectPlane/ProjectPlane/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectPlane -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/Form1.cs b/ProjectPlane/ProjectPlane/Form1.cs deleted file mode 100644 index c38f13e..0000000 --- a/ProjectPlane/ProjectPlane/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectPlane -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/FormPlane.Designer.cs b/ProjectPlane/ProjectPlane/FormPlane.Designer.cs new file mode 100644 index 0000000..d9ab3a1 --- /dev/null +++ b/ProjectPlane/ProjectPlane/FormPlane.Designer.cs @@ -0,0 +1,175 @@ +namespace ProjectPlane +{ + partial class FormPlane + { + /// + /// 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.buttonUp = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.pictureBoxPlane = new System.Windows.Forms.PictureBox(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelBodyColor = new System.Windows.Forms.ToolStripStatusLabel(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlane)).BeginInit(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // buttonUp + // + this.buttonUp.BackgroundImage = global::ProjectPlane.Properties.Resources.up; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonUp.Location = new System.Drawing.Point(657, 323); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(46, 47); + this.buttonUp.TabIndex = 0; + this.buttonUp.UseVisualStyleBackColor = true; + this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonRight + // + this.buttonRight.BackgroundImage = global::ProjectPlane.Properties.Resources.right; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonRight.Location = new System.Drawing.Point(709, 376); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(46, 47); + this.buttonRight.TabIndex = 1; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonDown + // + this.buttonDown.BackgroundImage = global::ProjectPlane.Properties.Resources.down; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonDown.Location = new System.Drawing.Point(657, 376); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(46, 47); + this.buttonDown.TabIndex = 2; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonLeft + // + this.buttonLeft.BackgroundImage = global::ProjectPlane.Properties.Resources.left; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonLeft.Location = new System.Drawing.Point(605, 376); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(46, 47); + this.buttonLeft.TabIndex = 3; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click); + // + // buttonCreate + // + this.buttonCreate.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.buttonCreate.Location = new System.Drawing.Point(12, 376); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(120, 47); + this.buttonCreate.TabIndex = 4; + this.buttonCreate.Text = "New Plane"; + this.buttonCreate.UseVisualStyleBackColor = false; + this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); + // + // pictureBoxPlane + // + this.pictureBoxPlane.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxPlane.Location = new System.Drawing.Point(0, 0); + this.pictureBoxPlane.Name = "pictureBoxPlane"; + this.pictureBoxPlane.Size = new System.Drawing.Size(800, 450); + this.pictureBoxPlane.TabIndex = 5; + this.pictureBoxPlane.TabStop = false; + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabelSpeed, + this.toolStripStatusLabelWeight, + this.toolStripStatusLabelBodyColor}); + this.statusStrip1.Location = new System.Drawing.Point(0, 428); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(800, 22); + this.statusStrip1.TabIndex = 9; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabelSpeed + // + this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed"; + this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(39, 17); + this.toolStripStatusLabelSpeed.Text = "Speed"; + // + // toolStripStatusLabelWeight + // + this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight"; + this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(45, 17); + this.toolStripStatusLabelWeight.Text = "Weight"; + // + // toolStripStatusLabelBodyColor + // + this.toolStripStatusLabelBodyColor.Name = "toolStripStatusLabelBodyColor"; + this.toolStripStatusLabelBodyColor.Size = new System.Drawing.Size(36, 17); + this.toolStripStatusLabelBodyColor.Text = "Color"; + // + // FormPlane + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.pictureBoxPlane); + this.Name = "FormPlane"; + this.Text = "Plane"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlane)).EndInit(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + + private Button buttonUp; + private Button buttonRight; + private Button buttonDown; + private Button buttonLeft; + private Button buttonCreate; + private PictureBox pictureBoxPlane; + private StatusStrip statusStrip1; + private ToolStripStatusLabel toolStripStatusLabelSpeed; + private ToolStripStatusLabel toolStripStatusLabelWeight; + private ToolStripStatusLabel toolStripStatusLabelBodyColor; + } +} \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/FormPlane.cs b/ProjectPlane/ProjectPlane/FormPlane.cs new file mode 100644 index 0000000..aafe51c --- /dev/null +++ b/ProjectPlane/ProjectPlane/FormPlane.cs @@ -0,0 +1,67 @@ +namespace ProjectPlane +{ + public partial class FormPlane : Form + { + private DrawingPlane _plane; + + + public FormPlane() + { + InitializeComponent(); + } + /// + /// + /// + private void Draw() + { + Bitmap bmp = new(pictureBoxPlane.Width, pictureBoxPlane.Height); + Graphics gr = Graphics.FromImage(bmp); + _plane?.DrawTransport(gr); + pictureBoxPlane.Image = bmp; + } + /// + /// "" + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + // + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _plane?.MoveTransport(Direction.Up); + break; + case "buttonDown": + _plane?.MoveTransport(Direction.Down); + break; + case "buttonLeft": + _plane?.MoveTransport(Direction.Left); + break; + case "buttonRight": + _plane?.MoveTransport(Direction.Right); + break; + } + Draw(); + } + private void buttonCreate_Click(object sender, EventArgs e) + { + Random rand = new Random(); + _plane = new DrawingPlane(); + _plane.Init(rand.Next(200, 500), rand.Next(2000, 3000), + Color.FromArgb(rand.Next(0, 256), rand.Next(0, 256), rand.Next(0, 256))); + _plane.SetPosition(rand.Next(5, 100), rand.Next(40, 100), + pictureBoxPlane.Width, pictureBoxPlane.Height); + toolStripStatusLabelSpeed.Text = $"Speed: {_plane.Plane.Speed}"; + toolStripStatusLabelWeight.Text = $"Weiht: {_plane.Plane.Weight}"; + toolStripStatusLabelBodyColor.Text = $"Color: {_plane.Plane.BodyColor.Name}"; + Draw(); + } + private void PictureBoxCar_Resize(object sender, EventArgs e) + { + _plane?.ChangeBorders(pictureBoxPlane.Width, pictureBoxPlane.Height); + Draw(); + } + } +} \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/FormPlane.resx b/ProjectPlane/ProjectPlane/FormPlane.resx new file mode 100644 index 0000000..5cb320f --- /dev/null +++ b/ProjectPlane/ProjectPlane/FormPlane.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/Program.cs b/ProjectPlane/ProjectPlane/Program.cs index 26c242a..23d8582 100644 --- a/ProjectPlane/ProjectPlane/Program.cs +++ b/ProjectPlane/ProjectPlane/Program.cs @@ -9,7 +9,7 @@ namespace ProjectPlane static void Main() { ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + Application.Run(new FormPlane()); } } } \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/ProjectPlane.csproj b/ProjectPlane/ProjectPlane/ProjectPlane.csproj index b57c89e..13ee123 100644 --- a/ProjectPlane/ProjectPlane/ProjectPlane.csproj +++ b/ProjectPlane/ProjectPlane/ProjectPlane.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/Properties/Resources.Designer.cs b/ProjectPlane/ProjectPlane/Properties/Resources.Designer.cs new file mode 100644 index 0000000..59b67e2 --- /dev/null +++ b/ProjectPlane/ProjectPlane/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectPlane.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("ProjectPlane.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/ProjectPlane/ProjectPlane/Properties/Resources.resx b/ProjectPlane/ProjectPlane/Properties/Resources.resx new file mode 100644 index 0000000..3d5a144 --- /dev/null +++ b/ProjectPlane/ProjectPlane/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.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\left.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\right.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\up.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ProjectPlane/ProjectPlane/Resources/down.jpg b/ProjectPlane/ProjectPlane/Resources/down.jpg new file mode 100644 index 0000000..82d98a3 Binary files /dev/null and b/ProjectPlane/ProjectPlane/Resources/down.jpg differ diff --git a/ProjectPlane/ProjectPlane/Resources/left.jpg b/ProjectPlane/ProjectPlane/Resources/left.jpg new file mode 100644 index 0000000..19b72f1 Binary files /dev/null and b/ProjectPlane/ProjectPlane/Resources/left.jpg differ diff --git a/ProjectPlane/ProjectPlane/Resources/right.jpg b/ProjectPlane/ProjectPlane/Resources/right.jpg new file mode 100644 index 0000000..4c01f2d Binary files /dev/null and b/ProjectPlane/ProjectPlane/Resources/right.jpg differ diff --git a/ProjectPlane/ProjectPlane/Resources/up.jpg b/ProjectPlane/ProjectPlane/Resources/up.jpg new file mode 100644 index 0000000..04d65e0 Binary files /dev/null and b/ProjectPlane/ProjectPlane/Resources/up.jpg differ