diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs new file mode 100644 index 0000000..7b29eff --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/DirectionType.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectElectricLocomotive; + +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 +} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawningElectricLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawningElectricLocomotive.cs new file mode 100644 index 0000000..365e287 --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/DrawningElectricLocomotive.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Metadata.Ecma335; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectElectricLocomotive; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningElectricLocomotive +{ + /// + /// класс-сущность + /// + public EntityElectricLocomotive? entityElectricLocomotive { get; private set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки электровоза + /// + private int? _startPosX; + + /// + /// Верхняя кооридната прорисовки электровоза + /// + private int? _startPosY; + + /// + /// Ширина прорисовки электровоза + /// + private readonly int _drawningEntityElectricLocomotiveWidth = 100; + + /// + /// Высота прорисовки электровоза + /// + private readonly int _drawningEntityElectricLocomotiveHeight = 60; + + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия рогов + /// Признак наличия отсека + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool horns, bool compartment) + { + entityElectricLocomotive = new EntityElectricLocomotive(); + entityElectricLocomotive.Init(speed, weight, bodyColor, additionalColor, horns, compartment); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // проверка, что объект "влезает" в размеры поля + if (width <= 0 || height <= 0) return false; + if (_drawningEntityElectricLocomotiveWidth > width || _drawningEntityElectricLocomotiveHeight > height) return false; + + // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена + _pictureWidth = width; + _pictureHeight = height; + return true; + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) return; + if (x < 0 || y < 0 || + x + _drawningEntityElectricLocomotiveWidth > _pictureWidth || + y + _drawningEntityElectricLocomotiveHeight > _pictureHeight) return; + + _startPosX = x; + _startPosY = y; + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (entityElectricLocomotive == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - entityElectricLocomotive.Step > 0) + { + _startPosX -= (int)entityElectricLocomotive.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - entityElectricLocomotive.Step > 0) + { + _startPosY -= (int)entityElectricLocomotive.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + entityElectricLocomotive.Step + _drawningEntityElectricLocomotiveWidth < _pictureWidth) + { + _startPosX += (int)entityElectricLocomotive.Step; + } + return true; + //вниз + case DirectionType.Down: + if (_startPosY.Value + entityElectricLocomotive.Step + _drawningEntityElectricLocomotiveHeight < _pictureHeight) + { + _startPosY += (int)entityElectricLocomotive.Step; + } + return true; + default: + return false; + } + } + + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (entityElectricLocomotive == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(entityElectricLocomotive.AdditionalColor); + + // рога для подключения к проводам + if (entityElectricLocomotive.Horns) + { + g.FillRectangle(additionalBrush, _startPosX.Value + 38, _startPosY.Value + 50, 20, 11); + } + + // отсек под электрические батареи + if (entityElectricLocomotive.Compartment) + { + g.FillRectangle(additionalBrush, _startPosX.Value + 18, _startPosY.Value + 0, 32, 2); + g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 15, _startPosX.Value + 35, _startPosY.Value + 2); + } + + + //границы Электровоза + g.DrawEllipse(pen, _startPosX.Value + 70, _startPosY.Value + 15, 20, 20); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 15, 67, 20); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 28, 80, 23); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 22, 6, 29); + + //переходный тамбур + Brush brBlack = new SolidBrush(Color.Black); + g.FillRectangle(brBlack, _startPosX.Value + 5, _startPosY.Value + 22, 6, 29); + + //лобовое стекло + Brush brBlue = new SolidBrush(Color.Blue); + g.FillEllipse(brBlue, _startPosX.Value + 70, _startPosY.Value + 15, 20, 20); + + //кузов + Brush br = new SolidBrush(entityElectricLocomotive.BodyColor); + g.FillRectangle(br, _startPosX.Value + 10, _startPosY.Value + 15, 67, 20); + g.FillRectangle(br, _startPosX.Value + 10, _startPosY.Value + 28, 80, 23); + + //стёкла + g.FillRectangle(brBlue, _startPosX.Value + 14, _startPosY.Value + 15, 10, 20); + g.FillRectangle(brBlue, _startPosX.Value + 45, _startPosY.Value + 15, 10, 20); + g.FillRectangle(brBlue, _startPosX.Value + 55, _startPosY.Value + 15, 10, 20); + g.FillRectangle(brBlue, _startPosX.Value + 77, _startPosY.Value + 25, 13, 10); + + //дверь + g.DrawRectangle(pen, _startPosX.Value + 26, _startPosY.Value + 16, 15, 33); + g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 35, 5, 2); + + //колеса + g.FillEllipse(brBlack, _startPosX.Value + 10, _startPosY.Value + 50, 12, 12); + g.FillEllipse(brBlack, _startPosX.Value + 24, _startPosY.Value + 50, 12, 12); + g.FillEllipse(brBlack, _startPosX.Value + 60, _startPosY.Value + 50, 12, 12); + g.FillEllipse(brBlack, _startPosX.Value + 74, _startPosY.Value + 50, 12, 12); + g.DrawLine(pen, _startPosX.Value + 15, _startPosY.Value + 50, _startPosX.Value + 0, _startPosY.Value + 55); + g.DrawLine(pen, _startPosX.Value + 80, _startPosY.Value + 50, _startPosX.Value + 105, _startPosY.Value + 55); + } +} \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs new file mode 100644 index 0000000..8510bda --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityElectricLocomotive.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectElectricLocomotive; + +/// +/// класс-сущность "Электровоз" +/// +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 Compartment { get; private set; } + /// + /// шаг перемещение + /// + public double Step => Speed*100 / Weight; + /// + /// + /// + /// + /// + /// + /// + /// + /// + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool horns, bool compartment) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Horns = horns; + Compartment = compartment; + } +} + diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.Designer.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.Designer.cs deleted file mode 100644 index 87b464a..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 - } -} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs deleted file mode 100644 index dfcdcdb..0000000 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectElectricLocomotive -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs new file mode 100644 index 0000000..75c305d --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.Designer.cs @@ -0,0 +1,138 @@ +namespace ProjectElectricLocomotive +{ + partial class FormElectricLocomotive + { + /// + /// 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() + { + saveFileDialog1 = new SaveFileDialog(); + pictureBoxElectricLocomotive = new PictureBox(); + buttonCreate = new Button(); + buttonLeft = new Button(); + buttonRight = new Button(); + buttonUp = new Button(); + buttonDown = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxElectricLocomotive).BeginInit(); + SuspendLayout(); + // + // pictureBoxElectricLocomotive + // + pictureBoxElectricLocomotive.Dock = DockStyle.Fill; + pictureBoxElectricLocomotive.Location = new Point(0, 0); + pictureBoxElectricLocomotive.Name = "pictureBoxElectricLocomotive"; + pictureBoxElectricLocomotive.Size = new Size(820, 429); + pictureBoxElectricLocomotive.TabIndex = 0; + pictureBoxElectricLocomotive.TabStop = false; + pictureBoxElectricLocomotive.Click += ButtonMove_Click; + // + // buttonCreate + // + buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreate.Location = new Point(12, 388); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(94, 29); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += ButtonCreate_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.стрелка_влево; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(685, 382); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.стрелка_вправо; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(767, 382); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 3; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.AllowDrop = true; + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.стрелка_вверх; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(726, 341); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 4; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.стрелка_вниз; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(726, 382); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 5; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // FormElectricLocomotive + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(820, 429); + Controls.Add(buttonDown); + Controls.Add(buttonUp); + Controls.Add(buttonRight); + Controls.Add(buttonLeft); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxElectricLocomotive); + Name = "FormElectricLocomotive"; + Text = "Электровоз"; + ((System.ComponentModel.ISupportInitialize)pictureBoxElectricLocomotive).EndInit(); + ResumeLayout(false); + } + + #endregion + + private SaveFileDialog saveFileDialog1; + private PictureBox pictureBoxElectricLocomotive; + private Button buttonCreate; + private Button buttonLeft; + private Button buttonRight; + private Button buttonUp; + 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..400358b --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ProjectElectricLocomotive; +/// +/// "Форма работы с объектом "Электровоз" +/// + +public partial class FormElectricLocomotive : Form +{ + /// + /// Поле-объект для прорисовки объекта + /// + private DrawningElectricLocomotive? _drawningElectricLocomotive; + + /// + /// Конструктор формы + /// + public FormElectricLocomotive() + { + InitializeComponent(); + } + + private void Draw() + { + if (_drawningElectricLocomotive == null) + { + return; + } + + Bitmap bmp = new(pictureBoxElectricLocomotive.Width, pictureBoxElectricLocomotive.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningElectricLocomotive.DrawTransport(gr); + pictureBoxElectricLocomotive.Image = bmp; + } + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void ButtonCreate_Click(object sender, EventArgs e) + { + Random random = new(); + _drawningElectricLocomotive = new DrawningElectricLocomotive(); + _drawningElectricLocomotive.Init(random.Next(100, 300), random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); + _drawningElectricLocomotive.SetPictureSize(pictureBoxElectricLocomotive.Width, pictureBoxElectricLocomotive.Height); + _drawningElectricLocomotive.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Draw(); + } + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningElectricLocomotive == null) + { + return; + } + + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningElectricLocomotive.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningElectricLocomotive.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningElectricLocomotive.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningElectricLocomotive.MoveTransport(DirectionType.Right); + break; + } + + if (result) + { + Draw(); + } + } +} diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.resx b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx similarity index 88% rename from ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.resx rename to ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx index 1af7de1..f05556c 100644 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Form1.resx +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/FormElectricLocomotive.resx @@ -1,17 +1,17 @@  - @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 51 + \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs index 9a38110..ddb490c 100644 --- a/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/Program.cs @@ -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 FormElectricLocomotive()); } } } \ No newline at end of file diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj b/ProjectElectricLocomotive/ProjectElectricLocomotive/ProjectElectricLocomotive.csproj index 663fdb8..af03d74 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..aa20c83 --- /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 стрелка_вверх { + get { + object obj = ResourceManager.GetObject("стрелка вверх", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap стрелка_влево { + get { + object obj = ResourceManager.GetObject("стрелка влево", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap стрелка_вниз { + get { + object obj = ResourceManager.GetObject("стрелка вниз", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap стрелка_вправо { + get { + object obj = ResourceManager.GetObject("стрелка вправо", 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..dd0c350 --- /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\стрелка вверх.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\стрелка влево.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\стрелка вправо.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\стрелка вниз.jpg;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/стрелка вверх.jpg b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вверх.jpg new file mode 100644 index 0000000..d2cd62a Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вверх.jpg differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка влево.jpg b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка влево.jpg new file mode 100644 index 0000000..1d395ad Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка влево.jpg differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вниз.jpg b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вниз.jpg new file mode 100644 index 0000000..e626726 Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вниз.jpg differ diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вправо.jpg b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вправо.jpg new file mode 100644 index 0000000..388f1cf Binary files /dev/null and b/ProjectElectricLocomotive/ProjectElectricLocomotive/Resources/стрелка вправо.jpg differ