исправления

This commit is contained in:
Артём Ерастов 2024-10-01 21:49:49 +04:00
parent a4c26fed31
commit ade3f04903
2 changed files with 45 additions and 31 deletions

View File

@ -4,12 +4,9 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace lab0; namespace Teplohod;
public enum DirectionType public enum DirectionType
{ {
Up=1, Up = 1, Down = 2, Left = 3, Right = 4,
Down=2,
Left=3,
Right=4,
} }

View File

@ -3,12 +3,12 @@
partial class FormTeplohod partial class FormTeplohod
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
@ -23,8 +23,8 @@
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
@ -41,54 +41,67 @@
// //
pictureBoxTeplohod.Dock = DockStyle.Fill; pictureBoxTeplohod.Dock = DockStyle.Fill;
pictureBoxTeplohod.Location = new Point(0, 0); pictureBoxTeplohod.Location = new Point(0, 0);
pictureBoxTeplohod.Margin = new Padding(3, 4, 3, 4);
pictureBoxTeplohod.Name = "pictureBoxTeplohod"; pictureBoxTeplohod.Name = "pictureBoxTeplohod";
pictureBoxTeplohod.Size = new Size(882, 553); pictureBoxTeplohod.Size = new Size(775, 487);
pictureBoxTeplohod.SizeMode = PictureBoxSizeMode.AutoSize;
pictureBoxTeplohod.TabIndex = 0; pictureBoxTeplohod.TabIndex = 0;
pictureBoxTeplohod.TabStop = false; pictureBoxTeplohod.TabStop = false;
// //
// buttonCreate // buttonCreate
// //
buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
buttonCreate.Location = new Point(12, 512); buttonCreate.Location = new Point(12, 415);
buttonCreate.Margin = new Padding(3, 4, 3, 4);
buttonCreate.Name = "buttonCreate"; buttonCreate.Name = "buttonCreate";
buttonCreate.Size = new Size(94, 29); buttonCreate.Size = new Size(93, 49);
buttonCreate.TabIndex = 1; buttonCreate.TabIndex = 1;
buttonCreate.Text = "создать"; buttonCreate.Text = "СОЗДАТЬ";
buttonCreate.UseVisualStyleBackColor = true; buttonCreate.UseVisualStyleBackColor = true;
buttonCreate.Click += ButtonCreateSportCar_Click;
// //
// buttonLeft // buttonLeft
// //
buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonLeft.BackColor = SystemColors.ButtonFace;
buttonLeft.BackgroundImage = Properties.Resources.влево; buttonLeft.BackgroundImage = Properties.Resources.влево;
buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; buttonLeft.BackgroundImageLayout = ImageLayout.Zoom;
buttonLeft.Location = new Point(738, 500); buttonLeft.Location = new Point(557, 415);
buttonLeft.Margin = new Padding(3, 4, 3, 4);
buttonLeft.Name = "buttonLeft"; buttonLeft.Name = "buttonLeft";
buttonLeft.Size = new Size(40, 40); buttonLeft.Size = new Size(50, 50);
buttonLeft.TabIndex = 2; buttonLeft.TabIndex = 2;
buttonLeft.UseVisualStyleBackColor = true; buttonLeft.Text = " ";
buttonLeft.UseVisualStyleBackColor = false;
buttonLeft.Click += ButtonMove_Click; buttonLeft.Click += ButtonMove_Click;
// //
// buttonUp // buttonUp
// //
buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonUp.BackColor = SystemColors.Menu;
buttonUp.BackgroundImage = Properties.Resources.вверх; buttonUp.BackgroundImage = Properties.Resources.вверх;
buttonUp.BackgroundImageLayout = ImageLayout.Stretch; buttonUp.BackgroundImageLayout = ImageLayout.Zoom;
buttonUp.Location = new Point(784, 454); buttonUp.ImageAlign = ContentAlignment.MiddleLeft;
buttonUp.Location = new Point(613, 357);
buttonUp.Margin = new Padding(3, 4, 3, 4);
buttonUp.Name = "buttonUp"; buttonUp.Name = "buttonUp";
buttonUp.Size = new Size(40, 40); buttonUp.Size = new Size(50, 50);
buttonUp.TabIndex = 3; buttonUp.TabIndex = 3;
buttonUp.UseVisualStyleBackColor = true; buttonUp.Text = " ";
buttonUp.UseVisualStyleBackColor = false;
buttonUp.Click += ButtonMove_Click; buttonUp.Click += ButtonMove_Click;
// //
// buttonRight // buttonRight
// //
buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonRight.BackgroundImage = Properties.Resources.вправо; buttonRight.BackgroundImage = Properties.Resources.вправо;
buttonRight.BackgroundImageLayout = ImageLayout.Stretch; buttonRight.BackgroundImageLayout = ImageLayout.Zoom;
buttonRight.Location = new Point(830, 501); buttonRight.Location = new Point(669, 415);
buttonRight.Margin = new Padding(3, 4, 3, 4);
buttonRight.Name = "buttonRight"; buttonRight.Name = "buttonRight";
buttonRight.Size = new Size(40, 40); buttonRight.Size = new Size(50, 50);
buttonRight.TabIndex = 4; buttonRight.TabIndex = 5;
buttonRight.Text = " ";
buttonRight.UseVisualStyleBackColor = true; buttonRight.UseVisualStyleBackColor = true;
buttonRight.Click += ButtonMove_Click; buttonRight.Click += ButtonMove_Click;
// //
@ -96,11 +109,13 @@
// //
buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonDown.BackgroundImage = Properties.Resources.вниз; buttonDown.BackgroundImage = Properties.Resources.вниз;
buttonDown.BackgroundImageLayout = ImageLayout.Stretch; buttonDown.BackgroundImageLayout = ImageLayout.Zoom;
buttonDown.Location = new Point(784, 500); buttonDown.Location = new Point(613, 415);
buttonDown.Margin = new Padding(3, 4, 3, 4);
buttonDown.Name = "buttonDown"; buttonDown.Name = "buttonDown";
buttonDown.Size = new Size(40, 40); buttonDown.Size = new Size(50, 50);
buttonDown.TabIndex = 5; buttonDown.TabIndex = 6;
buttonDown.Text = " ";
buttonDown.UseVisualStyleBackColor = true; buttonDown.UseVisualStyleBackColor = true;
buttonDown.Click += ButtonMove_Click; buttonDown.Click += ButtonMove_Click;
// //
@ -108,17 +123,19 @@
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(882, 553); ClientSize = new Size(775, 487);
Controls.Add(buttonDown); Controls.Add(buttonDown);
Controls.Add(buttonRight); Controls.Add(buttonRight);
Controls.Add(buttonUp); Controls.Add(buttonUp);
Controls.Add(buttonLeft); Controls.Add(buttonLeft);
Controls.Add(buttonCreate); Controls.Add(buttonCreate);
Controls.Add(pictureBoxTeplohod); Controls.Add(pictureBoxTeplohod);
Margin = new Padding(3, 4, 3, 4);
Name = "FormTeplohod"; Name = "FormTeplohod";
Text = "Теплоход"; Text = "Form1";
((System.ComponentModel.ISupportInitialize)pictureBoxTeplohod).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxTeplohod).EndInit();
ResumeLayout(false); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion