This commit is contained in:
NikGapon 2022-11-07 18:25:10 +04:00
parent 6f76cd6c4a
commit 8f82b634a8
8 changed files with 311 additions and 5 deletions

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Airbus
{
internal enum Direction
public enum Direction
{
None = 0,
Left = 1, //Влево

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Airbus
{
internal class DrawningAirplane
public class DrawningAirplane
{
/// Класс-сущность
public EntityAirplane airplane { protected set; get; }

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Airbus
{
internal class EntityAirplane
public class EntityAirplane
{
public int Speed { get; private set; } //Скорость
public float Weight { get; private set; } //Вес

View File

@ -37,6 +37,7 @@
this.buttonLeft = new System.Windows.Forms.Button();
this.buttonDown = new System.Windows.Forms.Button();
this.buttonModCreate = new System.Windows.Forms.Button();
this.buttonSelecdAirplane = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.SuspendLayout();
@ -151,11 +152,22 @@
this.buttonModCreate.UseVisualStyleBackColor = true;
this.buttonModCreate.Click += new System.EventHandler(this.buttonModCreate_Click);
//
// FormAirbus
// buttonSelecdAirplane
//
this.buttonSelecdAirplane.Location = new System.Drawing.Point(595, 402);
this.buttonSelecdAirplane.Name = "buttonSelecdAirplane";
this.buttonSelecdAirplane.Size = new System.Drawing.Size(75, 23);
this.buttonSelecdAirplane.TabIndex = 8;
this.buttonSelecdAirplane.Text = "Выбрать";
this.buttonSelecdAirplane.UseVisualStyleBackColor = true;
this.buttonSelecdAirplane.Click += new System.EventHandler(this.buttonSelectAirplane_Click);
//
// FormAirplane
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.buttonSelecdAirplane);
this.Controls.Add(this.buttonModCreate);
this.Controls.Add(this.buttonDown);
this.Controls.Add(this.buttonLeft);
@ -164,7 +176,7 @@
this.Controls.Add(this.buttonCreate);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.pictureBox);
this.Name = "FormAirbus";
this.Name = "FormAirplane";
this.Text = "Airbus";
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
@ -185,5 +197,6 @@
private Button buttonLeft;
private Button buttonDown;
private Button buttonModCreate;
private Button buttonSelecdAirplane;
}
}

View File

@ -15,6 +15,8 @@ namespace Airbus
{
private DrawningAirplane airplane;
public DrawningAirplane SelectedAirplane { get; private set; }
public FormAirplane()
{
InitializeComponent();
@ -81,5 +83,10 @@ namespace Airbus
SetData();
Draw();
}
private void buttonSelectAirplane_Click(object sender, EventArgs e)
{
SelectedAirplane = airplane;
DialogResult = DialogResult.OK;
}
}
}

View File

@ -0,0 +1,191 @@
namespace Airbus
{
partial class FormMapWithSetAirplane
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBoxTools = new System.Windows.Forms.GroupBox();
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.buttonStorage = new System.Windows.Forms.Button();
this.buttonRemoveAirplane = new System.Windows.Forms.Button();
this.maskedTextBoxPosition = new System.Windows.Forms.MaskedTextBox();
this.buttonAddAirbus = new System.Windows.Forms.Button();
this.comboBoxSelectorMap = new System.Windows.Forms.ComboBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.groupBoxTools.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// groupBoxTools
//
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.buttonStorage);
this.groupBoxTools.Controls.Add(this.buttonRemoveAirplane);
this.groupBoxTools.Controls.Add(this.maskedTextBoxPosition);
this.groupBoxTools.Controls.Add(this.buttonAddAirbus);
this.groupBoxTools.Controls.Add(this.comboBoxSelectorMap);
this.groupBoxTools.Dock = System.Windows.Forms.DockStyle.Right;
this.groupBoxTools.Location = new System.Drawing.Point(600, 0);
this.groupBoxTools.Name = "groupBoxTools";
this.groupBoxTools.Size = new System.Drawing.Size(200, 450);
this.groupBoxTools.TabIndex = 0;
this.groupBoxTools.TabStop = false;
this.groupBoxTools.Text = "Инструменты";
//
// buttonDown
//
this.buttonDown.Location = new System.Drawing.Point(0, 0);
this.buttonDown.Name = "buttonDown";
this.buttonDown.Size = new System.Drawing.Size(75, 23);
this.buttonDown.TabIndex = 0;
//
// buttonRight
//
this.buttonRight.Location = new System.Drawing.Point(0, 0);
this.buttonRight.Name = "buttonRight";
this.buttonRight.Size = new System.Drawing.Size(75, 23);
this.buttonRight.TabIndex = 1;
//
// buttonLeft
//
this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonLeft.BackgroundImage = global::Airbus.Properties.Resources.v1;
this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.buttonLeft.Location = new System.Drawing.Point(49, 348);
this.buttonLeft.Name = "buttonLeft";
this.buttonLeft.Size = new System.Drawing.Size(35, 35);
this.buttonLeft.TabIndex = 7;
this.buttonLeft.UseVisualStyleBackColor = true;
//
// buttonUp
//
this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUp.BackgroundImage = global::Airbus.Properties.Resources.v2;
this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.buttonUp.Location = new System.Drawing.Point(80, 316);
this.buttonUp.Name = "buttonUp";
this.buttonUp.Size = new System.Drawing.Size(35, 35);
this.buttonUp.TabIndex = 6;
this.buttonUp.UseVisualStyleBackColor = true;
//
// buttonShowOnMap
//
this.buttonShowOnMap.Location = new System.Drawing.Point(62, 268);
this.buttonShowOnMap.Name = "buttonShowOnMap";
this.buttonShowOnMap.Size = new System.Drawing.Size(75, 23);
this.buttonShowOnMap.TabIndex = 5;
this.buttonShowOnMap.Text = "карта";
this.buttonShowOnMap.UseVisualStyleBackColor = true;
//
// buttonStorage
//
this.buttonStorage.Location = new System.Drawing.Point(6, 239);
this.buttonStorage.Name = "buttonStorage";
this.buttonStorage.Size = new System.Drawing.Size(188, 23);
this.buttonStorage.TabIndex = 4;
this.buttonStorage.Text = "Хранилище";
this.buttonStorage.UseVisualStyleBackColor = true;
//
// buttonRemoveAirplane
//
this.buttonRemoveAirplane.Location = new System.Drawing.Point(6, 146);
this.buttonRemoveAirplane.Name = "buttonRemoveAirplane";
this.buttonRemoveAirplane.Size = new System.Drawing.Size(182, 23);
this.buttonRemoveAirplane.TabIndex = 3;
this.buttonRemoveAirplane.Text = "Удалить";
this.buttonRemoveAirplane.UseVisualStyleBackColor = true;
//
// maskedTextBoxPosition
//
this.maskedTextBoxPosition.Location = new System.Drawing.Point(6, 117);
this.maskedTextBoxPosition.Mask = "00";
this.maskedTextBoxPosition.Name = "maskedTextBoxPosition";
this.maskedTextBoxPosition.Size = new System.Drawing.Size(182, 23);
this.maskedTextBoxPosition.TabIndex = 2;
//
// buttonAddAirbus
//
this.buttonAddAirbus.Location = new System.Drawing.Point(6, 71);
this.buttonAddAirbus.Name = "buttonAddAirbus";
this.buttonAddAirbus.Size = new System.Drawing.Size(182, 23);
this.buttonAddAirbus.TabIndex = 1;
this.buttonAddAirbus.Text = "Добавить Самолёт";
this.buttonAddAirbus.UseVisualStyleBackColor = true;
//
// comboBoxSelectorMap
//
this.comboBoxSelectorMap.FormattingEnabled = true;
this.comboBoxSelectorMap.Location = new System.Drawing.Point(6, 22);
this.comboBoxSelectorMap.Name = "comboBoxSelectorMap";
this.comboBoxSelectorMap.Size = new System.Drawing.Size(182, 23);
this.comboBoxSelectorMap.TabIndex = 0;
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(600, 450);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// FormMapWithSetAirplane
//
this.ClientSize = new System.Drawing.Size(284, 261);
this.Name = "FormMapWithSetAirplane";
this.Load += new System.EventHandler(this.FormMapWithSetAirplane_Load);
this.groupBoxTools.ResumeLayout(false);
this.groupBoxTools.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private GroupBox groupBoxTools;
private Button buttonShowOnMap;
private Button buttonStorage;
private Button buttonRemoveAirplane;
private MaskedTextBox maskedTextBoxPosition;
private Button buttonAddAirbus;
private ComboBox comboBoxSelectorMap;
private PictureBox pictureBox1;
private Button buttonUp;
private Button buttonLeft;
private Button buttonRight;
private Button buttonDown;
}
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Airbus
{
public partial class FormMapWithSetAirplane : Form
{
public FormMapWithSetAirplane()
{
InitializeComponent();
}
private void buttonLeft_Click(object sender, EventArgs e)
{
}
private void buttonRight_Click(object sender, EventArgs e)
{
}
private void FormMapWithSetAirplane_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>