lab3
This commit is contained in:
parent
02d57aca01
commit
0b6de2c28b
22
speed_Boat/speed_Boat/FormBoatCollection.Designer.cs
generated
22
speed_Boat/speed_Boat/FormBoatCollection.Designer.cs
generated
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
1
speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs
generated
1
speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs
generated
@ -184,7 +184,6 @@ namespace SpeedBoatLab
|
||||
Controls.Add(pictureBoxSpeedBoat);
|
||||
Name = "FormSpeedBoat";
|
||||
Text = "Движение катера";
|
||||
Load += FormSpeedBoat_Load;
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxSpeedBoat).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
@ -178,7 +178,6 @@ namespace SpeedBoatLab
|
||||
{
|
||||
SelectedBoat = _boatMovement;
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user