PIbd-23 Firsov Kirill LabWork 01 #4
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32602.215
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RPP_FirstLaba_Tractor", "RPP_FirstLaba_Tractor\RPP_FirstLaba_Tractor.csproj", "{EF413F48-FFBF-4510-BA11-FAEBE7C0142A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectTractor", "RPP_FirstLaba_Tractor\ProjectTractor.csproj", "{EF413F48-FFBF-4510-BA11-FAEBE7C0142A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RPP_FirstLaba_Tractor.DrawningObjects;
|
||||
using ProjectTractor.DrawningObjects;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс-стратегия перемещения объекта
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor
|
||||
namespace ProjectTractor
|
||||
{
|
||||
public enum DirectionType
|
||||
{
|
||||
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RPP_FirstLaba_Tractor.Entities;
|
||||
using ProjectTractor.Entities;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.DrawningObjects
|
||||
namespace ProjectTractor.DrawningObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||
@ -44,6 +44,7 @@ namespace RPP_FirstLaba_Tractor.DrawningObjects
|
||||
SolidBrush(bulldoser.AdditionalColor);
|
||||
|
||||
base.DrawTransport(g);
|
||||
// орнамент на колесах
|
||||
if (bulldoser.WheelsOrnament)
|
||||
{
|
||||
g.FillEllipse(additionalBrush, _startPosX + 2, _startPosY + 47, 11, 11);
|
||||
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RPP_FirstLaba_Tractor.DrawningObjects;
|
||||
using ProjectTractor.DrawningObjects;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Реализация интерфейса IDrawningObject для работы с объектом DrawningTractor(паттерн Adapter)
|
||||
@ -35,6 +35,11 @@ namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
_drawningTractor?.CanMove(direction) ?? false;
|
||||
public void MoveObject(DirectionType direction) =>
|
||||
_drawningTractor?.MoveTransport(direction);
|
||||
|
||||
public void getData()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RPP_FirstLaba_Tractor.Entities;
|
||||
using ProjectTractor.Entities;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.DrawningObjects {
|
||||
namespace ProjectTractor.DrawningObjects {
|
||||
|
||||
/// <summary>
|
||||
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||
@ -115,7 +115,7 @@ namespace RPP_FirstLaba_Tractor.DrawningObjects {
|
||||
DirectionType.Up => _startPosY - EntityTractor.Step > 0,
|
||||
// вправо
|
||||
DirectionType.Right => _startPosX + EntityTractor.Step + _tractorWidth < _pictureWidth,
|
||||
//вниз
|
||||
// вниз
|
||||
DirectionType.Down => _startPosY + EntityTractor.Step + _tractorHeight < _pictureHeight,
|
||||
_ => false,
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.Entities
|
||||
namespace ProjectTractor.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс-сущность "Спортивный автомобиль"
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.Entities
|
||||
namespace ProjectTractor.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс-сущность "Автомобиль"
|
||||
|
@ -1,9 +1,10 @@
|
||||
|
||||
using RPP_FirstLaba_Tractor.MovementStrategy;
|
||||
using RPP_FirstLaba_Tractor.DrawningObjects;
|
||||
using ProjectTractor.MovementStrategy;
|
||||
using ProjectTractor.DrawningObjects;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor
|
||||
namespace ProjectTractor
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Ôîðìà ðàáîòû ñ îáúåêòîì "Ñïîðòèâíûé àâòîìîáèëü"
|
||||
/// </summary>
|
||||
@ -145,7 +146,7 @@ namespace RPP_FirstLaba_Tractor
|
||||
// buttonTop
|
||||
//
|
||||
this.buttonTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonTop.BackgroundImage = global::RPP_FirstLaba_Tractor.Properties.Resources.arrowUp;
|
||||
this.buttonTop.BackgroundImage = global::ProjectTractor.Properties.Resources.arrowUp;
|
||||
this.buttonTop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.buttonTop.Location = new System.Drawing.Point(804, 375);
|
||||
this.buttonTop.Name = "buttonTop";
|
||||
@ -157,7 +158,7 @@ namespace RPP_FirstLaba_Tractor
|
||||
// buttonLeft
|
||||
//
|
||||
this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonLeft.BackgroundImage = global::RPP_FirstLaba_Tractor.Properties.Resources.arrowLeft;
|
||||
this.buttonLeft.BackgroundImage = global::ProjectTractor.Properties.Resources.arrowLeft;
|
||||
this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.buttonLeft.Location = new System.Drawing.Point(768, 411);
|
||||
this.buttonLeft.Name = "buttonLeft";
|
||||
@ -169,7 +170,7 @@ namespace RPP_FirstLaba_Tractor
|
||||
// buttonDown
|
||||
//
|
||||
this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonDown.BackgroundImage = global::RPP_FirstLaba_Tractor.Properties.Resources.arrowDown;
|
||||
this.buttonDown.BackgroundImage = global::ProjectTractor.Properties.Resources.arrowDown;
|
||||
this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.buttonDown.Location = new System.Drawing.Point(804, 411);
|
||||
this.buttonDown.Name = "buttonDown";
|
||||
@ -181,7 +182,7 @@ namespace RPP_FirstLaba_Tractor
|
||||
// buttonRight
|
||||
//
|
||||
this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonRight.BackgroundImage = global::RPP_FirstLaba_Tractor.Properties.Resources.arrowRight;
|
||||
this.buttonRight.BackgroundImage = global::ProjectTractor.Properties.Resources.arrowRight;
|
||||
this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.buttonRight.Location = new System.Drawing.Point(840, 411);
|
||||
this.buttonRight.Name = "buttonRight";
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Интерфейс для работы с перемещаемым объектом
|
||||
@ -30,6 +30,8 @@ namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
/// </summary>
|
||||
/// <param name="direction">Направление</param>
|
||||
void MoveObject(DirectionType direction);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Стратегия перемещения объекта в центр экрана
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Стратегия перемещения объекта в центр экрана
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Параметры-координаты объекта
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace RPP_FirstLaba_Tractor
|
||||
namespace ProjectTractor
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.Properties {
|
||||
namespace ProjectTractor.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace RPP_FirstLaba_Tractor.Properties {
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RPP_FirstLaba_Tractor.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectTractor.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RPP_FirstLaba_Tractor.MovementStrategy
|
||||
namespace ProjectTractor.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Статус выполнения операции перемещения
|
||||
|
Loading…
Reference in New Issue
Block a user