From f6e0225337fa18ce423f5b7a0a673295b1566934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BC=D0=B0?= Date: Fri, 30 Aug 2024 03:10:35 +0400 Subject: [PATCH] s --- .../ProjertTrain/FormTrainConfing.Designer.cs | 138 +++++++----------- ProjertTrain/ProjertTrain/FormTrainConfing.cs | 10 ++ 2 files changed, 62 insertions(+), 86 deletions(-) diff --git a/ProjertTrain/ProjertTrain/FormTrainConfing.Designer.cs b/ProjertTrain/ProjertTrain/FormTrainConfing.Designer.cs index baecb96..386791b 100644 --- a/ProjertTrain/ProjertTrain/FormTrainConfing.Designer.cs +++ b/ProjertTrain/ProjertTrain/FormTrainConfing.Designer.cs @@ -30,7 +30,6 @@ { groupBoxConfing = new GroupBox(); groupBoxColors = new GroupBox(); - pictureBox1 = new PictureBox(); panelPurple = new Panel(); panelBlack = new Panel(); panelGray = new Panel(); @@ -56,7 +55,6 @@ labelBodyColor = new Label(); groupBoxConfing.SuspendLayout(); groupBoxColors.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownWeight).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxObject).BeginInit(); @@ -77,17 +75,14 @@ groupBoxConfing.Controls.Add(labelSimpleObject); groupBoxConfing.Dock = DockStyle.Left; groupBoxConfing.Location = new Point(0, 0); - groupBoxConfing.Margin = new Padding(3, 2, 3, 2); groupBoxConfing.Name = "groupBoxConfing"; - groupBoxConfing.Padding = new Padding(3, 2, 3, 2); - groupBoxConfing.Size = new Size(548, 196); + groupBoxConfing.Size = new Size(626, 261); groupBoxConfing.TabIndex = 0; groupBoxConfing.TabStop = false; groupBoxConfing.Text = "Параметры"; // // groupBoxColors // - groupBoxColors.Controls.Add(pictureBox1); groupBoxColors.Controls.Add(panelPurple); groupBoxColors.Controls.Add(panelBlack); groupBoxColors.Controls.Add(panelGray); @@ -96,102 +91,84 @@ groupBoxColors.Controls.Add(panelBlue); groupBoxColors.Controls.Add(panelGreen); groupBoxColors.Controls.Add(panelRed); - groupBoxColors.Location = new Point(286, 20); - groupBoxColors.Margin = new Padding(3, 2, 3, 2); + groupBoxColors.Location = new Point(327, 27); groupBoxColors.Name = "groupBoxColors"; - groupBoxColors.Padding = new Padding(3, 2, 3, 2); - groupBoxColors.Size = new Size(245, 116); + groupBoxColors.Size = new Size(280, 155); groupBoxColors.TabIndex = 9; groupBoxColors.TabStop = false; groupBoxColors.Text = "Цвета"; // - // pictureBox1 - // - pictureBox1.Location = new Point(188, 18); - pictureBox1.Name = "pictureBox1"; - pictureBox1.Size = new Size(100, 50); - pictureBox1.TabIndex = 2; - pictureBox1.TabStop = false; - // // panelPurple // panelPurple.BackColor = Color.Purple; - panelPurple.Location = new Point(190, 72); - panelPurple.Margin = new Padding(3, 2, 3, 2); + panelPurple.Location = new Point(217, 96); panelPurple.Name = "panelPurple"; - panelPurple.Size = new Size(42, 35); + panelPurple.Size = new Size(48, 47); panelPurple.TabIndex = 1; // // panelBlack // panelBlack.BackColor = Color.Black; - panelBlack.Location = new Point(130, 72); - panelBlack.Margin = new Padding(3, 2, 3, 2); + panelBlack.Location = new Point(149, 96); panelBlack.Name = "panelBlack"; - panelBlack.Size = new Size(42, 35); + panelBlack.Size = new Size(48, 47); panelBlack.TabIndex = 1; // // panelGray // panelGray.BackColor = Color.Gray; - panelGray.Location = new Point(72, 72); - panelGray.Margin = new Padding(3, 2, 3, 2); + panelGray.Location = new Point(82, 96); panelGray.Name = "panelGray"; - panelGray.Size = new Size(42, 35); + panelGray.Size = new Size(48, 47); panelGray.TabIndex = 1; // // panelWhite // panelWhite.BackColor = Color.White; - panelWhite.Location = new Point(15, 72); - panelWhite.Margin = new Padding(3, 2, 3, 2); + panelWhite.Location = new Point(17, 96); panelWhite.Name = "panelWhite"; - panelWhite.Size = new Size(42, 35); + panelWhite.Size = new Size(48, 47); panelWhite.TabIndex = 1; // // panelYellow // panelYellow.BackColor = Color.Yellow; - panelYellow.Location = new Point(190, 23); - panelYellow.Margin = new Padding(3, 2, 3, 2); + panelYellow.Location = new Point(217, 31); panelYellow.Name = "panelYellow"; - panelYellow.Size = new Size(42, 35); + panelYellow.Size = new Size(48, 47); panelYellow.TabIndex = 1; // // panelBlue // panelBlue.BackColor = Color.Blue; - panelBlue.Location = new Point(130, 23); - panelBlue.Margin = new Padding(3, 2, 3, 2); + panelBlue.Location = new Point(149, 31); panelBlue.Name = "panelBlue"; - panelBlue.Size = new Size(42, 35); + panelBlue.Size = new Size(48, 47); panelBlue.TabIndex = 1; + panelBlue.Paint += panelBlue_Paint; // // panelGreen // panelGreen.BackColor = Color.Green; - panelGreen.Location = new Point(72, 23); - panelGreen.Margin = new Padding(3, 2, 3, 2); + panelGreen.Location = new Point(82, 31); panelGreen.Name = "panelGreen"; - panelGreen.Size = new Size(42, 35); + panelGreen.Size = new Size(48, 47); panelGreen.TabIndex = 1; // // panelRed // panelRed.BackColor = Color.Red; - panelRed.Location = new Point(15, 23); - panelRed.Margin = new Padding(3, 2, 3, 2); + panelRed.Location = new Point(17, 31); panelRed.Name = "panelRed"; - panelRed.Size = new Size(42, 35); + panelRed.Size = new Size(48, 47); panelRed.TabIndex = 0; // // checkBoxHeadlight // checkBoxHeadlight.AutoSize = true; - checkBoxHeadlight.Location = new Point(5, 163); - checkBoxHeadlight.Margin = new Padding(3, 2, 3, 2); + checkBoxHeadlight.Location = new Point(6, 217); checkBoxHeadlight.Name = "checkBoxHeadlight"; - checkBoxHeadlight.Size = new Size(168, 19); + checkBoxHeadlight.Size = new Size(211, 24); checkBoxHeadlight.TabIndex = 8; checkBoxHeadlight.Text = "Признак наличие фонаря"; checkBoxHeadlight.UseVisualStyleBackColor = true; @@ -200,10 +177,9 @@ // checkBoxElectro // checkBoxElectro.AutoSize = true; - checkBoxElectro.Location = new Point(5, 127); - checkBoxElectro.Margin = new Padding(3, 2, 3, 2); + checkBoxElectro.Location = new Point(6, 169); checkBoxElectro.Name = "checkBoxElectro"; - checkBoxElectro.Size = new Size(170, 19); + checkBoxElectro.Size = new Size(215, 24); checkBoxElectro.TabIndex = 7; checkBoxElectro.Text = "Признак наличие батареи"; checkBoxElectro.UseVisualStyleBackColor = true; @@ -212,10 +188,9 @@ // checkBoxHorns // checkBoxHorns.AutoSize = true; - checkBoxHorns.Location = new Point(5, 92); - checkBoxHorns.Margin = new Padding(3, 2, 3, 2); + checkBoxHorns.Location = new Point(6, 123); checkBoxHorns.Name = "checkBoxHorns"; - checkBoxHorns.Size = new Size(158, 19); + checkBoxHorns.Size = new Size(199, 24); checkBoxHorns.TabIndex = 6; checkBoxHorns.Text = "Признак наличие рогов"; checkBoxHorns.UseVisualStyleBackColor = true; @@ -223,50 +198,48 @@ // // numericUpDownWeight // - numericUpDownWeight.Location = new Point(82, 51); - numericUpDownWeight.Margin = new Padding(3, 2, 3, 2); + numericUpDownWeight.Location = new Point(94, 68); numericUpDownWeight.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); numericUpDownWeight.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); numericUpDownWeight.Name = "numericUpDownWeight"; - numericUpDownWeight.Size = new Size(100, 23); + numericUpDownWeight.Size = new Size(114, 27); numericUpDownWeight.TabIndex = 5; numericUpDownWeight.Value = new decimal(new int[] { 100, 0, 0, 0 }); // // labelWeight // labelWeight.AutoSize = true; - labelWeight.Location = new Point(24, 52); + labelWeight.Location = new Point(27, 69); labelWeight.Name = "labelWeight"; - labelWeight.Size = new Size(29, 15); + labelWeight.Size = new Size(36, 20); labelWeight.TabIndex = 4; labelWeight.Text = "Вес:"; // // numericUpDownSpeed // - numericUpDownSpeed.Location = new Point(82, 24); - numericUpDownSpeed.Margin = new Padding(3, 2, 3, 2); + numericUpDownSpeed.Location = new Point(94, 32); numericUpDownSpeed.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); numericUpDownSpeed.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); numericUpDownSpeed.Name = "numericUpDownSpeed"; - numericUpDownSpeed.Size = new Size(100, 23); + numericUpDownSpeed.Size = new Size(114, 27); numericUpDownSpeed.TabIndex = 3; numericUpDownSpeed.Value = new decimal(new int[] { 100, 0, 0, 0 }); // // labelSpeed // labelSpeed.AutoSize = true; - labelSpeed.Location = new Point(10, 24); + labelSpeed.Location = new Point(11, 32); labelSpeed.Name = "labelSpeed"; - labelSpeed.Size = new Size(62, 15); + labelSpeed.Size = new Size(76, 20); labelSpeed.TabIndex = 2; labelSpeed.Text = "Скорость:"; // // labelModifiedObject // labelModifiedObject.BorderStyle = BorderStyle.FixedSingle; - labelModifiedObject.Location = new Point(416, 152); + labelModifiedObject.Location = new Point(475, 203); labelModifiedObject.Name = "labelModifiedObject"; - labelModifiedObject.Size = new Size(115, 34); + labelModifiedObject.Size = new Size(131, 45); labelModifiedObject.TabIndex = 1; labelModifiedObject.Text = "Продвинутый"; labelModifiedObject.TextAlign = ContentAlignment.MiddleCenter; @@ -275,9 +248,9 @@ // labelSimpleObject // labelSimpleObject.BorderStyle = BorderStyle.FixedSingle; - labelSimpleObject.Location = new Point(286, 152); + labelSimpleObject.Location = new Point(327, 203); labelSimpleObject.Name = "labelSimpleObject"; - labelSimpleObject.Size = new Size(114, 34); + labelSimpleObject.Size = new Size(130, 45); labelSimpleObject.TabIndex = 0; labelSimpleObject.Text = "Простой"; labelSimpleObject.TextAlign = ContentAlignment.MiddleCenter; @@ -285,19 +258,17 @@ // // pictureBoxObject // - pictureBoxObject.Location = new Point(10, 42); - pictureBoxObject.Margin = new Padding(3, 2, 3, 2); + pictureBoxObject.Location = new Point(11, 56); pictureBoxObject.Name = "pictureBoxObject"; - pictureBoxObject.Size = new Size(160, 94); + pictureBoxObject.Size = new Size(183, 125); pictureBoxObject.TabIndex = 1; pictureBoxObject.TabStop = false; // // buttonAdd // - buttonAdd.Location = new Point(553, 159); - buttonAdd.Margin = new Padding(3, 2, 3, 2); + buttonAdd.Location = new Point(632, 212); buttonAdd.Name = "buttonAdd"; - buttonAdd.Size = new Size(82, 22); + buttonAdd.Size = new Size(94, 29); buttonAdd.TabIndex = 2; buttonAdd.Text = "Добавить"; buttonAdd.UseVisualStyleBackColor = true; @@ -305,10 +276,9 @@ // // buttonCancel // - buttonCancel.Location = new Point(648, 159); - buttonCancel.Margin = new Padding(3, 2, 3, 2); + buttonCancel.Location = new Point(741, 212); buttonCancel.Name = "buttonCancel"; - buttonCancel.Size = new Size(82, 22); + buttonCancel.Size = new Size(94, 29); buttonCancel.TabIndex = 3; buttonCancel.Text = "Отмена"; buttonCancel.UseVisualStyleBackColor = true; @@ -319,10 +289,9 @@ panelObject.Controls.Add(labelAdditionalColor); panelObject.Controls.Add(labelBodyColor); panelObject.Controls.Add(pictureBoxObject); - panelObject.Location = new Point(553, 9); - panelObject.Margin = new Padding(3, 2, 3, 2); + panelObject.Location = new Point(632, 12); panelObject.Name = "panelObject"; - panelObject.Size = new Size(179, 146); + panelObject.Size = new Size(205, 195); panelObject.TabIndex = 4; panelObject.DragDrop += PanelObject_DragDrop; panelObject.DragEnter += PanelObject_DragEnter; @@ -331,9 +300,9 @@ // labelAdditionalColor.AllowDrop = true; labelAdditionalColor.BorderStyle = BorderStyle.FixedSingle; - labelAdditionalColor.Location = new Point(94, 8); + labelAdditionalColor.Location = new Point(107, 11); labelAdditionalColor.Name = "labelAdditionalColor"; - labelAdditionalColor.Size = new Size(73, 28); + labelAdditionalColor.Size = new Size(83, 37); labelAdditionalColor.TabIndex = 3; labelAdditionalColor.Text = "Доп. цвет"; labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter; @@ -344,9 +313,9 @@ // labelBodyColor.AllowDrop = true; labelBodyColor.BorderStyle = BorderStyle.FixedSingle; - labelBodyColor.Location = new Point(10, 8); + labelBodyColor.Location = new Point(11, 11); labelBodyColor.Name = "labelBodyColor"; - labelBodyColor.Size = new Size(73, 28); + labelBodyColor.Size = new Size(83, 37); labelBodyColor.TabIndex = 2; labelBodyColor.Text = "Цвет"; labelBodyColor.TextAlign = ContentAlignment.MiddleCenter; @@ -355,21 +324,19 @@ // // FormTrainConfing // - AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(733, 196); + ClientSize = new Size(838, 261); Controls.Add(panelObject); Controls.Add(buttonCancel); Controls.Add(buttonAdd); Controls.Add(groupBoxConfing); - Margin = new Padding(3, 2, 3, 2); Name = "FormTrainConfing"; Text = "Создание объекта"; Load += FormTrainConfing_Load; groupBoxConfing.ResumeLayout(false); groupBoxConfing.PerformLayout(); groupBoxColors.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownWeight).EndInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxObject).EndInit(); @@ -404,6 +371,5 @@ private Panel panelObject; private Label labelBodyColor; private Label labelAdditionalColor; - private PictureBox pictureBox1; } } \ No newline at end of file diff --git a/ProjertTrain/ProjertTrain/FormTrainConfing.cs b/ProjertTrain/ProjertTrain/FormTrainConfing.cs index 14f7ab7..b7c975a 100644 --- a/ProjertTrain/ProjertTrain/FormTrainConfing.cs +++ b/ProjertTrain/ProjertTrain/FormTrainConfing.cs @@ -193,5 +193,15 @@ namespace ProjectTrain { } + + private void panelBlue_Paint(object sender, PaintEventArgs e) + { + + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } } }