From 7259d846ede0e6898d4d8eb0e80cf4235ee1605c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=8F=D1=80=20=D0=90=D0=B3=D0=BB?= =?UTF-8?q?=D0=B8=D1=83=D0=BB=D0=BB=D0=BE=D0=B2?= Date: Fri, 30 Sep 2022 23:23:02 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B0=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=20?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8=20=D1=81?= =?UTF-8?q?=D0=B0=D0=BC=D0=BE=D0=BB=D0=B5=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r.cs => FormGeneratorAirplane.Designer.cs} | 176 +++++++++++------- AirBomber/AirBomber/FormGeneratorAirplane.cs | 119 ++++++++++++ ...planes.resx => FormGeneratorAirplane.resx} | 0 .../AirBomber/FormMapWithSetAirplanes.cs | 153 --------------- AirBomber/AirBomber/GeneratorAirplane.cs | 4 +- AirBomber/AirBomber/Program.cs | 2 +- 6 files changed, 234 insertions(+), 220 deletions(-) rename AirBomber/AirBomber/{FormMapWithSetAirplanes.Designer.cs => FormGeneratorAirplane.Designer.cs} (52%) create mode 100644 AirBomber/AirBomber/FormGeneratorAirplane.cs rename AirBomber/AirBomber/{FormMapWithSetAirplanes.resx => FormGeneratorAirplane.resx} (100%) delete mode 100644 AirBomber/AirBomber/FormMapWithSetAirplanes.cs diff --git a/AirBomber/AirBomber/FormMapWithSetAirplanes.Designer.cs b/AirBomber/AirBomber/FormGeneratorAirplane.Designer.cs similarity index 52% rename from AirBomber/AirBomber/FormMapWithSetAirplanes.Designer.cs rename to AirBomber/AirBomber/FormGeneratorAirplane.Designer.cs index 8d581aa..5d85129 100644 --- a/AirBomber/AirBomber/FormMapWithSetAirplanes.Designer.cs +++ b/AirBomber/AirBomber/FormGeneratorAirplane.Designer.cs @@ -1,6 +1,6 @@ namespace AirBomber { - partial class FormMapWithSetAirplanes + partial class FormGeneratorAirplane { /// /// Required designer variable. @@ -29,32 +29,43 @@ private void InitializeComponent() { this.groupBoxTools = new System.Windows.Forms.GroupBox(); - this.maskedTextBoxPosition = new System.Windows.Forms.MaskedTextBox(); - this.buttonRemoveAirplane = new System.Windows.Forms.Button(); - this.buttonShowStorage = new System.Windows.Forms.Button(); + this.labelSpeed = new System.Windows.Forms.Label(); + this.numericSpeed = new System.Windows.Forms.NumericUpDown(); + this.labelWeight = new System.Windows.Forms.Label(); + this.numericWeight = new System.Windows.Forms.NumericUpDown(); + this.btnGenerateAirplane = new System.Windows.Forms.Button(); + this.labelCountEngines = new System.Windows.Forms.Label(); + this.numericUpDownEngines = new System.Windows.Forms.NumericUpDown(); + this.btnAddCountEngines = new System.Windows.Forms.Button(); + this.buttonAddTypeOfEntity = new System.Windows.Forms.Button(); this.buttonDown = new System.Windows.Forms.Button(); this.buttonRight = new System.Windows.Forms.Button(); this.buttonLeft = new System.Windows.Forms.Button(); this.buttonUp = new System.Windows.Forms.Button(); - this.buttonShowOnMap = new System.Windows.Forms.Button(); - this.buttonAddAirplane = new System.Windows.Forms.Button(); this.comboBoxSelectorMap = new System.Windows.Forms.ComboBox(); this.pictureBox = new System.Windows.Forms.PictureBox(); this.groupBoxTools.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericWeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEngines)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); this.SuspendLayout(); // // groupBoxTools // - this.groupBoxTools.Controls.Add(this.maskedTextBoxPosition); - this.groupBoxTools.Controls.Add(this.buttonRemoveAirplane); - this.groupBoxTools.Controls.Add(this.buttonShowStorage); + this.groupBoxTools.Controls.Add(this.labelSpeed); + this.groupBoxTools.Controls.Add(this.numericSpeed); + this.groupBoxTools.Controls.Add(this.labelWeight); + this.groupBoxTools.Controls.Add(this.numericWeight); + this.groupBoxTools.Controls.Add(this.btnGenerateAirplane); + this.groupBoxTools.Controls.Add(this.labelCountEngines); + this.groupBoxTools.Controls.Add(this.numericUpDownEngines); + this.groupBoxTools.Controls.Add(this.btnAddCountEngines); + this.groupBoxTools.Controls.Add(this.buttonAddTypeOfEntity); this.groupBoxTools.Controls.Add(this.buttonDown); this.groupBoxTools.Controls.Add(this.buttonRight); this.groupBoxTools.Controls.Add(this.buttonLeft); this.groupBoxTools.Controls.Add(this.buttonUp); - this.groupBoxTools.Controls.Add(this.buttonShowOnMap); - this.groupBoxTools.Controls.Add(this.buttonAddAirplane); this.groupBoxTools.Controls.Add(this.comboBoxSelectorMap); this.groupBoxTools.Dock = System.Windows.Forms.DockStyle.Right; this.groupBoxTools.Location = new System.Drawing.Point(811, 0); @@ -64,34 +75,83 @@ this.groupBoxTools.TabStop = false; this.groupBoxTools.Text = "Инструменты"; // - // maskedTextBoxPosition + // labelSpeed // - this.maskedTextBoxPosition.Location = new System.Drawing.Point(17, 166); - this.maskedTextBoxPosition.Mask = "00"; - this.maskedTextBoxPosition.Name = "maskedTextBoxPosition"; - this.maskedTextBoxPosition.Size = new System.Drawing.Size(175, 23); - this.maskedTextBoxPosition.TabIndex = 2; - this.maskedTextBoxPosition.ValidatingType = typeof(int); + this.labelSpeed.AutoSize = true; + this.labelSpeed.Location = new System.Drawing.Point(17, 58); + this.labelSpeed.Name = "labelSpeed"; + this.labelSpeed.Size = new System.Drawing.Size(117, 15); + this.labelSpeed.TabIndex = 19; + this.labelSpeed.Text = "Скорость самолета:"; // - // buttonRemoveAirplane + // numericSpeed // - this.buttonRemoveAirplane.Location = new System.Drawing.Point(17, 195); - this.buttonRemoveAirplane.Name = "buttonRemoveAirplane"; - this.buttonRemoveAirplane.Size = new System.Drawing.Size(175, 35); - this.buttonRemoveAirplane.TabIndex = 3; - this.buttonRemoveAirplane.Text = "Удалить самолет"; - this.buttonRemoveAirplane.UseVisualStyleBackColor = true; - this.buttonRemoveAirplane.Click += new System.EventHandler(this.ButtonRemoveAirplane_Click); + this.numericSpeed.Location = new System.Drawing.Point(136, 56); + this.numericSpeed.Name = "numericSpeed"; + this.numericSpeed.Size = new System.Drawing.Size(56, 23); + this.numericSpeed.TabIndex = 18; // - // buttonShowStorage + // labelWeight // - this.buttonShowStorage.Location = new System.Drawing.Point(17, 287); - this.buttonShowStorage.Name = "buttonShowStorage"; - this.buttonShowStorage.Size = new System.Drawing.Size(175, 35); - this.buttonShowStorage.TabIndex = 4; - this.buttonShowStorage.Text = "Посмотреть хранилище"; - this.buttonShowStorage.UseVisualStyleBackColor = true; - this.buttonShowStorage.Click += new System.EventHandler(this.ButtonShowStorage_Click); + this.labelWeight.AutoSize = true; + this.labelWeight.Location = new System.Drawing.Point(17, 83); + this.labelWeight.Name = "labelWeight"; + this.labelWeight.Size = new System.Drawing.Size(100, 15); + this.labelWeight.TabIndex = 17; + this.labelWeight.Text = "Масса самолета:"; + // + // numericWeight + // + this.numericWeight.Location = new System.Drawing.Point(136, 81); + this.numericWeight.Name = "numericWeight"; + this.numericWeight.Size = new System.Drawing.Size(56, 23); + this.numericWeight.TabIndex = 16; + // + // btnGenerateAirplane + // + this.btnGenerateAirplane.Location = new System.Drawing.Point(17, 233); + this.btnGenerateAirplane.Name = "btnGenerateAirplane"; + this.btnGenerateAirplane.Size = new System.Drawing.Size(175, 23); + this.btnGenerateAirplane.TabIndex = 15; + this.btnGenerateAirplane.Text = "Сгенерировать самолет"; + this.btnGenerateAirplane.UseVisualStyleBackColor = true; + this.btnGenerateAirplane.Click += new System.EventHandler(this.btnGenerateAirplane_Click); + // + // labelCountEngines + // + this.labelCountEngines.AutoSize = true; + this.labelCountEngines.Location = new System.Drawing.Point(17, 157); + this.labelCountEngines.Name = "labelCountEngines"; + this.labelCountEngines.Size = new System.Drawing.Size(113, 15); + this.labelCountEngines.TabIndex = 14; + this.labelCountEngines.Text = "Кол-во двигателей:"; + // + // numericUpDownEngines + // + this.numericUpDownEngines.Location = new System.Drawing.Point(136, 155); + this.numericUpDownEngines.Name = "numericUpDownEngines"; + this.numericUpDownEngines.Size = new System.Drawing.Size(56, 23); + this.numericUpDownEngines.TabIndex = 13; + // + // btnAddCountEngines + // + this.btnAddCountEngines.Location = new System.Drawing.Point(17, 184); + this.btnAddCountEngines.Name = "btnAddCountEngines"; + this.btnAddCountEngines.Size = new System.Drawing.Size(175, 43); + this.btnAddCountEngines.TabIndex = 12; + this.btnAddCountEngines.Text = "Добавить кол-во двигателей для генерации"; + this.btnAddCountEngines.UseVisualStyleBackColor = true; + this.btnAddCountEngines.Click += new System.EventHandler(this.btnAddCountEngines_Click); + // + // buttonAddTypeOfEntity + // + this.buttonAddTypeOfEntity.Location = new System.Drawing.Point(17, 110); + this.buttonAddTypeOfEntity.Name = "buttonAddTypeOfEntity"; + this.buttonAddTypeOfEntity.Size = new System.Drawing.Size(175, 39); + this.buttonAddTypeOfEntity.TabIndex = 11; + this.buttonAddTypeOfEntity.Text = "Добавить свойства для генерации"; + this.buttonAddTypeOfEntity.UseVisualStyleBackColor = true; + this.buttonAddTypeOfEntity.Click += new System.EventHandler(this.buttonAddTypeOfEntity_Click); // // buttonDown // @@ -137,33 +197,14 @@ this.buttonUp.TabIndex = 7; this.buttonUp.UseVisualStyleBackColor = true; // - // buttonShowOnMap - // - this.buttonShowOnMap.Location = new System.Drawing.Point(17, 391); - this.buttonShowOnMap.Name = "buttonShowOnMap"; - this.buttonShowOnMap.Size = new System.Drawing.Size(175, 35); - this.buttonShowOnMap.TabIndex = 5; - this.buttonShowOnMap.Text = "Посмотреть карту"; - this.buttonShowOnMap.UseVisualStyleBackColor = true; - this.buttonShowOnMap.Click += new System.EventHandler(this.ButtonShowOnMap_Click); - // - // buttonAddAirplane - // - this.buttonAddAirplane.Location = new System.Drawing.Point(17, 106); - this.buttonAddAirplane.Name = "buttonAddAirplane"; - this.buttonAddAirplane.Size = new System.Drawing.Size(175, 35); - this.buttonAddAirplane.TabIndex = 1; - this.buttonAddAirplane.Text = "Добавить самолет"; - this.buttonAddAirplane.UseVisualStyleBackColor = true; - this.buttonAddAirplane.Click += new System.EventHandler(this.ButtonAddAirplane_Click); - // // comboBoxSelectorMap // this.comboBoxSelectorMap.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxSelectorMap.FormattingEnabled = true; this.comboBoxSelectorMap.Items.AddRange(new object[] { - "Простая карта", "Карта со стенами"}); - this.comboBoxSelectorMap.Location = new System.Drawing.Point(17, 32); + "Простая карта", + "Карта со стенами"}); + this.comboBoxSelectorMap.Location = new System.Drawing.Point(17, 27); this.comboBoxSelectorMap.Name = "comboBoxSelectorMap"; this.comboBoxSelectorMap.Size = new System.Drawing.Size(175, 23); this.comboBoxSelectorMap.TabIndex = 0; @@ -178,17 +219,20 @@ this.pictureBox.TabIndex = 1; this.pictureBox.TabStop = false; // - // FormMapWithSetAirplanes + // FormGeneratorAirplane // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1015, 554); this.Controls.Add(this.pictureBox); this.Controls.Add(this.groupBoxTools); - this.Name = "FormMapWithSetAirplanes"; - this.Text = "Карта с набором объектов"; + this.Name = "FormGeneratorAirplane"; + this.Text = "Генератор самолетов"; this.groupBoxTools.ResumeLayout(false); this.groupBoxTools.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericWeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEngines)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); this.ResumeLayout(false); @@ -199,14 +243,18 @@ private GroupBox groupBoxTools; private PictureBox pictureBox; private ComboBox comboBoxSelectorMap; - private Button buttonShowOnMap; - private Button buttonAddAirplane; private Button buttonDown; private Button buttonRight; private Button buttonLeft; private Button buttonUp; - private Button buttonShowStorage; - private Button buttonRemoveAirplane; - private MaskedTextBox maskedTextBoxPosition; + private Button btnAddCountEngines; + private Button buttonAddTypeOfEntity; + private Label labelCountEngines; + private NumericUpDown numericUpDownEngines; + private Button btnGenerateAirplane; + private Label labelSpeed; + private NumericUpDown numericSpeed; + private Label labelWeight; + private NumericUpDown numericWeight; } } \ No newline at end of file diff --git a/AirBomber/AirBomber/FormGeneratorAirplane.cs b/AirBomber/AirBomber/FormGeneratorAirplane.cs new file mode 100644 index 0000000..ca4b529 --- /dev/null +++ b/AirBomber/AirBomber/FormGeneratorAirplane.cs @@ -0,0 +1,119 @@ +namespace AirBomber +{ + public partial class FormGeneratorAirplane : Form + { + /// + /// Объект от класса карты с набором объектов + /// + private GeneratorAirplane _generatorAirplane; + private IDrawningObject? _airplane; + private AbstractMap? _map; + /// + /// Конструктор + /// + public FormGeneratorAirplane() + { + _generatorAirplane = new(100, 100); + InitializeComponent(); + } + /// + /// Выбор карты + /// + /// + /// + private void ComboBoxSelectorMap_SelectedIndexChanged(object sender, EventArgs e) + { + switch (comboBoxSelectorMap.Text) + { + case "Простая карта": + _map = new SimpleMap(); + break; + case "Карта со стенами": + _map = new WallMap(); + break; + } + if (_map != null) + { + pictureBox.Image = _map.CreateMap(pictureBox.Width, pictureBox.Height, _airplane); + } + } + /// + /// Перемещение + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + //получаем имя кнопки + string name = ((Button)sender)?.Name ?? string.Empty; + Direction dir = Direction.None; + switch (name) + { + case "buttonUp": + dir = Direction.Up; + break; + case "buttonDown": + dir = Direction.Down; + break; + case "buttonLeft": + dir = Direction.Left; + break; + case "buttonRight": + dir = Direction.Right; + break; + } + pictureBox.Image = _map?.MoveObject(dir) ?? pictureBox.Image; + } + + private void buttonAddTypeOfEntity_Click(object sender, EventArgs e) + { + Random rnd = new(); + Color colorBody = Color.FromArgb(rnd.Next() % 256, rnd.Next() % 256, rnd.Next() % 256); + ColorDialog dialog = new(); + if (dialog.ShowDialog() == DialogResult.OK) + { + colorBody = dialog.Color; + } + var entity = new EntityAirplane((int)numericSpeed.Value, (int)numericWeight.Value, colorBody); + _generatorAirplane.AddTypeOfEntity(entity); + MessageBox.Show($"Добавлены свойства самолета:\n" + + $"Вес: {entity.Weight}\n" + + $"Скорость: {entity.Speed}\n" + + $"Цвет: {colorBody.Name}", + "Успешно добавлены свойства"); + } + + private void btnGenerateAirplane_Click(object sender, EventArgs e) + { + var airplane = _generatorAirplane.Generate(); + if (airplane == null) + { + MessageBox.Show("Не удалось сгенерировать самолет. Добавьте хотя бы по одному количество двигателей и свойств для генерации" + , "Генерация самолета"); + return; + } + _airplane = airplane; + + // Если есть карта отрисовываем объект на карте иначе на пустом фоне + if (_map != null) + { + pictureBox.Image = _map.CreateMap(pictureBox.Width, pictureBox.Height, _airplane); + } + else if (_airplane != null) + { + var rnd = new Random(); + pictureBox.Image = new Bitmap(pictureBox.Width, pictureBox.Height); + var g = Graphics.FromImage(pictureBox.Image); + _airplane.SetObject(rnd.Next() % 256, rnd.Next() % 256, pictureBox.Image.Width, pictureBox.Image.Height); + _airplane.DrawningObject(g); + } + } + + private void btnAddCountEngines_Click(object sender, EventArgs e) + { + IAirplaneEngines engines = new DrawningAirplaneEngines(); + engines.CountEngines = (int)numericUpDownEngines.Value; + _generatorAirplane.AddTypeOfEngines(engines); + } + } +} \ No newline at end of file diff --git a/AirBomber/AirBomber/FormMapWithSetAirplanes.resx b/AirBomber/AirBomber/FormGeneratorAirplane.resx similarity index 100% rename from AirBomber/AirBomber/FormMapWithSetAirplanes.resx rename to AirBomber/AirBomber/FormGeneratorAirplane.resx diff --git a/AirBomber/AirBomber/FormMapWithSetAirplanes.cs b/AirBomber/AirBomber/FormMapWithSetAirplanes.cs deleted file mode 100644 index def5d4e..0000000 --- a/AirBomber/AirBomber/FormMapWithSetAirplanes.cs +++ /dev/null @@ -1,153 +0,0 @@ -namespace AirBomber -{ - public partial class FormMapWithSetAirplanes : Form - { - /// - /// Объект от класса карты с набором объектов - /// - private MapWithSetAirplanesGeneric _mapAirplanesCollectionGeneric; - /// - /// Конструктор - /// - public FormMapWithSetAirplanes() - { - InitializeComponent(); - } - /// - /// Выбор карты - /// - /// - /// - private void ComboBoxSelectorMap_SelectedIndexChanged(object sender, EventArgs e) - { - AbstractMap map = null; - switch (comboBoxSelectorMap.Text) - { - case "Простая карта": - map = new SimpleMap(); - break; - case "Карта со стенами": - map = new WallMap(); - break; - } - if (map != null) - { - _mapAirplanesCollectionGeneric = new MapWithSetAirplanesGeneric( - pictureBox.Width, pictureBox.Height, map); - } - else - { - _mapAirplanesCollectionGeneric = null; - } - } - /// - /// Добавление объекта - /// - /// - /// - private void ButtonAddAirplane_Click(object sender, EventArgs e) - { - if(_mapAirplanesCollectionGeneric == null) - { - return; - } - FormAirBomber form = new(); - if (form.ShowDialog() == DialogResult.OK) - { - DrawningObject airplane = new(form.SelectedAirplane); - if (form.SelectedAirplane == null || !(_mapAirplanesCollectionGeneric + airplane)) - { - MessageBox.Show("Не удалось добавить объект"); - } - else - { - MessageBox.Show("Объект добавлен"); - pictureBox.Image = _mapAirplanesCollectionGeneric.ShowSet(); - } - } - } - /// - /// Удаление объекта - /// - /// - /// - private void ButtonRemoveAirplane_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(maskedTextBoxPosition.Text)) - { - return; - } - if (MessageBox.Show("Удалить объект?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - int pos = Convert.ToInt32(maskedTextBoxPosition.Text); - if (_mapAirplanesCollectionGeneric - pos) - { - MessageBox.Show("Объект удален"); - pictureBox.Image = _mapAirplanesCollectionGeneric.ShowSet(); - } - else - { - MessageBox.Show("Не удалось удалить объект"); - } - } - /// - /// Вывод набора - /// - /// - /// - private void ButtonShowStorage_Click(object sender, EventArgs e) - { - if (_mapAirplanesCollectionGeneric == null) - { - return; - } - pictureBox.Image = _mapAirplanesCollectionGeneric.ShowSet(); - } - /// - /// Вывод карты - /// - /// - /// - private void ButtonShowOnMap_Click(object sender, EventArgs e) - { - if (_mapAirplanesCollectionGeneric == null) - { - return; - } - pictureBox.Image = _mapAirplanesCollectionGeneric.ShowOnMap(); - } - /// - /// Перемещение - /// - /// - /// - private void ButtonMove_Click(object sender, EventArgs e) - { - if (_mapAirplanesCollectionGeneric == null) - { - return; - } - //получаем имя кнопки - string name = ((Button)sender)?.Name ?? string.Empty; - Direction dir = Direction.None; - switch (name) - { - case "buttonUp": - dir = Direction.Up; - break; - case "buttonDown": - dir = Direction.Down; - break; - case "buttonLeft": - dir = Direction.Left; - break; - case "buttonRight": - dir = Direction.Right; - break; - } - pictureBox.Image = _mapAirplanesCollectionGeneric.MoveObject(dir); - } - } -} \ No newline at end of file diff --git a/AirBomber/AirBomber/GeneratorAirplane.cs b/AirBomber/AirBomber/GeneratorAirplane.cs index de39540..8bf1d6e 100644 --- a/AirBomber/AirBomber/GeneratorAirplane.cs +++ b/AirBomber/AirBomber/GeneratorAirplane.cs @@ -31,7 +31,7 @@ namespace AirBomber /// /// тип /// Успешно ли проведена операция - public bool AddTypeOfEntity(T type) + public virtual bool AddTypeOfEntity(T type) { if (NumTypesOfEntity >= typesOfEntity.Length) { @@ -45,7 +45,7 @@ namespace AirBomber /// /// тип /// Успешно ли проведена операция - public bool AddTypeOfEngines(U type) + public virtual bool AddTypeOfEngines(U type) { if (NumTypesOfEngines >= typesOfEngines.Length) { diff --git a/AirBomber/AirBomber/Program.cs b/AirBomber/AirBomber/Program.cs index 76b85fe..f84a0f2 100644 --- a/AirBomber/AirBomber/Program.cs +++ b/AirBomber/AirBomber/Program.cs @@ -11,7 +11,7 @@ namespace AirBomber // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new FormAirBomber()); + Application.Run(new FormGeneratorAirplane()); } } } \ No newline at end of file