diff --git a/ElectricLocomotive/ElectricLocomotive/Direction.cs b/ElectricLocomotive/ElectricLocomotive/Direction.cs new file mode 100644 index 0000000..dc9f4a2 --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/Direction.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/ElectricLocomotive/ElectricLocomotive/DrawningLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/DrawningLocomotive.cs new file mode 100644 index 0000000..9da4c01 --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/DrawningLocomotive.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + internal class DrawningLocomotive + { + /// + /// Класс-сущность + /// + public EntityLocomotive Locomotive { get; private set; } + /// + /// Левая координата отрисовки автомобиля + /// + private float _startPosX; + /// + /// Верхняя кооридната отрисовки автомобиля + /// + private float _startPosY; + /// + /// Ширина окна отрисовки + /// + private int? _pictureWidth = null; + /// + /// Высота окна отрисовки + /// + private int? _pictureHeight = null; + /// + /// Ширина отрисовки автомобиля + /// + private readonly int _locomotiveWidth = 160; + /// + /// Высота отрисовки автомобиля + /// + private readonly int _locomotiveHeight = 90; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес автомобиля + /// Цвет кузова + public void Init(int speed, float weight, Color bodyColor) + { + Locomotive = new EntityLocomotive(); + Locomotive.Init(speed, weight, bodyColor); + } + /// + /// Установка позиции автомобиля + /// + /// Координата X + /// Координата Y + /// Ширина картинки + /// Высота картинки + public void SetPosition(int x, int y, int width, int height) + { + // TODO checks + + _startPosX = x; + _startPosY = y; + _pictureWidth = width; + _pictureHeight = height; + + if (_startPosX + _locomotiveWidth > _pictureWidth) { _startPosX = 20; } + if (_startPosY - _locomotiveHeight / 2 < 0) { _startPosY = _locomotiveHeight + 10; } + if (_startPosY + _locomotiveHeight > _pictureHeight) { _startPosY -= _locomotiveHeight; } + } + /// + /// Изменение направления пермещения + /// + /// Направление + public void MoveTransport(Direction direction) + { + if (!_pictureWidth.HasValue || !_pictureHeight.HasValue) + { + return; + } + switch (direction) + { + // вправо + case Direction.Right: + if (_startPosX + _locomotiveWidth + Locomotive.Step < _pictureWidth) + { + _startPosX += Locomotive.Step; + } + break; + //влево + case Direction.Left: + if(_startPosX - Locomotive.Step > 0) + { + _startPosX -= Locomotive.Step; + } + break; + //вверх + case Direction.Up: + if(_startPosY - Locomotive.Step - 30 > 0) + { + _startPosY -= Locomotive.Step; + } + break; + //вниз + case Direction.Down: + if (_startPosY + _locomotiveHeight + Locomotive.Step < _pictureHeight) + { + _startPosY += Locomotive.Step; + } + break; + } + } + /// + /// Отрисовка автомобиля + /// + /// + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + Brush brBody = new SolidBrush(Locomotive?.BodyColor ?? Color.Black); + Pen pen = new Pen(Color.Black); + //колёса + g.FillEllipse(brBody, _startPosX + 10, _startPosY + 50, 30, 30); + g.FillEllipse(brBody, _startPosX + 50, _startPosY + 50, 30, 30); + g.FillEllipse(brBody, _startPosX + 90, _startPosY + 50, 30, 30); + g.FillEllipse(brBody, _startPosX + 130, _startPosY + 50, 30, 30); + + g.DrawEllipse(pen, _startPosX + 10, _startPosY + 50, 30, 30); + g.DrawEllipse(pen, _startPosX + 50, _startPosY + 50, 30, 30); + g.DrawEllipse(pen, _startPosX + 90, _startPosY + 50, 30, 30); + g.DrawEllipse(pen, _startPosX + 130, _startPosY + 50, 30, 30); + + g.FillRectangle(brBody, _startPosX + 10, _startPosY + 20, 150, 30); + g.FillRectangle(brBody, _startPosX + 10, _startPosY - 20, 40, 40); + g.FillRectangle(brBody, _startPosX + 100, _startPosY - 20, 10, 40); + g.DrawRectangle(pen, _startPosX + 10, _startPosY + 20, 150, 30); + g.DrawRectangle(pen, _startPosX + 10, _startPosY - 20, 40, 40); + g.DrawRectangle(pen, _startPosX + 100, _startPosY - 20, 10, 40); + } + /// + /// Смена границ формы отрисовки + /// + /// Ширина картинки + /// Высота картинки + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_pictureWidth <= _locomotiveWidth || _pictureHeight <= _locomotiveHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + if (_startPosX + _locomotiveWidth > _pictureWidth) + { + _startPosX = _pictureWidth.Value - _locomotiveWidth; + } + if (_startPosY + _locomotiveHeight > _pictureHeight) + { + _startPosY = _pictureHeight.Value - _locomotiveHeight; + } + } + } +} + diff --git a/ElectricLocomotive/ElectricLocomotive/ElectricLocomotive.csproj b/ElectricLocomotive/ElectricLocomotive/ElectricLocomotive.csproj index b57c89e..13ee123 100644 --- a/ElectricLocomotive/ElectricLocomotive/ElectricLocomotive.csproj +++ b/ElectricLocomotive/ElectricLocomotive/ElectricLocomotive.csproj @@ -8,4 +8,19 @@ enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ElectricLocomotive/ElectricLocomotive/EntityLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/EntityLocomotive.cs new file mode 100644 index 0000000..a49bec0 --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/EntityLocomotive.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectricLocomotive +{ + internal class EntityLocomotive + { + /// + /// Скорость + /// + 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 Random(); + Speed = speed <= 0 ? rnd.Next(40, 120) : speed; + Weight = weight <= 0 ? rnd.Next(150, 200) : weight; + BodyColor = bodyColor; + } + } + } diff --git a/ElectricLocomotive/ElectricLocomotive/Form1.Designer.cs b/ElectricLocomotive/ElectricLocomotive/Form1.Designer.cs deleted file mode 100644 index 370aa92..0000000 --- a/ElectricLocomotive/ElectricLocomotive/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ElectricLocomotive -{ - 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/ElectricLocomotive/ElectricLocomotive/Form1.cs b/ElectricLocomotive/ElectricLocomotive/Form1.cs deleted file mode 100644 index e2660af..0000000 --- a/ElectricLocomotive/ElectricLocomotive/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ElectricLocomotive -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ElectricLocomotive/ElectricLocomotive/FormLocomotive.Designer.cs b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.Designer.cs new file mode 100644 index 0000000..25e04a5 --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.Designer.cs @@ -0,0 +1,186 @@ +namespace ElectricLocomotive +{ + partial class FormLocomotive + { + /// + /// 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.ButtonCreate = new System.Windows.Forms.Button(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelColor = new System.Windows.Forms.ToolStripStatusLabel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.buttonLeft = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonUp = new System.Windows.Forms.Button(); + this.statusStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // ButtonCreate + // + this.ButtonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.ButtonCreate.AutoSize = true; + this.ButtonCreate.Location = new System.Drawing.Point(12, 396); + this.ButtonCreate.Name = "ButtonCreate"; + this.ButtonCreate.Size = new System.Drawing.Size(75, 25); + this.ButtonCreate.TabIndex = 0; + this.ButtonCreate.Text = "Создать"; + this.ButtonCreate.UseVisualStyleBackColor = true; + this.ButtonCreate.Click += new System.EventHandler(this.ButtonCreate_Click); + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabelSpeed, + this.toolStripStatusLabelWeight, + this.toolStripStatusLabelColor}); + 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 = 1; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabelSpeed + // + this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed"; + this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(59, 17); + this.toolStripStatusLabelSpeed.Text = "Скорость"; + // + // toolStripStatusLabelWeight + // + this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight"; + this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(26, 17); + this.toolStripStatusLabelWeight.Text = "Вес"; + // + // toolStripStatusLabelColor + // + this.toolStripStatusLabelColor.Name = "toolStripStatusLabelColor"; + this.toolStripStatusLabelColor.Size = new System.Drawing.Size(33, 17); + this.toolStripStatusLabelColor.Text = "Цвет"; + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(800, 428); + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // buttonLeft + // + this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonLeft.AutoSize = true; + this.buttonLeft.BackgroundImage = global::ElectricLocomotive.Properties.Resources.arrowleft; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonLeft.Location = new System.Drawing.Point(676, 389); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(30, 30); + this.buttonLeft.TabIndex = 3; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.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.AutoSize = true; + this.buttonDown.BackgroundImage = global::ElectricLocomotive.Properties.Resources.arrowdown; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonDown.Location = new System.Drawing.Point(712, 389); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(30, 30); + this.buttonDown.TabIndex = 4; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.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.AutoSize = true; + this.buttonRight.BackgroundImage = global::ElectricLocomotive.Properties.Resources.arrowright; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonRight.Location = new System.Drawing.Point(748, 389); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(30, 30); + this.buttonRight.TabIndex = 5; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.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.AutoSize = true; + this.buttonUp.BackgroundImage = global::ElectricLocomotive.Properties.Resources.arrowup; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.buttonUp.Location = new System.Drawing.Point(712, 353); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(30, 30); + this.buttonUp.TabIndex = 6; + this.buttonUp.UseVisualStyleBackColor = true; + this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click); + // + // FormLocomotive + // + 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.buttonUp); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.ButtonCreate); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.statusStrip1); + this.Name = "FormLocomotive"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Локомотив"; + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private Button ButtonCreate; + private StatusStrip statusStrip1; + private ToolStripStatusLabel toolStripStatusLabelSpeed; + private ToolStripStatusLabel toolStripStatusLabelWeight; + private ToolStripStatusLabel toolStripStatusLabelColor; + private PictureBox pictureBox1; + private Button buttonLeft; + private Button buttonDown; + private Button buttonRight; + private Button buttonUp; + } +} \ No newline at end of file diff --git a/ElectricLocomotive/ElectricLocomotive/FormLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.cs new file mode 100644 index 0000000..d885b9c --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.cs @@ -0,0 +1,85 @@ +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 ElectricLocomotive +{ + public partial class FormLocomotive : Form + { + private DrawningLocomotive _locomotive; + public FormLocomotive() + { + InitializeComponent(); + } + + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random rnd = new(); + _locomotive = new DrawningLocomotive(); + _locomotive.Init(rnd.Next(40, 120), rnd.Next(1500, 2000), + Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + _locomotive.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), + pictureBox1.Width, pictureBox1.Height); + toolStripStatusLabelSpeed.Text = $"Скорость: {_locomotive.Locomotive.Speed}"; + toolStripStatusLabelWeight.Text = $"Вес: {_locomotive.Locomotive.Weight}"; + toolStripStatusLabelColor.Text = $"Цвет:{_locomotive.Locomotive.BodyColor.Name}"; + Draw(); + } + + private void Draw() + { + Bitmap bmp = new(pictureBox1.Width, pictureBox1.Height); + Graphics gr = Graphics.FromImage(bmp); + _locomotive?.DrawTransport(gr); + pictureBox1.Image = bmp; + } + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + /// + /// Изменение размеров формы + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + //получаем имя кнопки + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _locomotive?.MoveTransport(Direction.Up); + break; + case "buttonDown": + _locomotive?.MoveTransport(Direction.Down); + break; + case "buttonLeft": + _locomotive?.MoveTransport(Direction.Left); + break; + case "buttonRight": + _locomotive?.MoveTransport(Direction.Right); + break; + } + Draw(); + } + /// + /// Изменение размеров формы + /// + /// + /// + private void PictureBoxCar_Resize(object sender, EventArgs e) + { + _locomotive?.ChangeBorders(pictureBox1.Width, pictureBox1.Height); + Draw(); + } + + } +} diff --git a/ElectricLocomotive/ElectricLocomotive/FormLocomotive.resx b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.resx new file mode 100644 index 0000000..5cb320f --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/FormLocomotive.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/ElectricLocomotive/ElectricLocomotive/Program.cs b/ElectricLocomotive/ElectricLocomotive/Program.cs index 107b7fb..57d3b26 100644 --- a/ElectricLocomotive/ElectricLocomotive/Program.cs +++ b/ElectricLocomotive/ElectricLocomotive/Program.cs @@ -11,7 +11,7 @@ namespace ElectricLocomotive // 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 FormLocomotive()); } } } \ No newline at end of file diff --git a/ElectricLocomotive/ElectricLocomotive/Properties/Resources.Designer.cs b/ElectricLocomotive/ElectricLocomotive/Properties/Resources.Designer.cs new file mode 100644 index 0000000..98471b9 --- /dev/null +++ b/ElectricLocomotive/ElectricLocomotive/Properties/Resources.Designer.cs @@ -0,0 +1,113 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ElectricLocomotive.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("ElectricLocomotive.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 _16691_big { + get { + object obj = ResourceManager.GetObject("16691_big", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа 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/ElectricLocomotive/ElectricLocomotive/Form1.resx b/ElectricLocomotive/ElectricLocomotive/Properties/Resources.resx similarity index 80% rename from ElectricLocomotive/ElectricLocomotive/Form1.resx rename to ElectricLocomotive/ElectricLocomotive/Properties/Resources.resx index 1af7de1..fd1c008 100644 --- a/ElectricLocomotive/ElectricLocomotive/Form1.resx +++ b/ElectricLocomotive/ElectricLocomotive/Properties/Resources.resx @@ -117,4 +117,20 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\16691_big.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowdown.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowleft.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowright.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowup.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/ElectricLocomotive/ElectricLocomotive/Resources/16691_big.jpg b/ElectricLocomotive/ElectricLocomotive/Resources/16691_big.jpg new file mode 100644 index 0000000..45a87cd Binary files /dev/null and b/ElectricLocomotive/ElectricLocomotive/Resources/16691_big.jpg differ diff --git a/ElectricLocomotive/ElectricLocomotive/Resources/arrowdown.jpg b/ElectricLocomotive/ElectricLocomotive/Resources/arrowdown.jpg new file mode 100644 index 0000000..059a0e6 Binary files /dev/null and b/ElectricLocomotive/ElectricLocomotive/Resources/arrowdown.jpg differ diff --git a/ElectricLocomotive/ElectricLocomotive/Resources/arrowleft.jpg b/ElectricLocomotive/ElectricLocomotive/Resources/arrowleft.jpg new file mode 100644 index 0000000..8de7fb1 Binary files /dev/null and b/ElectricLocomotive/ElectricLocomotive/Resources/arrowleft.jpg differ diff --git a/ElectricLocomotive/ElectricLocomotive/Resources/arrowright.jpg b/ElectricLocomotive/ElectricLocomotive/Resources/arrowright.jpg new file mode 100644 index 0000000..f891fc8 Binary files /dev/null and b/ElectricLocomotive/ElectricLocomotive/Resources/arrowright.jpg differ diff --git a/ElectricLocomotive/ElectricLocomotive/Resources/arrowup.jpg b/ElectricLocomotive/ElectricLocomotive/Resources/arrowup.jpg new file mode 100644 index 0000000..a725d1c Binary files /dev/null and b/ElectricLocomotive/ElectricLocomotive/Resources/arrowup.jpg differ