From e092aed49ca55886287fd0fb315a6818763bb2b7 Mon Sep 17 00:00:00 2001 From: Kirill <117719052+KirillFirsof@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:48:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B0=D0=BB=20=D0=BF=D1=8F=D1=82?= =?UTF-8?q?=D1=83=D1=8E=20=D0=BB=D0=B0=D0=B1=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RPP_FirstLaba_Tractor/FormTractorCollection.cs | 7 ++++--- .../RPP_FirstLaba_Tractor/FormTractorConfig.cs | 4 ++++ .../RPP_FirstLaba_Tractor/TractorsGenericCollection.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs index 58ac92d..5da1835 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorCollection.cs @@ -102,6 +102,7 @@ namespace ProjectTractor /// /// /// + private void ButtonAddTractor_Click(object sender, EventArgs e) { if (listBoxStorages.SelectedIndex == -1) @@ -208,7 +209,7 @@ namespace ProjectTractor this.pictureBoxCollection.Dock = System.Windows.Forms.DockStyle.Left; this.pictureBoxCollection.Location = new System.Drawing.Point(0, 0); this.pictureBoxCollection.Name = "pictureBoxCollection"; - this.pictureBoxCollection.Size = new System.Drawing.Size(620, 536); + this.pictureBoxCollection.Size = new System.Drawing.Size(645, 536); this.pictureBoxCollection.TabIndex = 1; this.pictureBoxCollection.TabStop = false; // @@ -219,7 +220,7 @@ namespace ProjectTractor this.groupBox.Controls.Add(this.ButtonRemoveTractor); this.groupBox.Controls.Add(this.ButtonAddTractor); this.groupBox.Controls.Add(this.maskedTextBoxNumber); - this.groupBox.Location = new System.Drawing.Point(626, 12); + this.groupBox.Location = new System.Drawing.Point(651, 14); this.groupBox.Name = "groupBox"; this.groupBox.Size = new System.Drawing.Size(255, 522); this.groupBox.TabIndex = 2; @@ -315,7 +316,7 @@ namespace ProjectTractor // // FormTractorCollection // - this.ClientSize = new System.Drawing.Size(893, 536); + this.ClientSize = new System.Drawing.Size(918, 536); this.Controls.Add(this.groupBox); this.Controls.Add(this.pictureBoxCollection); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorConfig.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorConfig.cs index a4f5ff3..66fc72e 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorConfig.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/FormTractorConfig.cs @@ -9,6 +9,8 @@ using System.Threading.Tasks; using System.Windows.Forms; using ProjectTractor.DrawningObjects; using ProjectTractor.Entities; +using ProjectTractor.Generics; +using ProjectTractor.MovementStrategy; namespace ProjectTractor; @@ -29,6 +31,7 @@ public partial class FormTractorConfig : Form /// Конструктор /// // + public delegate void TractorDelegate(DrawningTractor tractor); public FormTractorConfig() { InitializeComponent(); @@ -170,6 +173,7 @@ public partial class FormTractorConfig : Form /// /// /// + /// private void ButtonOk_Click(object sender, EventArgs e) { if (_tractor == null) diff --git a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs index d978071..3151dfd 100644 --- a/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs +++ b/RPP_FirstLaba_Tractor/RPP_FirstLaba_Tractor/TractorsGenericCollection.cs @@ -134,7 +134,7 @@ namespace ProjectTractor.Generics if (tractor != null) { int countRows = _pictureWidth / _placeSizeWidth; - tractor.SetPosition(_pictureWidth - _placeSizeWidth * 2 - (i % countRows * _placeSizeWidth) + 20, _pictureHeight - i / countRows * _placeSizeHeight - 160); + tractor.SetPosition(_pictureWidth - _placeSizeWidth - (i % countRows * _placeSizeWidth), _pictureHeight - i / countRows * _placeSizeHeight - 160); tractor.DrawTransport(g); } i++;