Compare commits

...

2 Commits

Author SHA1 Message Date
d639cbd1cc 4 лаба финиш 2024-05-22 14:22:42 +04:00
4ad2966f9d лаб4 2024-05-20 14:42:55 +04:00
4 changed files with 34 additions and 19 deletions

View File

@ -0,0 +1,15 @@
using lab1.Drawnings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace lab1.CollectionGenericObjects
{
internal class ClassForDoppublic<T>
where T : DrawningTrackedVehicle
{
}
}

View File

@ -31,24 +31,24 @@ public class DrawningEntityFighter : DrawningTrackedVehicle
Brush CraneBrush = new SolidBrush(fighter.AdditionalColor); Brush CraneBrush = new SolidBrush(fighter.AdditionalColor);
base.DrawTransport(g);
if (fighter.Kovsh) if (fighter.Kovsh)
{ {
//ковш ///ковш
g.DrawRectangle(pen, _startPosX.Value - 2, _startPosY.Value + 37, 8, 15); g.DrawRectangle(pen, _startPosX.Value - 17, _startPosY.Value + 12, 8, 15);
g.FillRectangle(CraneBrush, _startPosX.Value - 2, _startPosY.Value + 37, 8, 15); g.FillRectangle(CraneBrush, _startPosX.Value - 17, _startPosY.Value + 12, 8, 15);
g.DrawRectangle(pen, _startPosX.Value - -6, _startPosY.Value + 37, 4, 1); g.DrawRectangle(pen, _startPosX.Value - 8, _startPosY.Value + 17, 5, 1);
} }
//противовес ///противовес
if (fighter.Otval) if (fighter.Otval)
{ {
g.DrawRectangle(pen, _startPosX.Value + 73, _startPosY.Value + 37, 17, 1); g.DrawRectangle(pen, _startPosX.Value + 63, _startPosY.Value + 17, 17, 1);
g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value + 37, 1, 17); g.DrawRectangle(pen, _startPosX.Value + 80, _startPosY.Value + 17, 1, 16);
} }

View File

@ -60,9 +60,9 @@
groupBoxTools.Controls.Add(panelStorage); groupBoxTools.Controls.Add(panelStorage);
groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Controls.Add(comboBoxSelectorCompany);
groupBoxTools.Dock = DockStyle.Right; groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(670, 0); groupBoxTools.Location = new Point(635, 0);
groupBoxTools.Name = "groupBoxTools"; groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Size = new Size(297, 617); groupBoxTools.Size = new Size(297, 615);
groupBoxTools.TabIndex = 0; groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false; groupBoxTools.TabStop = false;
groupBoxTools.Text = "Инструменты"; groupBoxTools.Text = "Инструменты";
@ -84,20 +84,20 @@
// buttonAddFighter // buttonAddFighter
// //
buttonAddFighter.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; buttonAddFighter.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonAddFighter.Location = new Point(6, 0); buttonAddFighter.Location = new Point(6, 59);
buttonAddFighter.Name = "buttonAddFighter"; buttonAddFighter.Name = "buttonAddFighter";
buttonAddFighter.Size = new Size(273, 52); buttonAddFighter.Size = new Size(273, 59);
buttonAddFighter.TabIndex = 2; buttonAddFighter.TabIndex = 2;
buttonAddFighter.Text = "Добавление истребителя"; buttonAddFighter.Text = "Добавление гусеничной машины с оборудованием";
buttonAddFighter.UseVisualStyleBackColor = true; buttonAddFighter.UseVisualStyleBackColor = true;
buttonAddFighter.Click += ButtonAddTrackedVehicle_Click; buttonAddFighter.Click += ButtonAddFighter_Click;
// //
// buttonAddTrackedVehicle // buttonAddTrackedVehicle
// //
buttonAddTrackedVehicle.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; buttonAddTrackedVehicle.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonAddTrackedVehicle.Location = new Point(6, 58); buttonAddTrackedVehicle.Location = new Point(6, 0);
buttonAddTrackedVehicle.Name = "buttonAddTrackedVehicle"; buttonAddTrackedVehicle.Name = "buttonAddTrackedVehicle";
buttonAddTrackedVehicle.Size = new Size(273, 60); buttonAddTrackedVehicle.Size = new Size(273, 63);
buttonAddTrackedVehicle.TabIndex = 3; buttonAddTrackedVehicle.TabIndex = 3;
buttonAddTrackedVehicle.Text = "Добавление гусеничной машины"; buttonAddTrackedVehicle.Text = "Добавление гусеничной машины";
buttonAddTrackedVehicle.UseVisualStyleBackColor = true; buttonAddTrackedVehicle.UseVisualStyleBackColor = true;
@ -256,7 +256,7 @@
pictureBox.Dock = DockStyle.Fill; pictureBox.Dock = DockStyle.Fill;
pictureBox.Location = new Point(0, 0); pictureBox.Location = new Point(0, 0);
pictureBox.Name = "pictureBox"; pictureBox.Name = "pictureBox";
pictureBox.Size = new Size(670, 617); pictureBox.Size = new Size(635, 615);
pictureBox.TabIndex = 1; pictureBox.TabIndex = 1;
pictureBox.TabStop = false; pictureBox.TabStop = false;
pictureBox.Click += pictureBox1_Click; pictureBox.Click += pictureBox1_Click;
@ -265,7 +265,7 @@
// //
AutoScaleDimensions = new SizeF(10F, 25F); AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(967, 617); ClientSize = new Size(932, 615);
Controls.Add(pictureBox); Controls.Add(pictureBox);
Controls.Add(groupBoxTools); Controls.Add(groupBoxTools);
Name = "FormTrackedVehicleCollection"; Name = "FormTrackedVehicleCollection";

View File

@ -47,7 +47,7 @@ public partial class FormTrackedVehicleCollection : Form
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void ButtonAddEntityFighter_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningEntityFighter)); private void ButtonAddFighter_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningEntityFighter));
/// <summary> /// <summary>
/// Создание объекта класса-перемещения /// Создание объекта класса-перемещения