From 65e6415db6005b6f106087c469a3645f0e4e4c6f Mon Sep 17 00:00:00 2001 From: KirillFirsof <117719052+KirillFirsof@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:39:14 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B5=D0=B9=D1=87=D0=B0=D1=81=20=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BD=D0=BE=20=D0=B2=D1=81=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RPP_FirstLaba_Tractor/DrawningTractor.cs | 2 +- .../RPP_FirstLaba_Tractor/FormTractorCollection.cs | 14 +++++++------- .../RPP_FirstLaba_Tractor/SetGeneric.cs | 2 +- .../TractorsGenericCollection.cs | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/DrawningTractor.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/DrawningTractor.cs index 578ec20..99015c2 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/DrawningTractor.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/DrawningTractor.cs @@ -81,7 +81,7 @@ namespace ProjectTractor.DrawningObjects { } /// - /// Получение объекта IMoveableObject из объекта DrawningCar + /// Получение объекта IMoveableObject из объекта DrawningTractor /// public IMoveableObject GetMoveableObject => new DrawningObjectTractor(this); diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs index ce60c1b..b2708e0 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs @@ -20,14 +20,14 @@ namespace ProjectTractor /// Набор объектов /// private readonly TractorsGenericCollection _cars; + DrawningObjectTractor> _tractors; /// /// Конструктор /// public FormTractorCollection() { InitializeComponent(); - _cars = new TractorsGenericCollection(pictureBoxCollection.Width, pictureBoxCollection.Height); } @@ -36,10 +36,10 @@ namespace ProjectTractor FormTractor form = new(); if (form.ShowDialog() == DialogResult.OK) { - if (_cars + form.SelectedTractor) + if (_tractors + form.SelectedTractor) { MessageBox.Show("Объект добавлен"); - pictureBoxCollection.Image = _cars.ShowCars(); + pictureBoxCollection.Image = _tractors.ShowTractors(); } else { @@ -61,10 +61,10 @@ namespace ProjectTractor return; } int pos = Convert.ToInt32(maskedTextBoxNumber.Text); - if (_cars - pos) + if (_tractors - pos) { MessageBox.Show("Объект удален"); - pictureBoxCollection.Image = _cars.ShowCars(); + pictureBoxCollection.Image = _tractors.ShowTractors(); } else { @@ -79,7 +79,7 @@ namespace ProjectTractor private void ButtonRefreshCollection_Click(object sender, EventArgs e) { - pictureBoxCollection.Image = _cars.ShowCars(); + pictureBoxCollection.Image = _tractors.ShowTractors(); } private void InitializeComponent() diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/SetGeneric.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/SetGeneric.cs index 6ca1fd8..2ad9043 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/SetGeneric.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/SetGeneric.cs @@ -45,7 +45,7 @@ namespace ProjectTractor.Generics /// /// Добавление объекта в набор на конкретную позицию /// - /// Добавляемый автомобиль + /// Добавляемый трактор /// Позиция /// public bool Insert(T tractor, int position) diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs index 2bec09d..da5fb77 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs @@ -9,7 +9,7 @@ using ProjectTractor.MovementStrategy; namespace ProjectTractor.Generics { /// - /// Параметризованный класс для набора объектов DrawningCar + /// Параметризованный класс для набора объектов DrawningTractor /// /// /// @@ -93,7 +93,7 @@ namespace ProjectTractor.Generics /// Вывод всего набора объектов /// /// - public Bitmap ShowCars() + public Bitmap ShowTractors() { Bitmap bmp = new(_pictureWidth, _pictureHeight); Graphics gr = Graphics.FromImage(bmp);