Лаб1
This commit is contained in:
parent
e49ac3812f
commit
d898e0f034
@ -8,4 +8,19 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
23
AirBomber/BomberEntity.cs
Normal file
23
AirBomber/BomberEntity.cs
Normal file
@ -0,0 +1,23 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
public class BomberEntity
|
||||
{
|
||||
public int Speed { get; private set; }
|
||||
public double Weight { get; private set; }
|
||||
public Color BodyColor { get; private set; }
|
||||
public Color AdditionalColor { get; private set; }
|
||||
public bool Bombs { get; private set; }
|
||||
public bool FuelTanks { get; private set; }
|
||||
public double Step => (double)Speed * 100 / Weight * 5 / 2;
|
||||
|
||||
public void Init(int Speed, double Weight, Color BodyColor, Color AdditionalColor, bool FuelTanks, bool Bombs)
|
||||
{
|
||||
this.Speed = Speed;
|
||||
this.Weight = Weight;
|
||||
this.BodyColor = BodyColor;
|
||||
this.AdditionalColor = AdditionalColor;
|
||||
this.FuelTanks = FuelTanks;
|
||||
this.Bombs = Bombs;
|
||||
}
|
||||
}
|
||||
}
|
137
AirBomber/BomberForm.Designer.cs
generated
Normal file
137
AirBomber/BomberForm.Designer.cs
generated
Normal file
@ -0,0 +1,137 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
partial class BomberForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
BomberPictureBox = new PictureBox();
|
||||
CreateButton = new Button();
|
||||
ButtonRight = new Button();
|
||||
ButtonDown = new Button();
|
||||
ButtonLeft = new Button();
|
||||
ButtonUp = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)BomberPictureBox).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// BomberPictureBox
|
||||
//
|
||||
BomberPictureBox.Dock = DockStyle.Fill;
|
||||
BomberPictureBox.Location = new Point(0, 0);
|
||||
BomberPictureBox.Name = "BomberPictureBox";
|
||||
BomberPictureBox.Size = new Size(884, 461);
|
||||
BomberPictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
|
||||
BomberPictureBox.TabIndex = 0;
|
||||
BomberPictureBox.TabStop = false;
|
||||
//
|
||||
// CreateButton
|
||||
//
|
||||
CreateButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
CreateButton.Location = new Point(12, 419);
|
||||
CreateButton.Name = "CreateButton";
|
||||
CreateButton.Size = new Size(75, 30);
|
||||
CreateButton.TabIndex = 1;
|
||||
CreateButton.Text = "Создать";
|
||||
CreateButton.UseVisualStyleBackColor = true;
|
||||
CreateButton.Click += ButtonCreate_Click;
|
||||
//
|
||||
// ButtonRight
|
||||
//
|
||||
ButtonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
ButtonRight.BackgroundImage = Properties.Resources.ArrowRight;
|
||||
ButtonRight.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
ButtonRight.Location = new Point(842, 419);
|
||||
ButtonRight.Name = "ButtonRight";
|
||||
ButtonRight.Size = new Size(30, 30);
|
||||
ButtonRight.TabIndex = 2;
|
||||
ButtonRight.UseVisualStyleBackColor = true;
|
||||
ButtonRight.Click += ButtonMove_Click;
|
||||
//
|
||||
// ButtonDown
|
||||
//
|
||||
ButtonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
ButtonDown.BackgroundImage = Properties.Resources.ArrowDown;
|
||||
ButtonDown.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
ButtonDown.Location = new Point(806, 419);
|
||||
ButtonDown.Name = "ButtonDown";
|
||||
ButtonDown.Size = new Size(30, 30);
|
||||
ButtonDown.TabIndex = 3;
|
||||
ButtonDown.UseVisualStyleBackColor = true;
|
||||
ButtonDown.Click += ButtonMove_Click;
|
||||
//
|
||||
// ButtonLeft
|
||||
//
|
||||
ButtonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
ButtonLeft.BackgroundImage = Properties.Resources.ArrowLeft;
|
||||
ButtonLeft.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
ButtonLeft.Location = new Point(770, 419);
|
||||
ButtonLeft.Name = "ButtonLeft";
|
||||
ButtonLeft.Size = new Size(30, 30);
|
||||
ButtonLeft.TabIndex = 4;
|
||||
ButtonLeft.UseVisualStyleBackColor = true;
|
||||
ButtonLeft.Click += ButtonMove_Click;
|
||||
//
|
||||
// ButtonUp
|
||||
//
|
||||
ButtonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
ButtonUp.BackgroundImage = Properties.Resources.ArrowUp;
|
||||
ButtonUp.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
ButtonUp.Location = new Point(806, 383);
|
||||
ButtonUp.Name = "ButtonUp";
|
||||
ButtonUp.Size = new Size(30, 30);
|
||||
ButtonUp.TabIndex = 5;
|
||||
ButtonUp.UseVisualStyleBackColor = true;
|
||||
ButtonUp.Click += ButtonMove_Click;
|
||||
//
|
||||
// BomberForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(884, 461);
|
||||
Controls.Add(ButtonUp);
|
||||
Controls.Add(ButtonLeft);
|
||||
Controls.Add(ButtonDown);
|
||||
Controls.Add(ButtonRight);
|
||||
Controls.Add(CreateButton);
|
||||
Controls.Add(BomberPictureBox);
|
||||
Name = "BomberForm";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Бомбардировщик";
|
||||
((System.ComponentModel.ISupportInitialize)BomberPictureBox).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private PictureBox BomberPictureBox;
|
||||
private Button CreateButton;
|
||||
private Button ButtonRight;
|
||||
private Button ButtonDown;
|
||||
private Button ButtonLeft;
|
||||
private Button ButtonUp;
|
||||
}
|
||||
}
|
73
AirBomber/BomberForm.cs
Normal file
73
AirBomber/BomberForm.cs
Normal file
@ -0,0 +1,73 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
public partial class BomberForm : Form
|
||||
{
|
||||
private BomberRenderer? _bomberRenderer;
|
||||
|
||||
public BomberForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Draw()
|
||||
{
|
||||
if (_bomberRenderer == null)
|
||||
return;
|
||||
|
||||
Bitmap bmp = new Bitmap(BomberPictureBox.Width, BomberPictureBox.Height);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
_bomberRenderer.DrawEntity(g);
|
||||
|
||||
BomberPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
private void ButtonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random random = new Random();
|
||||
_bomberRenderer = new BomberRenderer();
|
||||
|
||||
_bomberRenderer.Init(
|
||||
random.Next(100, 300),
|
||||
random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
true,
|
||||
true,
|
||||
BomberPictureBox.Width,
|
||||
BomberPictureBox.Height
|
||||
);
|
||||
_bomberRenderer.SetPosition(random.Next(20, 100), random.Next(20, 100));
|
||||
|
||||
Draw();
|
||||
}
|
||||
|
||||
private void ButtonMove_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_bomberRenderer == null)
|
||||
return;
|
||||
|
||||
string ButtonName = ((Button)sender)?.Name ?? string.Empty;
|
||||
|
||||
switch (ButtonName)
|
||||
{
|
||||
case "ButtonUp":
|
||||
_bomberRenderer.MoveEntity(DirectionType.Up);
|
||||
break;
|
||||
|
||||
case "ButtonDown":
|
||||
_bomberRenderer.MoveEntity(DirectionType.Down);
|
||||
break;
|
||||
|
||||
case "ButtonLeft":
|
||||
_bomberRenderer.MoveEntity(DirectionType.Left);
|
||||
break;
|
||||
|
||||
case "ButtonRight":
|
||||
_bomberRenderer.MoveEntity(DirectionType.Right);
|
||||
break;
|
||||
}
|
||||
|
||||
Draw();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
176
AirBomber/BomberRenderer.cs
Normal file
176
AirBomber/BomberRenderer.cs
Normal file
@ -0,0 +1,176 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
public class BomberRenderer
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||
/// </summary>
|
||||
public BomberEntity? EntityBomber { get; private set; }
|
||||
|
||||
private int _pictureWidth;
|
||||
private int _pictureHeight;
|
||||
|
||||
private int _startPosX;
|
||||
private int _startPosY;
|
||||
|
||||
private readonly int _bomberWidth = 200;
|
||||
private readonly int _bomberHeight = 200;
|
||||
|
||||
public bool Init(int Speed, double Weight, Color BodyColor, Color AdditionalColor, bool FuelTanks, bool Bombs, int Width, int Height)
|
||||
{
|
||||
if (Width < _bomberWidth || Height < _bomberHeight)
|
||||
return false;
|
||||
|
||||
_pictureWidth = Width;
|
||||
_pictureHeight = Height;
|
||||
|
||||
EntityBomber = new BomberEntity();
|
||||
EntityBomber.Init(Speed, Weight, BodyColor, AdditionalColor, FuelTanks, Bombs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetPosition(int x, int y)
|
||||
{
|
||||
if (EntityBomber is null)
|
||||
return;
|
||||
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x + _bomberWidth > _pictureWidth)
|
||||
x = _pictureWidth - _bomberWidth;
|
||||
|
||||
_startPosX = x;
|
||||
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
else if (y + _bomberHeight > _pictureHeight)
|
||||
y = _pictureHeight - _bomberHeight;
|
||||
|
||||
_startPosY = y;
|
||||
}
|
||||
|
||||
public void MoveEntity(DirectionType Direction)
|
||||
{
|
||||
if (EntityBomber == null)
|
||||
return;
|
||||
|
||||
switch (Direction)
|
||||
{
|
||||
case DirectionType.Up:
|
||||
if (_startPosY - EntityBomber.Step > 0)
|
||||
_startPosY -= (int)EntityBomber.Step;
|
||||
|
||||
break;
|
||||
|
||||
case DirectionType.Down:
|
||||
if (_startPosY + _bomberHeight + EntityBomber.Step <= _pictureHeight)
|
||||
_startPosY += (int)EntityBomber.Step;
|
||||
|
||||
break;
|
||||
|
||||
case DirectionType.Left:
|
||||
if (_startPosX - EntityBomber.Step > 0)
|
||||
_startPosX -= (int)EntityBomber.Step;
|
||||
|
||||
break;
|
||||
|
||||
case DirectionType.Right:
|
||||
if (_startPosX + _bomberWidth + EntityBomber.Step <= _pictureWidth)
|
||||
_startPosX += (int)EntityBomber.Step;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawEntity(Graphics g)
|
||||
{
|
||||
if (EntityBomber == null)
|
||||
return;
|
||||
|
||||
Pen pen = new Pen(EntityBomber.BodyColor);
|
||||
Brush Brush = new SolidBrush(EntityBomber.BodyColor);
|
||||
Brush AdditionalBrush = new SolidBrush(EntityBomber.AdditionalColor);
|
||||
|
||||
/** Отрисовка основной части */
|
||||
Point[] LeftWing = {
|
||||
new Point(_startPosX + 90, _startPosY),
|
||||
new Point(_startPosX + 100, _startPosY),
|
||||
new Point(_startPosX + 108, _startPosY + 85),
|
||||
new Point(_startPosX + 90, _startPosY + 85),
|
||||
};
|
||||
g.DrawPolygon(pen, LeftWing);
|
||||
|
||||
Point[] RightWing = {
|
||||
new Point(_startPosX + 90, _startPosY + 200),
|
||||
new Point(_startPosX + 100, _startPosY + 200),
|
||||
new Point(_startPosX + 108, _startPosY + 115),
|
||||
new Point(_startPosX + 90, _startPosY + 115),
|
||||
};
|
||||
g.DrawPolygon(pen, RightWing);
|
||||
|
||||
Point[] Body = {
|
||||
new Point(_startPosX + 35, _startPosY + 85),
|
||||
new Point(_startPosX + 200, _startPosY + 85),
|
||||
new Point(_startPosX + 200, _startPosY + 115),
|
||||
new Point(_startPosX + 35, _startPosY + 115),
|
||||
};
|
||||
g.DrawPolygon(pen, Body);
|
||||
|
||||
Point[] Nose = {
|
||||
new Point(_startPosX, _startPosY + 100),
|
||||
new Point(_startPosX + 35, _startPosY + 85),
|
||||
new Point(_startPosX + 35, _startPosY + 115),
|
||||
};
|
||||
g.FillPolygon(Brush, Nose);
|
||||
|
||||
Point[] BackLeftWing = {
|
||||
new Point(_startPosX + 170, _startPosY + 70),
|
||||
new Point(_startPosX + 200, _startPosY + 40),
|
||||
new Point(_startPosX + 200, _startPosY + 85),
|
||||
new Point(_startPosX + 170, _startPosY + 85),
|
||||
};
|
||||
g.DrawPolygon(pen, BackLeftWing);
|
||||
|
||||
Point[] BackRightWing = {
|
||||
new Point(_startPosX + 170, _startPosY + 130),
|
||||
new Point(_startPosX + 200, _startPosY + 160),
|
||||
new Point(_startPosX + 200, _startPosY + 115),
|
||||
new Point(_startPosX + 170, _startPosY + 115),
|
||||
};
|
||||
g.DrawPolygon(pen, BackRightWing);
|
||||
|
||||
|
||||
/** Отрисовка дополнительных элементов */
|
||||
if (EntityBomber.FuelTanks)
|
||||
{
|
||||
Point[] LeftGasTank = {
|
||||
new Point(_startPosX + 50, _startPosY + 85),
|
||||
new Point(_startPosX + 75, _startPosY + 85),
|
||||
new Point(_startPosX + 75, _startPosY + 70),
|
||||
new Point(_startPosX + 50, _startPosY + 70),
|
||||
};
|
||||
g.FillPolygon(AdditionalBrush, LeftGasTank);
|
||||
|
||||
Point[] RightGasTank = {
|
||||
new Point(_startPosX + 50, _startPosY + 115),
|
||||
new Point(_startPosX + 75, _startPosY + 115),
|
||||
new Point(_startPosX + 75, _startPosY + 130),
|
||||
new Point(_startPosX + 50, _startPosY + 130),
|
||||
};
|
||||
g.FillPolygon(AdditionalBrush, RightGasTank);
|
||||
}
|
||||
|
||||
if (EntityBomber.Bombs)
|
||||
{
|
||||
Point LeftBombStartXY = new Point(_startPosX + 110, _startPosY + 115);
|
||||
Size LeftBombSize = new Size(50, 25);
|
||||
g.FillEllipse(AdditionalBrush, new Rectangle(LeftBombStartXY, LeftBombSize));
|
||||
|
||||
Point RightBombStartXY = new Point(_startPosX + 110, _startPosY + 60);
|
||||
Size RightBombSize = new Size(50, 25);
|
||||
g.FillEllipse(AdditionalBrush, new Rectangle(RightBombStartXY, RightBombSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
AirBomber/DirectionType.cs
Normal file
10
AirBomber/DirectionType.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
public enum DirectionType
|
||||
{
|
||||
Up = 1,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
}
|
39
AirBomber/Form1.Designer.cs
generated
39
AirBomber/Form1.Designer.cs
generated
@ -1,39 +0,0 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "Form1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace AirBomber
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -2,16 +2,11 @@ namespace AirBomber
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
Application.Run(new BomberForm());
|
||||
}
|
||||
}
|
||||
}
|
103
AirBomber/Properties/Resources.Designer.cs
generated
Normal file
103
AirBomber/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,103 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AirBomber.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
// с помощью такого средства, как ResGen или Visual Studio.
|
||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
// с параметром /str или перестройте свой проект VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AirBomber.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ArrowDown {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowDown", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ArrowLeft {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowLeft", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ArrowRight {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowRight", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ArrowUp {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
133
AirBomber/Properties/Resources.resx
Normal file
133
AirBomber/Properties/Resources.resx
Normal file
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ArrowDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArrowLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrowLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArrowRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArrowUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
AirBomber/Resources/ArrowDown.png
Normal file
BIN
AirBomber/Resources/ArrowDown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 418 B |
BIN
AirBomber/Resources/ArrowLeft.png
Normal file
BIN
AirBomber/Resources/ArrowLeft.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 362 B |
BIN
AirBomber/Resources/ArrowRight.png
Normal file
BIN
AirBomber/Resources/ArrowRight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 428 B |
BIN
AirBomber/Resources/ArrowUp.png
Normal file
BIN
AirBomber/Resources/ArrowUp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 412 B |
Loading…
Reference in New Issue
Block a user