From 1535b540380f64247d8a15a1a6f6465cfcad8a9a Mon Sep 17 00:00:00 2001 From: Kamil Haliullov Date: Fri, 23 Dec 2022 08:23:07 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D0=B4=D0=BE?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AntiAircraftGun/DrawingAntiAircraftGun.cs | 2 +- .../FormAntiAircraftGun.Designer.cs | 49 +++++++++++-------- .../AntiAircraftGun/FormAntiAircraftGun.cs | 5 ++ 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/AntiAircraftGun/AntiAircraftGun/DrawingAntiAircraftGun.cs b/AntiAircraftGun/AntiAircraftGun/DrawingAntiAircraftGun.cs index a6d9fb0..05d9a74 100644 --- a/AntiAircraftGun/AntiAircraftGun/DrawingAntiAircraftGun.cs +++ b/AntiAircraftGun/AntiAircraftGun/DrawingAntiAircraftGun.cs @@ -130,7 +130,7 @@ namespace AntiAircraftGun g.DrawEllipse(pen, _startPosX + 70, _startPosY + 20, 20, 20); //катки в гусеницах Brush brBlack = new SolidBrush(Color.Black); - g.FillEllipse(brBlack, _startPosX + 1, _startPosY + 21, 18, 18); + g.FillEllipse(brBlack, _startPosX +1, _startPosY + 21, 18, 18); g.FillEllipse(brBlack, _startPosX + 71, _startPosY + 21, 18, 18); g.FillEllipse(brBlack, _startPosX + 19, _startPosY + 30, 11, 11); g.FillEllipse(brBlack, _startPosX + 58, _startPosY + 30, 11, 11); diff --git a/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.Designer.cs b/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.Designer.cs index 32da52c..c6429cf 100644 --- a/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.Designer.cs +++ b/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.Designer.cs @@ -46,11 +46,13 @@ // this.pictureBoxAntiAircraftGun.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBoxAntiAircraftGun.Location = new System.Drawing.Point(0, 0); + this.pictureBoxAntiAircraftGun.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxAntiAircraftGun.Name = "pictureBoxAntiAircraftGun"; - this.pictureBoxAntiAircraftGun.Size = new System.Drawing.Size(800, 425); + this.pictureBoxAntiAircraftGun.Size = new System.Drawing.Size(700, 316); this.pictureBoxAntiAircraftGun.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBoxAntiAircraftGun.TabIndex = 0; this.pictureBoxAntiAircraftGun.TabStop = false; + this.pictureBoxAntiAircraftGun.Click += new System.EventHandler(this.pictureBoxAntiAircraftGun_Click); this.pictureBoxAntiAircraftGun.Resize += new System.EventHandler(this.PictureBoxAntiAircraftGun_Resize); // // statusStrip @@ -60,35 +62,37 @@ this.toolStripStatusLabelSpeed, this.toolStripStatusLabelWeight, this.toolStripStatusLabelBodyColor}); - this.statusStrip.Location = new System.Drawing.Point(0, 425); + this.statusStrip.Location = new System.Drawing.Point(0, 316); this.statusStrip.Name = "statusStrip"; - this.statusStrip.Size = new System.Drawing.Size(800, 26); + this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0); + this.statusStrip.Size = new System.Drawing.Size(700, 22); this.statusStrip.TabIndex = 1; // // toolStripStatusLabelSpeed // this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed"; - this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(73, 20); + this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(59, 17); this.toolStripStatusLabelSpeed.Text = "Скорость"; // // toolStripStatusLabelWeight // this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight"; - this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(33, 20); + this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(26, 17); this.toolStripStatusLabelWeight.Text = "Вес"; // // toolStripStatusLabelBodyColor // this.toolStripStatusLabelBodyColor.Name = "toolStripStatusLabelBodyColor"; - this.toolStripStatusLabelBodyColor.Size = new System.Drawing.Size(42, 20); + this.toolStripStatusLabelBodyColor.Size = new System.Drawing.Size(33, 17); this.toolStripStatusLabelBodyColor.Text = "Цвет"; // // buttonCreate // this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonCreate.Location = new System.Drawing.Point(11, 381); + this.buttonCreate.Location = new System.Drawing.Point(10, 286); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonCreate.Name = "buttonCreate"; - this.buttonCreate.Size = new System.Drawing.Size(94, 29); + this.buttonCreate.Size = new System.Drawing.Size(82, 22); this.buttonCreate.TabIndex = 2; this.buttonCreate.Text = "Создать"; this.buttonCreate.UseVisualStyleBackColor = true; @@ -99,9 +103,10 @@ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonUp.BackgroundImage = global::AntiAircraftGun.Properties.Resources.arrowUp; this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.buttonUp.Location = new System.Drawing.Point(725, 341); + this.buttonUp.Location = new System.Drawing.Point(634, 256); + this.buttonUp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonUp.Name = "buttonUp"; - this.buttonUp.Size = new System.Drawing.Size(30, 29); + this.buttonUp.Size = new System.Drawing.Size(26, 26); this.buttonUp.TabIndex = 3; this.buttonUp.UseVisualStyleBackColor = true; this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click); @@ -111,9 +116,10 @@ this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonLeft.BackgroundImage = global::AntiAircraftGun.Properties.Resources.arrowLeft; this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.buttonLeft.Location = new System.Drawing.Point(688, 379); + this.buttonLeft.Location = new System.Drawing.Point(602, 284); + this.buttonLeft.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonLeft.Name = "buttonLeft"; - this.buttonLeft.Size = new System.Drawing.Size(30, 29); + this.buttonLeft.Size = new System.Drawing.Size(26, 26); this.buttonLeft.TabIndex = 4; this.buttonLeft.UseVisualStyleBackColor = true; this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click); @@ -123,9 +129,10 @@ this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonRight.BackgroundImage = global::AntiAircraftGun.Properties.Resources.arrowRight; this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.buttonRight.Location = new System.Drawing.Point(760, 379); + this.buttonRight.Location = new System.Drawing.Point(665, 284); + this.buttonRight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonRight.Name = "buttonRight"; - this.buttonRight.Size = new System.Drawing.Size(30, 29); + this.buttonRight.Size = new System.Drawing.Size(26, 26); this.buttonRight.TabIndex = 5; this.buttonRight.UseVisualStyleBackColor = true; this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click); @@ -135,18 +142,19 @@ this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonDown.BackgroundImage = global::AntiAircraftGun.Properties.Resources.arrowDown; this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.buttonDown.Location = new System.Drawing.Point(725, 379); + this.buttonDown.Location = new System.Drawing.Point(634, 284); + this.buttonDown.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonDown.Name = "buttonDown"; - this.buttonDown.Size = new System.Drawing.Size(30, 29); + this.buttonDown.Size = new System.Drawing.Size(26, 26); this.buttonDown.TabIndex = 6; this.buttonDown.UseVisualStyleBackColor = true; this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click); // // FormAntiAircraftGun // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 451); + this.ClientSize = new System.Drawing.Size(700, 338); this.Controls.Add(this.buttonDown); this.Controls.Add(this.buttonRight); this.Controls.Add(this.buttonLeft); @@ -154,9 +162,10 @@ this.Controls.Add(this.buttonCreate); this.Controls.Add(this.pictureBoxAntiAircraftGun); this.Controls.Add(this.statusStrip); - this.MinimumSize = new System.Drawing.Size(50, 80); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.MinimumSize = new System.Drawing.Size(46, 70); this.Name = "FormAntiAircraftGun"; - this.Text = "Зенитное орудие"; + this.Text = "Бронированная машина"; this.Click += new System.EventHandler(this.ButtonMove_Click); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAntiAircraftGun)).EndInit(); this.statusStrip.ResumeLayout(false); diff --git a/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.cs b/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.cs index a3430d4..2353718 100644 --- a/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.cs +++ b/AntiAircraftGun/AntiAircraftGun/FormAntiAircraftGun.cs @@ -78,5 +78,10 @@ namespace AntiAircraftGun _antiAircrafGun?.ChangeBorders(pictureBoxAntiAircraftGun.Width, pictureBoxAntiAircraftGun.Height); Draw(); } + + private void pictureBoxAntiAircraftGun_Click(object sender, EventArgs e) + { + + } } } \ No newline at end of file