diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs new file mode 100644 index 0000000..4d71b10 --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + public enum DirectionType + { + Up = 1, + Down = 2, + Left = 3, + Right = 4, + } +} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawingElectricLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawingElectricLocomotive.cs new file mode 100644 index 0000000..f178e4f --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawingElectricLocomotive.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + public class DrawingElectricLocomotive + { + public EntityElectricLocomotive? EntityElectricLocomotive; + + private int _pictureWidth; + private int _pictureHeight; + private int _startPosX; + private int _startPosY; + private readonly int _locoWidth = 150; + private readonly int _locoHeight = 50; + + public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool horns, bool seifbatteries, + int width, int height) + { + + if (width < _locoWidth || height < _locoHeight) + { + return false; + } + _pictureWidth = width; + _pictureHeight = height; + EntityElectricLocomotive = new EntityElectricLocomotive(); + EntityElectricLocomotive.Init(speed, weight, bodyColor, additionalColor, horns, seifbatteries); + return true; + } + + public void SetPosition(int x, int y) + { + if (x < 0 || x + _locoWidth > _pictureWidth) + { + x = 20; + } + if (y < 0 || y + _locoHeight > _pictureHeight) + { + y = 20; + } + _startPosX = x; + _startPosY = y; + } + + public void MoveTransport(DirectionType direction) + { + if (EntityElectricLocomotive == null) + { + return; + } + switch (direction) + { + case DirectionType.Left: + if (_startPosX - EntityElectricLocomotive.Step > 0) + { + _startPosX -= (int)EntityElectricLocomotive.Step; + } + break; + case DirectionType.Up: + if (_startPosY - EntityElectricLocomotive.Step > 0) + { + _startPosY -= (int)EntityElectricLocomotive.Step; + } + break; + case DirectionType.Right: + if (_startPosX + EntityElectricLocomotive.Step + _locoWidth < _pictureWidth) + { + _startPosX += (int)EntityElectricLocomotive.Step; + } + break; + case DirectionType.Down: + if (_startPosY + EntityElectricLocomotive.Step + _locoHeight < _pictureHeight) + { + _startPosY += (int)EntityElectricLocomotive.Step; + } + break; + } + } + public void DrawTransport(Graphics g) + { + if (EntityElectricLocomotive == null) + { + return; + } + + Pen pen = new(Color.Black); + Brush blackBrush = new SolidBrush(Color.Black); + Brush windows = new SolidBrush(Color.LightBlue); + Brush bodyColor = new SolidBrush(EntityElectricLocomotive.BodyColor); + Brush additionalBrush = new SolidBrush(EntityElectricLocomotive.AdditionalColor); + + if (EntityElectricLocomotive.Horns) + { + //horns + g.FillRectangle(blackBrush, _startPosX + 30, _startPosY + 15, 20, 5); + g.DrawLine(pen, _startPosX + 40, _startPosY + 15, _startPosX + 50, _startPosY + 10); + g.DrawLine(pen, _startPosX + 50, _startPosY + 10, _startPosX + 45, _startPosY); + g.DrawLine(pen, _startPosX + 45, _startPosY + 15, _startPosX + 50, _startPosY + 10); + g.DrawLine(pen, _startPosX + 50, _startPosY + 10, _startPosX + 40, _startPosY); + } + + //локомотив + g.FillPolygon(bodyColor, new Point[] + { + new Point(_startPosX, _startPosY + 40), + new Point(_startPosX, _startPosY + 30), + new Point(_startPosX + 20, _startPosY + 20), + new Point(_startPosX + 70, _startPosY + 20), + new Point(_startPosX +80, _startPosY + 30), + new Point(_startPosX +80, _startPosY + 40), + new Point(_startPosX +75, _startPosY + 45), + new Point(_startPosX +5, _startPosY + 45), + new Point(_startPosX, _startPosY + 40), + } + ); + + if (EntityElectricLocomotive.Seifbatteries) + { + g.DrawPolygon(pen, new Point[] + { + new Point(_startPosX + 40, _startPosY + 25), + new Point(_startPosX + 65, _startPosY + 25), + new Point(_startPosX + 65, _startPosY + 35), + new Point(_startPosX + 40, _startPosY + 35), + new Point(_startPosX + 40, _startPosY + 25), + } + ); + } + + g.DrawPolygon(pen, new Point[] + { + new Point(_startPosX, _startPosY + 40), + new Point(_startPosX, _startPosY + 30), + new Point(_startPosX + 20, _startPosY + 20), + new Point(_startPosX + 70, _startPosY + 20), + new Point(_startPosX +80, _startPosY + 30), + new Point(_startPosX +80, _startPosY + 40), + new Point(_startPosX +75, _startPosY + 45), + new Point(_startPosX +5, _startPosY + 45), + new Point(_startPosX, _startPosY + 40), + } + ); + + //окошки + g.FillPolygon(windows, new Point[] + { + new Point(_startPosX + 10, _startPosY + 30), + new Point(_startPosX +15, _startPosY + 25), + new Point(_startPosX + 20, _startPosY + 25), + new Point(_startPosX + 20, _startPosY + 30), + new Point(_startPosX +10, _startPosY + 30), + } + ); + + g.DrawPolygon(pen, new Point[] + { + new Point(_startPosX + 10, _startPosY + 30), + new Point(_startPosX +15, _startPosY + 25), + new Point(_startPosX + 20, _startPosY + 25), + new Point(_startPosX + 20, _startPosY + 30), + new Point(_startPosX +10, _startPosY + 30), + } + ); + + g.FillRectangle(windows, _startPosX + 25, _startPosY + 25, 10, 5); + g.DrawRectangle(pen, _startPosX + 25, _startPosY + 25, 10, 5); + + //обязательные колеса + //loco + g.FillEllipse(blackBrush, _startPosX + 10, _startPosY + 45, 5, 5); + g.FillEllipse(blackBrush, _startPosX + 25, _startPosY + 45, 5, 5); + g.FillEllipse(blackBrush, _startPosX + 50, _startPosY + 45, 5, 5); + g.FillEllipse(blackBrush, _startPosX + 65, _startPosY + 45, 5, 5); + + //telega + g.FillEllipse(blackBrush, _startPosX + 95, _startPosY + 45, 5, 5); + g.FillEllipse(blackBrush, _startPosX + 140, _startPosY + 45, 5, 5); + + g.FillEllipse(blackBrush, _startPosX + 130, _startPosY + 45, 5, 5); + g.FillEllipse(blackBrush, _startPosX + 105, _startPosY + 45, 5, 5); + + //telejka + g.FillPolygon(additionalBrush, new Point[] + { + new Point(_startPosX + 90, _startPosY + 25), + new Point(_startPosX + 95, _startPosY + 20), + new Point(_startPosX + 145, _startPosY + 20), + new Point(_startPosX + 150, _startPosY + 25), + new Point(_startPosX + 150, _startPosY + 45), + new Point(_startPosX + 90, _startPosY + 45), + new Point(_startPosX + 90, _startPosY + 25), + } + ); + + g.DrawPolygon(pen, new Point[] + { + new Point(_startPosX + 90, _startPosY + 25), + new Point(_startPosX + 95, _startPosY + 20), + new Point(_startPosX + 145, _startPosY + 20), + new Point(_startPosX + 150, _startPosY + 25), + new Point(_startPosX + 150, _startPosY + 45), + new Point(_startPosX + 90, _startPosY + 45), + new Point(_startPosX + 90, _startPosY + 25), + } + ); + //телега окна + g.DrawLine(pen, _startPosX + 80, _startPosY + 40, _startPosX + 90, _startPosY + 40); + g.FillRectangle(windows, _startPosX + 95, _startPosY + 30, 10, 5); + g.FillRectangle(windows, _startPosX + 115, _startPosY + 30, 10, 5); + g.FillRectangle(windows, _startPosX + 135, _startPosY + 30, 10, 5); + } + } +} \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs new file mode 100644 index 0000000..10b503e --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + public class EntityElectricLocomotive + { + 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 Horns { get; private set; } + public bool Seifbatteries { get; private set; } + public double Step => (double)Speed * 100 / Weight; + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool horns, bool seifbatteries) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Horns = horns; + Seifbatteries = seifbatteries; + } + + } +} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.Designer.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.Designer.cs deleted file mode 100644 index 6cd3a18..0000000 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectElectricLocomotive -{ - 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/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs deleted file mode 100644 index eb6a0ea..0000000 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectElectricLocomotive -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs new file mode 100644 index 0000000..be16dad --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs @@ -0,0 +1,139 @@ +namespace ElectricLocomotive +{ + partial class ElectricLocomotive + { + /// + /// 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.pictureBoxElectricLocomotive = new System.Windows.Forms.PictureBox(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + this.buttonUp = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxElectricLocomotive)).BeginInit(); + this.SuspendLayout(); + // + // pictureBoxElectricLocomotive + // + this.pictureBoxElectricLocomotive.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxElectricLocomotive.Location = new System.Drawing.Point(0, 0); + this.pictureBoxElectricLocomotive.Name = "pictureBoxElectricLocomotive"; + this.pictureBoxElectricLocomotive.Size = new System.Drawing.Size(533, 465); + this.pictureBoxElectricLocomotive.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBoxElectricLocomotive.TabIndex = 0; + this.pictureBoxElectricLocomotive.TabStop = false; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonCreate.Font = new System.Drawing.Font("Candara Light", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.buttonCreate.Location = new System.Drawing.Point(16, 395); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(111, 52); + this.buttonCreate.TabIndex = 1; + this.buttonCreate.Text = "Создать"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); + // + // buttonLeft + // + this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonLeft.BackgroundImage = global::ProjectElectricLocomotive.Properties.Resources.arrowLeft; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonLeft.Location = new System.Drawing.Point(389, 417); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(30, 30); + this.buttonLeft.TabIndex = 2; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonUp + // + this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUp.BackgroundImage = global::ProjectElectricLocomotive.Properties.Resources.arrowUP; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonUp.Location = new System.Drawing.Point(435, 368); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(30, 30); + this.buttonUp.TabIndex = 3; + this.buttonUp.UseVisualStyleBackColor = true; + this.buttonUp.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonRight + // + this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRight.BackgroundImage = global::ProjectElectricLocomotive.Properties.Resources.arrowRight; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonRight.Location = new System.Drawing.Point(479, 417); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(30, 30); + this.buttonRight.TabIndex = 4; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonDown + // + this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonDown.BackgroundImage = global::ProjectElectricLocomotive.Properties.Resources.arrowDown; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonDown.Location = new System.Drawing.Point(435, 417); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(30, 30); + this.buttonDown.TabIndex = 5; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.Click += new System.EventHandler(this.buttonMove_Click); + // + // ElectricLocomotive + // + this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(533, 465); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.pictureBoxElectricLocomotive); + this.Name = "ElectricLocomotive"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "ElectricLocomotive"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxElectricLocomotive)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private PictureBox pictureBoxElectricLocomotive; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonUp; + private Button buttonRight; + private Button buttonDown; + } +} \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.cs new file mode 100644 index 0000000..899ccee --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.cs @@ -0,0 +1,61 @@ +namespace ElectricLocomotive +{ + public partial class ElectricLocomotive : Form + { + private DrawingElectricLocomotive? _drawingElectricLocomotive; + public ElectricLocomotive() + { + InitializeComponent(); + } + + private void Draw() + { + if (_drawingElectricLocomotive == null) + { + return; + } + Bitmap bmp = new(pictureBoxElectricLocomotive.Width, pictureBoxElectricLocomotive.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawingElectricLocomotive.DrawTransport(gr); + pictureBoxElectricLocomotive.Image = bmp; + } + + private void buttonCreate_Click(object sender, EventArgs e) + { + Random rnd = new Random(); + _drawingElectricLocomotive = new DrawingElectricLocomotive(); + _drawingElectricLocomotive.Init(rnd.Next(100, 300), rnd.Next(1000, 3000), + Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)), + Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)), + Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)), + pictureBoxElectricLocomotive.Width, pictureBoxElectricLocomotive.Height); + _drawingElectricLocomotive.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100)); + Draw(); + } + + private void buttonMove_Click(object sender, EventArgs e) + { + if (_drawingElectricLocomotive == null) + { + return; + } + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _drawingElectricLocomotive.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + _drawingElectricLocomotive.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + _drawingElectricLocomotive.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + _drawingElectricLocomotive.MoveTransport(DirectionType.Right); + break; + } + Draw(); + } + } +} \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs index 9a38110..cfc9721 100644 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs @@ -1,4 +1,4 @@ -namespace ProjectElectricLocomotive +namespace ElectricLocomotive { internal static class Program { @@ -11,7 +11,7 @@ namespace ProjectElectricLocomotive // 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 ElectricLocomotive()); } } } \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj b/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj index b57c89e..13ee123 100644 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Properties/Resources.Designer.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2078663 --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectElectricLocomotive.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("ProjectElectricLocomotive.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 arrowDown { + get { + object obj = ResourceManager.GetObject("arrowDown", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowLeft { + get { + object obj = ResourceManager.GetObject("arrowLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowRight { + get { + object obj = ResourceManager.GetObject("arrowRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowUP { + get { + object obj = ResourceManager.GetObject("arrowUP", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Properties/Resources.resx b/ProjectElectricLocomotive/ProjectElectricLocomotive/Properties/Resources.resx new file mode 100644 index 0000000..0170beb --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/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\arrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowUP.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowDown.png b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowDown.png new file mode 100644 index 0000000..17a85d2 Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowDown.png differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowLeft.png b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowLeft.png new file mode 100644 index 0000000..3162784 Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowLeft.png differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowRight.png b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowRight.png new file mode 100644 index 0000000..08e4399 Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowRight.png differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowUP.png b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowUP.png new file mode 100644 index 0000000..3355b16 Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/arrowUP.png differ