лаба 1 хард полностью
This commit is contained in:
parent
efd4b82df5
commit
9f22c390a7
24
ProjectBoatHard/ProjectBoatHard/DirectionType.cs
Normal file
24
ProjectBoatHard/ProjectBoatHard/DirectionType.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
namespace ProjectBoatHard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// направление перемещения
|
||||||
|
/// </summary>
|
||||||
|
public enum DirectionType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// вверх
|
||||||
|
/// </summary>
|
||||||
|
Up = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// вниз
|
||||||
|
/// </summary>
|
||||||
|
Down = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// влево
|
||||||
|
/// </summary>
|
||||||
|
Left = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// вправо
|
||||||
|
/// </summary>
|
||||||
|
Right = 4
|
||||||
|
}
|
232
ProjectBoatHard/ProjectBoatHard/DrawningBoat.cs
Normal file
232
ProjectBoatHard/ProjectBoatHard/DrawningBoat.cs
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static System.Windows.Forms.LinkLabel;
|
||||||
|
|
||||||
|
namespace ProjectBoatHard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||||
|
/// </summary>
|
||||||
|
public class DrawningBoat
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// класс-сущность
|
||||||
|
/// </summary>
|
||||||
|
public EntityBoat? EntityBoat { get; private set; }
|
||||||
|
public DrawningEngine? Engine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ширина окна
|
||||||
|
/// </summary>
|
||||||
|
private int? _pictureWidth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// высота окна
|
||||||
|
/// </summary>
|
||||||
|
private int? _pictureHeight;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// левая координата прорисовки катера
|
||||||
|
/// </summary>
|
||||||
|
private int? _startPosX;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// верхняя координата прорисовки катера
|
||||||
|
/// </summary>
|
||||||
|
private int? _startPosY;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ширина прорисовки катера
|
||||||
|
/// </summary>
|
||||||
|
private int _drawningBoatWidth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// высота прорисовки катера
|
||||||
|
/// </summary>
|
||||||
|
private int _drawningBoatHeight;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Инициализация свойств
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="speed">Скорость</param>
|
||||||
|
/// <param name="weight">Вес</param>
|
||||||
|
/// <param name="bodyColor">Основной цвет</param>
|
||||||
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||||
|
/// <param name="kabina">Признак наличия кабины</param>
|
||||||
|
/// <param name="dvigatel">Признак наличия двигателя</param>
|
||||||
|
|
||||||
|
public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool kabina,
|
||||||
|
bool dvigatel, int numberOfEngine, int width, int height)
|
||||||
|
{
|
||||||
|
if (weight < _pictureWidth || height < _pictureHeight)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_drawningBoatWidth = 150;
|
||||||
|
|
||||||
|
|
||||||
|
_drawningBoatHeight = 80;
|
||||||
|
|
||||||
|
_pictureWidth = width;
|
||||||
|
_pictureHeight = height;
|
||||||
|
|
||||||
|
EntityBoat = new EntityBoat();
|
||||||
|
EntityBoat.Init(speed, weight, bodyColor, additionalColor, kabina, dvigatel);
|
||||||
|
Engine = new DrawningEngine();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Установка границ поля
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">Ширина поля</param>
|
||||||
|
/// <param name="height">Высота поля</param>
|
||||||
|
/// <returns>true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах</returns>
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Установка позиции
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="x">Координата X</param>
|
||||||
|
/// <param name="y">Координата Y</param>
|
||||||
|
public void SetPosition(int x, int y)
|
||||||
|
{
|
||||||
|
if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x < 0)
|
||||||
|
{
|
||||||
|
x = 0;
|
||||||
|
}
|
||||||
|
else if (x + _drawningBoatWidth > _pictureWidth)
|
||||||
|
{
|
||||||
|
x = _pictureWidth.Value - _drawningBoatWidth;//корректируем по оси х
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y < 0)//если новая позиция выше верхней границы формы
|
||||||
|
{
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
else if (y + _drawningBoatHeight > _pictureHeight)//если новая позиция выходит за границу формы
|
||||||
|
{
|
||||||
|
y = _pictureHeight.Value - _drawningBoatHeight;//корректируем по оси у
|
||||||
|
}
|
||||||
|
|
||||||
|
_startPosX = x;
|
||||||
|
_startPosY = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Изменение направления перемещения
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="direction">Направление</param>
|
||||||
|
/// <returns>true - перемещение выполнено, false - перемещение невозможно</returns>
|
||||||
|
public bool MoveTransport(DirectionType direction)
|
||||||
|
{
|
||||||
|
if (EntityBoat == null || !_startPosX.HasValue ||
|
||||||
|
!_startPosY.HasValue)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (direction)
|
||||||
|
{
|
||||||
|
//влево
|
||||||
|
case DirectionType.Left:
|
||||||
|
if (_startPosX.Value - EntityBoat.Step > 0)
|
||||||
|
{
|
||||||
|
_startPosX -= (int)EntityBoat.Step;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
//вверх
|
||||||
|
case DirectionType.Up:
|
||||||
|
if (_startPosY.Value - EntityBoat.Step > 0)
|
||||||
|
{
|
||||||
|
_startPosY -= (int)EntityBoat.Step;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// вправо
|
||||||
|
case DirectionType.Right:
|
||||||
|
if (_startPosX.Value + EntityBoat.Step + _drawningBoatWidth < _pictureWidth)
|
||||||
|
{
|
||||||
|
_startPosX += (int)EntityBoat.Step;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
//вниз
|
||||||
|
case DirectionType.Down:
|
||||||
|
if (_startPosY.Value + EntityBoat.Step + _drawningBoatHeight < _pictureHeight)
|
||||||
|
{
|
||||||
|
_startPosY += (int)EntityBoat.Step;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Прорисовка объекта
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g"></param>
|
||||||
|
public void DrawTransport(Graphics g)
|
||||||
|
{
|
||||||
|
if (EntityBoat == null || !_startPosX.HasValue ||
|
||||||
|
!_startPosY.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Pen pen = new(Color.Black);
|
||||||
|
Brush additionalBrush = new SolidBrush(EntityBoat.AdditionalColor);
|
||||||
|
Brush bodyBrush = new SolidBrush(EntityBoat.BodyColor);
|
||||||
|
|
||||||
|
//корпус
|
||||||
|
g.FillRectangle(bodyBrush, _startPosX.Value + 5, _startPosY.Value, 75, 40);
|
||||||
|
g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value, 75, 40);
|
||||||
|
|
||||||
|
//лестница
|
||||||
|
g.FillRectangle(additionalBrush, _startPosX.Value + 5, _startPosY.Value + 10, 20, 20);
|
||||||
|
g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 10, 20, 20);
|
||||||
|
|
||||||
|
//двигатель
|
||||||
|
if (EntityBoat.dvigatelBody)
|
||||||
|
{
|
||||||
|
g.FillRectangle(additionalBrush, _startPosX.Value, _startPosY.Value + 15, 5, 10);
|
||||||
|
g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 15, 5, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
Engine.DrawEngine(g, _startPosX.Value, _startPosY.Value);
|
||||||
|
|
||||||
|
//корма
|
||||||
|
Point point1 = new Point(_startPosX.Value + 80, _startPosY.Value);
|
||||||
|
Point point2 = new Point(_startPosX.Value + 80, _startPosY.Value + 40);
|
||||||
|
Point point3 = new Point(_startPosX.Value + 120, _startPosY.Value + 20);
|
||||||
|
Point[] curvePointsKorma = { point1, point2, point3 };
|
||||||
|
g.DrawPolygon(pen, curvePointsKorma);
|
||||||
|
g.FillPolygon(bodyBrush, curvePointsKorma);
|
||||||
|
|
||||||
|
//кабина
|
||||||
|
if (EntityBoat.kabinaBody)
|
||||||
|
{
|
||||||
|
Point point4 = new Point(_startPosX.Value + 50, _startPosY.Value + 10);
|
||||||
|
Point point5 = new Point(_startPosX.Value + 55, _startPosY.Value + 15);
|
||||||
|
Point point6 = new Point(_startPosX.Value + 55, _startPosY.Value + 25);
|
||||||
|
Point point7 = new Point(_startPosX.Value + 50, _startPosY.Value + 30);
|
||||||
|
Point point8 = new Point(_startPosX.Value + 50, _startPosY.Value + 10);
|
||||||
|
Point[] curvePointsKabina = { point4, point5, point6, point7, point8 };
|
||||||
|
g.FillPolygon(additionalBrush, curvePointsKabina);
|
||||||
|
g.DrawPolygon(pen, curvePointsKabina);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
60
ProjectBoatHard/ProjectBoatHard/DrawningEngine.cs
Normal file
60
ProjectBoatHard/ProjectBoatHard/DrawningEngine.cs
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ProjectBoatHard;
|
||||||
|
|
||||||
|
public class DrawningEngine
|
||||||
|
{
|
||||||
|
public EntityBoat? EntityBoat { get; private set; }
|
||||||
|
|
||||||
|
public NumberOfEngine numberOfEngine;
|
||||||
|
|
||||||
|
public int EngNum
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value <= 1 || value > 3)
|
||||||
|
{
|
||||||
|
numberOfEngine = NumberOfEngine.OneEngine;
|
||||||
|
}
|
||||||
|
else if (value == 2)
|
||||||
|
{
|
||||||
|
numberOfEngine = NumberOfEngine.TwoEngine;
|
||||||
|
}
|
||||||
|
else if (value == 3)
|
||||||
|
{
|
||||||
|
numberOfEngine = NumberOfEngine.ThreeEngine;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DrawEngine(Graphics g, int _startPosX, int _startPosY)
|
||||||
|
{
|
||||||
|
|
||||||
|
Brush bodybrush = new SolidBrush(Color.Black);
|
||||||
|
|
||||||
|
|
||||||
|
switch (numberOfEngine)
|
||||||
|
{
|
||||||
|
case NumberOfEngine.OneEngine:
|
||||||
|
g.FillRectangle(bodybrush, _startPosX, _startPosY + 15, 5, 10);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NumberOfEngine.TwoEngine:
|
||||||
|
g.FillRectangle(bodybrush, _startPosX + 15, _startPosY + 40, 18, 6);
|
||||||
|
g.FillRectangle(bodybrush, _startPosX + 15, _startPosY - 5, 18, 6);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NumberOfEngine.ThreeEngine:
|
||||||
|
g.FillRectangle(bodybrush, _startPosX, _startPosY + 15, 5, 10);
|
||||||
|
g.FillRectangle(bodybrush, _startPosX + 15, _startPosY + 40, 18, 6);
|
||||||
|
g.FillRectangle(bodybrush, _startPosX + 15, _startPosY - 5, 18, 6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
59
ProjectBoatHard/ProjectBoatHard/EntityBoat.cs
Normal file
59
ProjectBoatHard/ProjectBoatHard/EntityBoat.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
namespace ProjectBoatHard;
|
||||||
|
|
||||||
|
public class EntityBoat
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// скорость
|
||||||
|
/// </summary>
|
||||||
|
public int Speed { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// вес
|
||||||
|
/// </summary>
|
||||||
|
public double Weight { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Основной цвет
|
||||||
|
/// </summary>
|
||||||
|
public Color BodyColor { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Дополнительный цвет (для опциональных элементов)
|
||||||
|
/// </summary>
|
||||||
|
public Color AdditionalColor { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Признак (опция) наличия кабины
|
||||||
|
/// </summary>
|
||||||
|
public bool kabinaBody { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Признак (опция) наличия двигателя
|
||||||
|
/// </summary>
|
||||||
|
public bool dvigatelBody { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Шаг перемещения катера
|
||||||
|
/// </summary>
|
||||||
|
public double Step => Speed * 100 / Weight;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="speed">Скорость</param>
|
||||||
|
/// <param name="weight">Вес</param>
|
||||||
|
/// <param name="bodyColor">Основной цвет</param>
|
||||||
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||||
|
/// <param name="kabinaBody">Признак наличия кабины</param>
|
||||||
|
/// <param name="dvigatelBody">Признак наличия двигателя</param>
|
||||||
|
|
||||||
|
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool kabina, bool dvigatel)
|
||||||
|
{
|
||||||
|
Speed = speed;
|
||||||
|
Weight = weight;
|
||||||
|
BodyColor = bodyColor;
|
||||||
|
AdditionalColor = additionalColor;
|
||||||
|
kabinaBody = kabina;
|
||||||
|
dvigatelBody = dvigatel;
|
||||||
|
}
|
||||||
|
}
|
39
ProjectBoatHard/ProjectBoatHard/Form1.Designer.cs
generated
39
ProjectBoatHard/ProjectBoatHard/Form1.Designer.cs
generated
@ -1,39 +0,0 @@
|
|||||||
namespace ProjectBoatHard
|
|
||||||
{
|
|
||||||
partial class Form1
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace ProjectBoatHard
|
|
||||||
{
|
|
||||||
public partial class Form1 : Form
|
|
||||||
{
|
|
||||||
public Form1()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
146
ProjectBoatHard/ProjectBoatHard/FormBoat.Designer.cs
generated
Normal file
146
ProjectBoatHard/ProjectBoatHard/FormBoat.Designer.cs
generated
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
namespace ProjectBoatHard
|
||||||
|
{
|
||||||
|
partial class FormBoat
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
pictureBoxBoat = new PictureBox();
|
||||||
|
buttonCreate = new Button();
|
||||||
|
buttonLeft = new Button();
|
||||||
|
buttonUp = new Button();
|
||||||
|
buttonDown = new Button();
|
||||||
|
buttonRight = new Button();
|
||||||
|
numericUpDownBoat = new NumericUpDown();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxBoat).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownBoat).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBoxBoat
|
||||||
|
//
|
||||||
|
pictureBoxBoat.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
pictureBoxBoat.Location = new Point(0, 0);
|
||||||
|
pictureBoxBoat.Name = "pictureBoxBoat";
|
||||||
|
pictureBoxBoat.Size = new Size(669, 394);
|
||||||
|
pictureBoxBoat.TabIndex = 0;
|
||||||
|
pictureBoxBoat.TabStop = false;
|
||||||
|
//
|
||||||
|
// buttonCreate
|
||||||
|
//
|
||||||
|
buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
|
buttonCreate.Location = new Point(12, 360);
|
||||||
|
buttonCreate.Name = "buttonCreate";
|
||||||
|
buttonCreate.Size = new Size(114, 23);
|
||||||
|
buttonCreate.TabIndex = 1;
|
||||||
|
buttonCreate.Text = "Создать";
|
||||||
|
buttonCreate.UseVisualStyleBackColor = true;
|
||||||
|
buttonCreate.Click += ButtonCreateBoat_Click;
|
||||||
|
//
|
||||||
|
// buttonLeft
|
||||||
|
//
|
||||||
|
buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonLeft.BackgroundImage = ProjectMotorBoatHard.Properties.Resources.влево;
|
||||||
|
buttonLeft.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
|
buttonLeft.Location = new Point(534, 348);
|
||||||
|
buttonLeft.Name = "buttonLeft";
|
||||||
|
buttonLeft.Size = new Size(35, 35);
|
||||||
|
buttonLeft.TabIndex = 2;
|
||||||
|
buttonLeft.UseVisualStyleBackColor = true;
|
||||||
|
buttonLeft.Click += ButtonMove_Click;
|
||||||
|
//
|
||||||
|
// buttonUp
|
||||||
|
//
|
||||||
|
buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonUp.BackgroundImage = ProjectMotorBoatHard.Properties.Resources.вверх;
|
||||||
|
buttonUp.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
|
buttonUp.Location = new Point(575, 307);
|
||||||
|
buttonUp.Name = "buttonUp";
|
||||||
|
buttonUp.Size = new Size(35, 35);
|
||||||
|
buttonUp.TabIndex = 3;
|
||||||
|
buttonUp.UseVisualStyleBackColor = true;
|
||||||
|
buttonUp.Click += ButtonMove_Click;
|
||||||
|
//
|
||||||
|
// buttonDown
|
||||||
|
//
|
||||||
|
buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonDown.BackgroundImage = ProjectMotorBoatHard.Properties.Resources.вниз;
|
||||||
|
buttonDown.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
|
buttonDown.Location = new Point(575, 348);
|
||||||
|
buttonDown.Name = "buttonDown";
|
||||||
|
buttonDown.Size = new Size(35, 35);
|
||||||
|
buttonDown.TabIndex = 4;
|
||||||
|
buttonDown.UseVisualStyleBackColor = true;
|
||||||
|
buttonDown.Click += ButtonMove_Click;
|
||||||
|
//
|
||||||
|
// buttonRight
|
||||||
|
//
|
||||||
|
buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonRight.BackgroundImage = ProjectMotorBoatHard.Properties.Resources.вправа;
|
||||||
|
buttonRight.BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
|
buttonRight.Location = new Point(616, 348);
|
||||||
|
buttonRight.Name = "buttonRight";
|
||||||
|
buttonRight.Size = new Size(35, 35);
|
||||||
|
buttonRight.TabIndex = 5;
|
||||||
|
buttonRight.UseVisualStyleBackColor = true;
|
||||||
|
buttonRight.Click += ButtonMove_Click;
|
||||||
|
//
|
||||||
|
// numericUpDownBoat
|
||||||
|
//
|
||||||
|
numericUpDownBoat.Location = new Point(132, 360);
|
||||||
|
numericUpDownBoat.Name = "numericUpDownBoat";
|
||||||
|
numericUpDownBoat.Size = new Size(114, 23);
|
||||||
|
numericUpDownBoat.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// FormBoat
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(669, 395);
|
||||||
|
Controls.Add(numericUpDownBoat);
|
||||||
|
Controls.Add(buttonRight);
|
||||||
|
Controls.Add(buttonDown);
|
||||||
|
Controls.Add(buttonUp);
|
||||||
|
Controls.Add(buttonLeft);
|
||||||
|
Controls.Add(buttonCreate);
|
||||||
|
Controls.Add(pictureBoxBoat);
|
||||||
|
Name = "FormBoat";
|
||||||
|
Text = "Моторная Лодка";
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxBoat).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownBoat).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private PictureBox pictureBoxBoat;
|
||||||
|
private Button buttonCreate;
|
||||||
|
private Button buttonLeft;
|
||||||
|
private Button buttonUp;
|
||||||
|
private Button buttonDown;
|
||||||
|
private Button buttonRight;
|
||||||
|
private NumericUpDown numericUpDownBoat;
|
||||||
|
}
|
||||||
|
}
|
77
ProjectBoatHard/ProjectBoatHard/FormBoat.cs
Normal file
77
ProjectBoatHard/ProjectBoatHard/FormBoat.cs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
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 ProjectBoatHard;
|
||||||
|
|
||||||
|
public partial class FormBoat : Form
|
||||||
|
{
|
||||||
|
private DrawningBoat? _drawningBoat;
|
||||||
|
|
||||||
|
public FormBoat()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Draw()
|
||||||
|
{
|
||||||
|
if (_drawningBoat == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bitmap bmp = new(pictureBoxBoat.Width, pictureBoxBoat.Height);
|
||||||
|
Graphics gr = Graphics.FromImage(bmp);
|
||||||
|
_drawningBoat.DrawTransport(gr);
|
||||||
|
pictureBoxBoat.Image = bmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonCreateBoat_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Random random = new();
|
||||||
|
_drawningBoat = new DrawningBoat();
|
||||||
|
_drawningBoat.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)), random.Next(1, 4) * 2,
|
||||||
|
pictureBoxBoat.Width, pictureBoxBoat.Height);
|
||||||
|
|
||||||
|
_drawningBoat.SetPosition(random.Next(10, 100), random.Next(10, 100));
|
||||||
|
_drawningBoat.Engine.EngNum = (int)numericUpDownBoat.Value;
|
||||||
|
Draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonMove_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_drawningBoat == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string name = ((Button)sender)?.Name ?? string.Empty;
|
||||||
|
bool result = false;
|
||||||
|
switch (name)
|
||||||
|
{
|
||||||
|
case "buttonUp":
|
||||||
|
result = _drawningBoat.MoveTransport(DirectionType.Up);
|
||||||
|
break;
|
||||||
|
case "buttonDown":
|
||||||
|
result = _drawningBoat.MoveTransport(DirectionType.Down);
|
||||||
|
break;
|
||||||
|
case "buttonLeft":
|
||||||
|
result = _drawningBoat.MoveTransport(DirectionType.Left);
|
||||||
|
break;
|
||||||
|
case "buttonRight":
|
||||||
|
result = _drawningBoat.MoveTransport(DirectionType.Right);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
Draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
20
ProjectBoatHard/ProjectBoatHard/NumberOfEngine.cs
Normal file
20
ProjectBoatHard/ProjectBoatHard/NumberOfEngine.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
namespace ProjectBoatHard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Количество катков
|
||||||
|
/// </summary>
|
||||||
|
public enum NumberOfEngine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 1 катка
|
||||||
|
/// </summary>
|
||||||
|
OneEngine,
|
||||||
|
/// <summary>
|
||||||
|
/// 2 катков
|
||||||
|
/// </summary>
|
||||||
|
TwoEngine,
|
||||||
|
/// <summary>
|
||||||
|
/// 3 катков
|
||||||
|
/// </summary>
|
||||||
|
ThreeEngine
|
||||||
|
}
|
@ -11,7 +11,7 @@ namespace ProjectBoatHard
|
|||||||
// To customize application configuration such as set high DPI settings or default font,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new Form1());
|
Application.Run(new FormBoat());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,11 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
26
ProjectBoatHard/ProjectBoatHard/ProjectMotorBoatHard.csproj
Normal file
26
ProjectBoatHard/ProjectBoatHard/ProjectMotorBoatHard.csproj
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
103
ProjectBoatHard/ProjectBoatHard/Properties/Resources.Designer.cs
generated
Normal file
103
ProjectBoatHard/ProjectBoatHard/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Этот код создан программой.
|
||||||
|
// Исполняемая версия:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||||
|
// повторной генерации кода.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ProjectMotorBoatHard.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||||
|
/// </summary>
|
||||||
|
// Этот класс создан автоматически классом 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() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||||
|
/// </summary>
|
||||||
|
[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("ProjectMotorBoatHard.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||||
|
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap вверх {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("вверх", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap влево {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("влево", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap вниз {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("вниз", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap вправа {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("вправа", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
133
ProjectBoatHard/ProjectBoatHard/Properties/Resources.resx
Normal file
133
ProjectBoatHard/ProjectBoatHard/Properties/Resources.resx
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="вверх" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\вверх.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="влево" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\влево.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="вниз" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\вниз.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="вправа" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\вправа.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вверх.png
Normal file
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вверх.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
ProjectBoatHard/ProjectBoatHard/Resources/влево.png
Normal file
BIN
ProjectBoatHard/ProjectBoatHard/Resources/влево.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вниз.png
Normal file
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вниз.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вправа.png
Normal file
BIN
ProjectBoatHard/ProjectBoatHard/Resources/вправа.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.7.34031.279
|
VisualStudioVersion = 17.7.34031.279
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectBoatHard", "ProjectBoatHard\ProjectBoatHard.csproj", "{C3AC728D-8799-444D-8D2C-AEB47E9C0403}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectMotorBoatHard", "ProjectBoatHard\ProjectMotorBoatHard.csproj", "{C3AC728D-8799-444D-8D2C-AEB47E9C0403}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
Loading…
x
Reference in New Issue
Block a user