diff --git a/AccordionBus/AccordionBus/AccordionBusForm.Designer.cs b/AccordionBus/AccordionBus/AccordionBusForm.Designer.cs index 8bf63a1..acada71 100644 --- a/AccordionBus/AccordionBus/AccordionBusForm.Designer.cs +++ b/AccordionBus/AccordionBus/AccordionBusForm.Designer.cs @@ -38,10 +38,7 @@ comboBoxStrategy = new ComboBox(); buttonCreateBus = new Button(); buttonStep = new Button(); -<<<<<<< HEAD buttonSelectBus = new Button(); -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee ((System.ComponentModel.ISupportInitialize)pictureBoxAccordionBus).BeginInit(); SuspendLayout(); // @@ -148,7 +145,6 @@ buttonStep.UseVisualStyleBackColor = true; buttonStep.Click += buttonStep_Click; // -<<<<<<< HEAD // buttonSelectBus // buttonSelectBus.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; @@ -162,17 +158,12 @@ buttonSelectBus.UseVisualStyleBackColor = true; buttonSelectBus.Click += buttonSelectBus_Click; // -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee // AccordionBusForm // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(884, 461); -<<<<<<< HEAD Controls.Add(buttonSelectBus); -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee Controls.Add(buttonStep); Controls.Add(buttonCreateBus); Controls.Add(comboBoxStrategy); @@ -198,9 +189,6 @@ private ComboBox comboBoxStrategy; private Button buttonCreateBus; private Button buttonStep; -<<<<<<< HEAD private Button buttonSelectBus; -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee } } \ No newline at end of file diff --git a/AccordionBus/AccordionBus/AccordionBusForm.cs b/AccordionBus/AccordionBus/AccordionBusForm.cs index 2f344dd..b039681 100644 --- a/AccordionBus/AccordionBus/AccordionBusForm.cs +++ b/AccordionBus/AccordionBus/AccordionBusForm.cs @@ -19,14 +19,11 @@ namespace AccordionBus /// /// private AbstractStrategy? _abstractStrategy; -<<<<<<< HEAD /// /// /// public DrawingBus? SelectedBus { get; private set; } -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee /// /// @@ -62,7 +59,6 @@ namespace AccordionBus /// private void buttonCreateAccordionBus_Click(object sender, EventArgs e) { -<<<<<<< HEAD Random random = new(); // @@ -81,9 +77,6 @@ namespace AccordionBus additionalColor = dialog.Color; } -======= - Random random = new Random(); ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee _drawingBus = new DrawingAccordionBus(random.Next(100, 300), random.Next(1000, 3000), bodyColor, @@ -105,7 +98,6 @@ namespace AccordionBus /// private void buttonCreateBus_Click(object sender, EventArgs e) { -<<<<<<< HEAD Random random = new(); // @@ -119,12 +111,6 @@ namespace AccordionBus _drawingBus = new DrawingBus(random.Next(100, 300), random.Next(1000, 3000), bodyColor, -======= - Random random = new Random(); - _drawingBus = new DrawingBus(random.Next(100, 300), - random.Next(1000, 3000), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee pictureBoxAccordionBus.Width, pictureBoxAccordionBus.Height); @@ -209,7 +195,6 @@ namespace AccordionBus _abstractStrategy = null; } } -<<<<<<< HEAD /// /// @@ -221,7 +206,5 @@ namespace AccordionBus SelectedBus = _drawingBus; DialogResult = DialogResult.OK; } -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee } } \ No newline at end of file diff --git a/AccordionBus/AccordionBus/DrawingBus.cs b/AccordionBus/AccordionBus/DrawingBus.cs index cfca2b7..d17cf17 100644 --- a/AccordionBus/AccordionBus/DrawingBus.cs +++ b/AccordionBus/AccordionBus/DrawingBus.cs @@ -4,10 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using AccordionBus.Entities; -<<<<<<< HEAD using AccordionBus.MovementStrategy; -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee namespace AccordionBus.Drawings { @@ -69,16 +66,12 @@ namespace AccordionBus.Drawings /// /// Высота объекта /// -<<<<<<< HEAD public int GetHeight => _busHeight; /// /// Получение объекта IMoveableObject из объекта DrawningCar /// public IMoveableObject GetMoveableObject => new DrawingObjectBus(this); -======= - public int GetHeigth => _busHeight; ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee /// /// Проверка, что объект может перемещаться по указанному направлению @@ -116,7 +109,6 @@ namespace AccordionBus.Drawings /// Высота картинки public DrawingBus(int speed, int weight, Color bodyColor, int width, int height) { -<<<<<<< HEAD // Проверка на вместимость объекта в размеры картинки if ((_busWidth >= width) || (_busHeight >= height)) { @@ -126,18 +118,6 @@ namespace AccordionBus.Drawings _pictureWidth = width; _pictureHeight = height; EntityBus = new EntityBus(speed, weight, bodyColor); -======= - _pictureWidth = width; - _pictureHeight = height; - EntityBus = new EntityBus(speed, weight, bodyColor); - - // Проверка на вместимость объекта в размеры картинки - if ((_busWidth >= _pictureWidth) || (_busHeight >= _pictureHeight)) - { - Console.WriteLine("Ошибка! Нельзя создать рбъект такого размера!"); - return; - } ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee } /// @@ -152,30 +132,17 @@ namespace AccordionBus.Drawings /// Выоста прорисовки автобуса protected DrawingBus(int speed, double weight, Color bodyColor, int width, int height, int busWidth, int busHeight) { -<<<<<<< HEAD // Проверка на вместимость объекта в размеры картинки if ((_busWidth >= width) || (_busHeight >= height)) { return; } -======= ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee _pictureWidth = width; _pictureHeight = height; _busWidth = busWidth; _busHeight = busHeight; EntityBus = new EntityBus(speed, weight, bodyColor); -<<<<<<< HEAD -======= - - // Проверка на вместимость объекта в размеры картинки - if ((_busWidth >= _pictureWidth) || (_busHeight >= _pictureHeight)) - { - Console.WriteLine("Ошибка! Нельзя создать рбъект такого размера!"); - return; - } ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee } /// @@ -185,16 +152,12 @@ namespace AccordionBus.Drawings /// Координата Y public void SetPosition(int x, int y) { -<<<<<<< HEAD if (x < 0 || y < 0) { _startPosX = 0; _startPosY = 0; } else if ((x + _busWidth > _pictureWidth) || (y + _busHeight > _pictureHeight)) -======= - if ((x + _busWidth > _pictureWidth) || (y + _busHeight > _pictureHeight)) ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee { _startPosX = _pictureWidth - _busWidth; _startPosY = _pictureHeight - _busHeight; diff --git a/AccordionBus/AccordionBus/DrawingObjectBus.cs b/AccordionBus/AccordionBus/DrawingObjectBus.cs index a528c11..60e9a17 100644 --- a/AccordionBus/AccordionBus/DrawingObjectBus.cs +++ b/AccordionBus/AccordionBus/DrawingObjectBus.cs @@ -27,11 +27,7 @@ namespace AccordionBus.MovementStrategy { return null; } -<<<<<<< HEAD return new ObjectParameters(_drawingBus.GetPosX, _drawingBus.GetPosY, _drawingBus.GetWidth, _drawingBus.GetHeight); -======= - return new ObjectParameters(_drawingBus.GetPosX, _drawingBus.GetPosY, _drawingBus.GetWidth, _drawingBus.GetHeigth); ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee } } diff --git a/AccordionBus/AccordionBus/IMoveableObject.cs b/AccordionBus/AccordionBus/IMoveableObject.cs index fb1e08b..109c222 100644 --- a/AccordionBus/AccordionBus/IMoveableObject.cs +++ b/AccordionBus/AccordionBus/IMoveableObject.cs @@ -11,11 +11,7 @@ namespace AccordionBus.MovementStrategy /// /// Интерфейс для работы с перемещаемым объектом /// -<<<<<<< HEAD public interface IMoveableObject -======= - internal interface IMoveableObject ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee { /// /// Получение координаты X объекта diff --git a/AccordionBus/AccordionBus/ObjectParameters.cs b/AccordionBus/AccordionBus/ObjectParameters.cs index 6948b48..30bcc2b 100644 --- a/AccordionBus/AccordionBus/ObjectParameters.cs +++ b/AccordionBus/AccordionBus/ObjectParameters.cs @@ -7,15 +7,9 @@ using System.Threading.Tasks; namespace AccordionBus.MovementStrategy { /// -<<<<<<< HEAD /// Параметры-координаты объекта /// public class ObjectParameters -======= - /// Параметры-координаты рбъекта - /// - internal class ObjectParameters ->>>>>>> 82f43f1c079e24d5df9441679bb15b3e230ddbee { private readonly int _x; private readonly int _y;