From 294c75c51c7803231babd2cb8a27b4f99f0528e3 Mon Sep 17 00:00:00 2001 From: malimova Date: Sun, 10 Dec 2023 18:12:21 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A7=D1=82=D0=BE-=D1=82=D0=BE=20=D1=81=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BD=D0=BE=20=D0=B2=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B5=20AdditionalGeneric,=20=D0=BD=D0=BE=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormAdditionalGeneric.Designer.cs | 42 +++++++++++-- AirBomber/AirBomber/FormAdditionalGeneric.cs | 9 +++ .../AirBomber/FormAdditionalGeneric.resx | 62 +------------------ 3 files changed, 48 insertions(+), 65 deletions(-) diff --git a/AirBomber/AirBomber/FormAdditionalGeneric.Designer.cs b/AirBomber/AirBomber/FormAdditionalGeneric.Designer.cs index 0a9e5eb..8d13ede 100644 --- a/AirBomber/AirBomber/FormAdditionalGeneric.Designer.cs +++ b/AirBomber/AirBomber/FormAdditionalGeneric.Designer.cs @@ -28,12 +28,46 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "FormAdditionalGeneric"; + pictureBoxObject = new PictureBox(); + buttonCreate = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxObject).BeginInit(); + SuspendLayout(); + // + // pictureBoxObject + // + pictureBoxObject.Dock = DockStyle.Fill; + pictureBoxObject.Location = new Point(0, 0); + pictureBoxObject.Name = "pictureBoxObject"; + pictureBoxObject.Size = new Size(908, 460); + pictureBoxObject.TabIndex = 0; + pictureBoxObject.TabStop = false; + // + // buttonCreate + // + buttonCreate.Location = new Point(726, 28); + buttonCreate.Name = "buttonCreate"; + buttonCreate.Size = new Size(152, 66); + buttonCreate.TabIndex = 1; + buttonCreate.Text = "Создать"; + buttonCreate.UseVisualStyleBackColor = true; + buttonCreate.Click += buttonCreate_Click; + // + // FormAdditionalGeneric + // + AutoScaleDimensions = new SizeF(10F, 25F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(908, 460); + Controls.Add(buttonCreate); + Controls.Add(pictureBoxObject); + Name = "FormAdditionalGeneric"; + Text = "FormAdditionalGeneric"; + ((System.ComponentModel.ISupportInitialize)pictureBoxObject).EndInit(); + ResumeLayout(false); } #endregion + + private PictureBox pictureBoxObject; + private Button buttonCreate; } } \ No newline at end of file diff --git a/AirBomber/AirBomber/FormAdditionalGeneric.cs b/AirBomber/AirBomber/FormAdditionalGeneric.cs index 53ef532..804620b 100644 --- a/AirBomber/AirBomber/FormAdditionalGeneric.cs +++ b/AirBomber/AirBomber/FormAdditionalGeneric.cs @@ -12,9 +12,18 @@ namespace AirBomber { public partial class FormAdditionalGeneric : Form { + private DrawningAirPlane _drawningAirPlane; + private AdditionalGeneric additionalGeneric; + private readonly int _pictureWidth = 200; + private readonly int _pictureHeight = 200; public FormAdditionalGeneric() { InitializeComponent(); } + + private void buttonCreate_Click(object sender, EventArgs e) + { + _drawningAirPlane = additionalGeneric.CreateDrawObject(); + } } } diff --git a/AirBomber/AirBomber/FormAdditionalGeneric.resx b/AirBomber/AirBomber/FormAdditionalGeneric.resx index 1af7de1..f298a7b 100644 --- a/AirBomber/AirBomber/FormAdditionalGeneric.resx +++ b/AirBomber/AirBomber/FormAdditionalGeneric.resx @@ -1,64 +1,4 @@ - - - +