This commit is contained in:
chtzsch ~ 2023-10-31 18:25:09 +03:00
parent 02d57aca01
commit 0b6de2c28b
5 changed files with 14 additions and 17 deletions

View File

@ -30,12 +30,12 @@ namespace SpeedBoatLab
private void InitializeComponent()
{
groupBox1 = new System.Windows.Forms.GroupBox();
label1 = new System.Windows.Forms.Label();
maskedTextBoxNumber = new System.Windows.Forms.MaskedTextBox();
UpdateCollectionButton = new System.Windows.Forms.Button();
DeleteBoatButton = new System.Windows.Forms.Button();
AddBoatButton = new System.Windows.Forms.Button();
pictureBoxCollection = new System.Windows.Forms.PictureBox();
label1 = new System.Windows.Forms.Label();
groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit();
SuspendLayout();
@ -54,6 +54,15 @@ namespace SpeedBoatLab
groupBox1.TabStop = false;
groupBox1.Text = "Настройки";
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(6, 85);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(135, 20);
label1.TabIndex = 4;
label1.Text = "введите позицию:";
//
// maskedTextBoxNumber
//
maskedTextBoxNumber.Location = new System.Drawing.Point(6, 108);
@ -99,15 +108,6 @@ namespace SpeedBoatLab
pictureBoxCollection.TabIndex = 1;
pictureBoxCollection.TabStop = false;
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(6, 85);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(135, 20);
label1.TabIndex = 4;
label1.Text = "введите позицию:";
//
// FormBoatCollection
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
@ -116,7 +116,7 @@ namespace SpeedBoatLab
Controls.Add(pictureBoxCollection);
Controls.Add(groupBox1);
Name = "FormBoatCollection";
Text = "FormBoatCollection";
Text = "Коллекция катеров";
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).EndInit();

View File

@ -76,9 +76,9 @@ namespace SpeedBoatLab
pictureBoxCollection.Image = _boats.ShowBoats();
}
}
else if(insertPosition == string.Empty)
else if (insertPosition == string.Empty)
{
MessageBox.Show("Неверный формат позиции");
MessageBox.Show("Неверный формат позиции");
}
else
{

View File

@ -184,7 +184,6 @@ namespace SpeedBoatLab
Controls.Add(pictureBoxSpeedBoat);
Name = "FormSpeedBoat";
Text = "Движение катера";
Load += FormSpeedBoat_Load;
((System.ComponentModel.ISupportInitialize)pictureBoxSpeedBoat).EndInit();
ResumeLayout(false);
}

View File

@ -178,7 +178,6 @@ namespace SpeedBoatLab
{
SelectedBoat = _boatMovement;
DialogResult = DialogResult.OK;
}
}
}

View File

@ -32,7 +32,6 @@ namespace speed_Boat.Generics
public bool Insert(T boat)
{
int currentI = -1;
// TODO вставка в начало набора
for(int i = 0; i < _places.Length; i++)
{
if (_places[i] == null)
@ -116,7 +115,7 @@ namespace speed_Boat.Generics
}
else
{
return _places[position];//возвращает элемент тип genericClass
return _places[position];
}
}