diff --git a/speed_Boat/speed_Boat/FormBoatCollection.Designer.cs b/speed_Boat/speed_Boat/FormBoatCollection.Designer.cs index 556427f..5a22003 100644 --- a/speed_Boat/speed_Boat/FormBoatCollection.Designer.cs +++ b/speed_Boat/speed_Boat/FormBoatCollection.Designer.cs @@ -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(); diff --git a/speed_Boat/speed_Boat/FormBoatCollection.cs b/speed_Boat/speed_Boat/FormBoatCollection.cs index 8013202..b08c0e0 100644 --- a/speed_Boat/speed_Boat/FormBoatCollection.cs +++ b/speed_Boat/speed_Boat/FormBoatCollection.cs @@ -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 { diff --git a/speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs b/speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs index b76aeed..c90a97d 100644 --- a/speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs +++ b/speed_Boat/speed_Boat/FormSpeedBoat.Designer.cs @@ -184,7 +184,6 @@ namespace SpeedBoatLab Controls.Add(pictureBoxSpeedBoat); Name = "FormSpeedBoat"; Text = "Движение катера"; - Load += FormSpeedBoat_Load; ((System.ComponentModel.ISupportInitialize)pictureBoxSpeedBoat).EndInit(); ResumeLayout(false); } diff --git a/speed_Boat/speed_Boat/FormSpeedBoat.cs b/speed_Boat/speed_Boat/FormSpeedBoat.cs index 3de01b2..22f17b7 100644 --- a/speed_Boat/speed_Boat/FormSpeedBoat.cs +++ b/speed_Boat/speed_Boat/FormSpeedBoat.cs @@ -178,7 +178,6 @@ namespace SpeedBoatLab { SelectedBoat = _boatMovement; DialogResult = DialogResult.OK; - } } } diff --git a/speed_Boat/speed_Boat/GenericClass.cs b/speed_Boat/speed_Boat/GenericClass.cs index eee33dc..88764e1 100644 --- a/speed_Boat/speed_Boat/GenericClass.cs +++ b/speed_Boat/speed_Boat/GenericClass.cs @@ -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]; } }