diff --git a/ProjectMotorBoat/ProjectMotorBoat/DirectionType.cs b/ProjectMotorBoat/ProjectMotorBoat/DirectionType.cs new file mode 100644 index 0000000..af7b6d7 --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/DirectionType.cs @@ -0,0 +1,24 @@ +namespace ProjectMotorBoat; + +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Вверх + /// + Up = 1, + /// + /// Вниз + /// + Down = 2, + /// + /// Влево + /// + Left = 3, + /// + /// Вправо + /// + Right = 4 +} \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/DrawingMotorBoat.cs b/ProjectMotorBoat/ProjectMotorBoat/DrawingMotorBoat.cs new file mode 100644 index 0000000..5f3e88c --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/DrawingMotorBoat.cs @@ -0,0 +1,273 @@ +using System; +using System.DirectoryServices.ActiveDirectory; + +namespace ProjectMotorBoat; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawingMotorBoat +{ + /// + /// Класс-сущность "Катер" + /// + public EntityMotorBoat? EntityMotorBoat { get; private set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки катера + /// + private int? _startPosX; + + /// + /// Верхняя кооридната прорисовки катера + /// + private int? _startPosY; + + + /// + /// Ширина прорисовки катера + /// + private readonly int _drawningBoatWidth = 100; + + /// + /// Высота прорисовки катера + /// + private readonly int _drawningBoatHeight = 50; + + /// + /// Инициализация свойств + /// + /// + /// + /// + /// + /// + /// + /// + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool inboardEngine, bool oar, bool protectiveGlass) + { + EntityMotorBoat = new EntityMotorBoat(); + EntityMotorBoat.Init(speed, weight, bodyColor, additionalColor, inboardEngine, oar, protectiveGlass); + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + // TODO проверка, что объект "влезает" в размеры поля + // если влезает, сохраняем границы и корректируем позицию объекта, если она была уже установлена ✔ + if (_drawningBoatWidth < width && _drawningBoatHeight < height) + { + _pictureWidth = width; + _pictureHeight = height; + + if (_startPosX != null && _startPosX + _drawningBoatWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _drawningBoatWidth; + } + if (_startPosY != null && _startPosY + _drawningBoatHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _drawningBoatHeight; + } + + return true; + } + return false; + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + // TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы + // то надо изменить координаты, чтобы он оставался в этих границах ✔ + if (x + _drawningBoatWidth > _pictureWidth) + { + x = (int)_pictureWidth - _drawningBoatWidth; + } + + if (y + _drawningBoatHeight > _pictureHeight) + { + y = (int)_pictureHeight - _drawningBoatHeight; + } + + if (x < 0) x = 0; + if (y < 0) y = 0; + + _startPosX = x; + _startPosY = y; + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntityMotorBoat == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntityMotorBoat.Step > 0) + { + _startPosX -= (int)EntityMotorBoat.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntityMotorBoat.Step > 0) + { + _startPosY -= (int)EntityMotorBoat.Step; + } + return true; + // вправо + case DirectionType.Right: + //TODO прописать логику сдвига в право ✔ + + if (_startPosX.Value + EntityMotorBoat.Step < _pictureWidth - _drawningBoatWidth) + { + _startPosX += (int)EntityMotorBoat.Step; + } + return true; + //вниз + case DirectionType.Down: + //TODO прописать логику сдвига в низ ✔ + + if (_startPosY.Value + EntityMotorBoat.Step < _pictureHeight - _drawningBoatHeight) + { + _startPosY += (int)EntityMotorBoat.Step; + } + return true; + default: + return false; + } + } + + /// + /// Прорисовка объекта + /// + /// + public void DrawTransport(Graphics g) + { + if (EntityMotorBoat == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(EntityMotorBoat.AdditionalColor); + Brush br = new SolidBrush(EntityMotorBoat.BodyColor); + + // Границы катера + Point[] points = + { + new Point(_startPosX.Value, _startPosY.Value + 10), + new Point(_startPosX.Value + 70, _startPosY.Value + 10), + new Point(_startPosX.Value + 100, _startPosY.Value + 25), + new Point(_startPosX.Value + 70, _startPosY.Value + 40), + new Point(_startPosX.Value, _startPosY.Value + 40), + new Point(_startPosX.Value, _startPosY.Value + 10), + }; + g.DrawLines(pen, points); + + points = new Point[] + { + new Point(_startPosX.Value + 1, _startPosY.Value + 11), + new Point(_startPosX.Value + 72, _startPosY.Value + 11), + new Point(_startPosX.Value + 99, _startPosY.Value + 25), + new Point(_startPosX.Value + 70, _startPosY.Value + 40), + new Point(_startPosX.Value + 1, _startPosY.Value + 40), + new Point(_startPosX.Value + 1, _startPosY.Value + 11), + }; + g.FillPolygon(br, points); + + // Палуба + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 20, 65, 10); + g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 15, 55, 20); + + g.FillRectangle(br, _startPosX.Value + 6, _startPosY.Value + 20, 64, 11); + g.FillRectangle(br, _startPosX.Value + 11, _startPosY.Value + 16, 56, 19); + + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 15, 10, 10); + g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 15, 10, 10); + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 25, 10, 10); + g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 25, 10, 10); + + g.FillEllipse(br, _startPosX.Value + 5, _startPosY.Value + 15, 11, 11); + g.FillEllipse(br, _startPosX.Value + 59, _startPosY.Value + 15, 11, 11); + g.FillEllipse(br, _startPosX.Value + 5, _startPosY.Value + 24, 11, 11); + g.FillEllipse(br, _startPosX.Value + 59, _startPosY.Value + 24, 11, 11); + + // Мотор в корме + if (EntityMotorBoat.InboardEngine) + { + g.DrawRectangle(pen, _startPosX.Value + 3, _startPosY.Value + 13, 20, 24); + g.FillRectangle(additionalBrush, _startPosX.Value + 4, _startPosY.Value + 14, 19, 23); + + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 15, 6, 6); + g.DrawEllipse(pen, _startPosX.Value + 14, _startPosY.Value + 15, 6, 6); + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 28, 6, 6); + g.DrawEllipse(pen, _startPosX.Value + 14, _startPosY.Value + 28, 6, 6); + g.FillEllipse(additionalBrush, _startPosX.Value + 6, _startPosY.Value + 16, 4, 4); + g.FillEllipse(additionalBrush, _startPosX.Value + 15, _startPosY.Value + 16, 4, 4); + g.FillEllipse(additionalBrush, _startPosX.Value + 6, _startPosY.Value + 29, 4, 4); + g.FillEllipse(additionalBrush, _startPosX.Value + 15, _startPosY.Value + 29, 4, 4); + } + + // Вёсла + if (EntityMotorBoat.Oar) + { + g.DrawRectangle(pen, _startPosX.Value + 32, _startPosY.Value + 3, 2, 17); + g.DrawRectangle(pen, _startPosX.Value + 32, _startPosY.Value + 30, 2, 17); + g.FillRectangle(additionalBrush, _startPosX.Value + 33, _startPosY.Value + 3, 1, 17); + g.FillRectangle(additionalBrush, _startPosX.Value + 33, _startPosY.Value + 31, 1, 16); + + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value, 6, 8); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 42, 6, 8); + g.FillEllipse(additionalBrush, _startPosX.Value + 30, _startPosY.Value, 6, 8); + g.FillEllipse(additionalBrush, _startPosX.Value + 30, _startPosY.Value + 42, 6, 8); + } + + // Защитное стекло + if (EntityMotorBoat.ProtectiveGlass) + { + Brush brBlue = new SolidBrush(Color.LightBlue); + g.FillRectangle(brBlue, _startPosX.Value + 45, _startPosY.Value + 20, 25, 11); + g.FillRectangle(brBlue, _startPosX.Value + 45, _startPosY.Value + 16, 17, 19); + + g.FillEllipse(brBlue, _startPosX.Value + 59, _startPosY.Value + 15, 11, 11); + g.FillEllipse(brBlue, _startPosX.Value + 59, _startPosY.Value + 24, 11, 11); + } + } +} \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/EntityMotorBoat.cs b/ProjectMotorBoat/ProjectMotorBoat/EntityMotorBoat.cs new file mode 100644 index 0000000..9a9e846 --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/EntityMotorBoat.cs @@ -0,0 +1,68 @@ +namespace ProjectMotorBoat; + +/// +/// Класс-сущность "Катер" +/// +public class EntityMotorBoat +{ + /// + /// Скорость + /// + 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 InboardEngine { get; private set; } + + /// + /// Признак (опция) наличия весла + /// + public bool Oar { get; private set; } + + /// + /// Признак (опция) наличия защитного стекла + /// + public bool ProtectiveGlass { get; private set; } + + /// + /// Шаг перемещения катера + /// + public double Step => Speed * 100 / Weight; + + /// + /// Инициализация полей объекта-класса катера + /// + /// + /// + /// + /// + /// + /// + /// + public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool inboardEngine, bool oar, bool protectiveGlass) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + InboardEngine = inboardEngine; + Oar = oar; + ProtectiveGlass = protectiveGlass; + } +} \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/Form1.Designer.cs b/ProjectMotorBoat/ProjectMotorBoat/Form1.Designer.cs deleted file mode 100644 index 0bbb677..0000000 --- a/ProjectMotorBoat/ProjectMotorBoat/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectMotorBoat -{ - 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/ProjectMotorBoat/ProjectMotorBoat/Form1.cs b/ProjectMotorBoat/ProjectMotorBoat/Form1.cs deleted file mode 100644 index 3c8c336..0000000 --- a/ProjectMotorBoat/ProjectMotorBoat/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectMotorBoat -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.Designer.cs b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.Designer.cs new file mode 100644 index 0000000..f95b315 --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.Designer.cs @@ -0,0 +1,136 @@ +namespace ProjectMotorBoat +{ + partial class FormMotorBoat + { + /// + /// 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() + { + pictureBoxMotorBoat = new PictureBox(); + buttonCreateMotorBoat = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonRight = new Button(); + buttonDown = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxMotorBoat).BeginInit(); + SuspendLayout(); + // + // pictureBoxMotorBoat + // + pictureBoxMotorBoat.Dock = DockStyle.Fill; + pictureBoxMotorBoat.Location = new Point(0, 0); + pictureBoxMotorBoat.Name = "pictureBoxMotorBoat"; + pictureBoxMotorBoat.Size = new Size(956, 483); + pictureBoxMotorBoat.SizeMode = PictureBoxSizeMode.AutoSize; + pictureBoxMotorBoat.TabIndex = 0; + pictureBoxMotorBoat.TabStop = false; + // + // buttonCreateMotorBoat + // + buttonCreateMotorBoat.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateMotorBoat.Location = new Point(12, 448); + buttonCreateMotorBoat.Name = "buttonCreateMotorBoat"; + buttonCreateMotorBoat.Size = new Size(75, 23); + buttonCreateMotorBoat.TabIndex = 1; + buttonCreateMotorBoat.Text = "Создать"; + buttonCreateMotorBoat.UseVisualStyleBackColor = true; + buttonCreateMotorBoat.Click += ButtonCreateMotorBoat_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.arrowLeft; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(814, 436); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMoveMotorBoat_click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.arrowUp; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(855, 395); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 3; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMoveMotorBoat_click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.arrowRight; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(896, 436); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 4; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMoveMotorBoat_click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.arrowDown; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(855, 436); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 5; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMoveMotorBoat_click; + // + // FormMotorBoat + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(956, 483); + Controls.Add(buttonDown); + Controls.Add(buttonRight); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonCreateMotorBoat); + Controls.Add(pictureBoxMotorBoat); + Name = "FormMotorBoat"; + Text = "Катер"; + ((System.ComponentModel.ISupportInitialize)pictureBoxMotorBoat).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private PictureBox pictureBoxMotorBoat; + private Button buttonCreateMotorBoat; + private Button buttonLeft; + private Button buttonUp; + private Button buttonRight; + private Button buttonDown; + } +} \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.cs b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.cs new file mode 100644 index 0000000..b12a68c --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.cs @@ -0,0 +1,92 @@ +namespace ProjectMotorBoat; + +/// +/// Форма работы с объектом "Катер" +/// +public partial class FormMotorBoat : Form +{ + /// + /// Поле-объект для прорисовки объекта + /// + private DrawingMotorBoat? _drawingMotorBoat; + + /// + /// Конструктор формы + /// + public FormMotorBoat() + { + InitializeComponent(); + } + + /// + /// Метод прорисовки катера + /// + private void Draw() + { + if (_drawingMotorBoat == null) + { + return; + } + + Bitmap bmp = new(pictureBoxMotorBoat.Width, pictureBoxMotorBoat.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawingMotorBoat.DrawTransport(gr); + pictureBoxMotorBoat.Image = bmp; + } + + /// + /// Обработка нажатия кнопки "Создать" + /// + /// + /// + private void ButtonCreateMotorBoat_Click(object sender, EventArgs e) + { + Random random = new(); + _drawingMotorBoat = new DrawingMotorBoat(); + _drawingMotorBoat.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)), + Convert.ToBoolean(random.Next(0, 2))); + _drawingMotorBoat.SetPictureSize(pictureBoxMotorBoat.Width, pictureBoxMotorBoat.Height); + _drawingMotorBoat.SetPosition(random.Next(10, 100), random.Next(10, 100)); + + Draw(); + } + + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMoveMotorBoat_click(object sender, EventArgs e) + { + if (_drawingMotorBoat == null) + { + return; + } + + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawingMotorBoat.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawingMotorBoat.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawingMotorBoat.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawingMotorBoat.MoveTransport(DirectionType.Right); + break; + } + + if (result) + { + Draw(); + } + } +} diff --git a/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.resx b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/FormMotorBoat.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/ProjectMotorBoat/ProjectMotorBoat/Program.cs b/ProjectMotorBoat/ProjectMotorBoat/Program.cs index 4c389e9..30a5090 100644 --- a/ProjectMotorBoat/ProjectMotorBoat/Program.cs +++ b/ProjectMotorBoat/ProjectMotorBoat/Program.cs @@ -11,7 +11,7 @@ namespace ProjectMotorBoat // 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 FormMotorBoat()); } } } \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/ProjectMotorBoat.csproj b/ProjectMotorBoat/ProjectMotorBoat/ProjectMotorBoat.csproj index e1a0735..13ee123 100644 --- a/ProjectMotorBoat/ProjectMotorBoat/ProjectMotorBoat.csproj +++ b/ProjectMotorBoat/ProjectMotorBoat/ProjectMotorBoat.csproj @@ -2,10 +2,25 @@ WinExe - net7.0-windows + net6.0-windows enable true enable + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/ProjectMotorBoat/ProjectMotorBoat/Properties/Resources.Designer.cs b/ProjectMotorBoat/ProjectMotorBoat/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3ba38a4 --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectMotorBoat.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("ProjectMotorBoat.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/ProjectMotorBoat/ProjectMotorBoat/Properties/Resources.resx b/ProjectMotorBoat/ProjectMotorBoat/Properties/Resources.resx new file mode 100644 index 0000000..293419e --- /dev/null +++ b/ProjectMotorBoat/ProjectMotorBoat/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.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/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowDown.jpg b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowDown.jpg new file mode 100644 index 0000000..f21002e Binary files /dev/null and b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowDown.jpg differ diff --git a/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowLeft.jpg b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowLeft.jpg new file mode 100644 index 0000000..61b8dae Binary files /dev/null and b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowLeft.jpg differ diff --git a/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowRight.jpg b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowRight.jpg new file mode 100644 index 0000000..b440197 Binary files /dev/null and b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowRight.jpg differ diff --git a/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowUp.jpg b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowUp.jpg new file mode 100644 index 0000000..e630cea Binary files /dev/null and b/ProjectMotorBoat/ProjectMotorBoat/Resources/arrowUp.jpg differ