Петрушин Егор ПИбд-22 Лабораторная работа №5 "Самоходная артиллерийская установка" #10

Closed
Egor_Petrushin wants to merge 6 commits from PIbd-22_Petrushin_E.A._Lab5 into PIbd-22_Petrushin_E.A._Lab4
3 changed files with 21 additions and 48 deletions
Showing only changes of commit 71b4b13eea - Show all commits

View File

@ -52,8 +52,7 @@
button_add = new Button();
label_color = new Label();
panel_color = new Panel();
panel_addit_color = new Panel();
label1 = new Label();
label_addit_color = new Label();
groupBox_param.SuspendLayout();
groupBox_colors.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericUpDownWeight).BeginInit();
@ -61,7 +60,6 @@
((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit();
Panel.SuspendLayout();
panel_color.SuspendLayout();
panel_addit_color.SuspendLayout();
SuspendLayout();
//
// groupBox_param
@ -279,50 +277,43 @@
//
// label_color
//
label_color.AllowDrop = true;
label_color.BorderStyle = BorderStyle.FixedSingle;
label_color.Location = new Point(5, 7);
label_color.Location = new Point(3, 6);
label_color.Name = "label_color";
label_color.Size = new Size(171, 46);
label_color.TabIndex = 5;
label_color.Text = "Основной цвет";
label_color.DragDrop += labelColor_dragDrop;
label_color.DragEnter += labelColor_dragEnter;
//
// panel_color
//
panel_color.AllowDrop = true;
panel_color.Controls.Add(label_addit_color);
panel_color.Controls.Add(label_color);
panel_color.Location = new Point(0, 2);
panel_color.Location = new Point(0, 3);
panel_color.Name = "panel_color";
panel_color.Size = new Size(179, 53);
panel_color.Size = new Size(362, 52);
panel_color.TabIndex = 6;
panel_color.DragDrop += labelColor_dragDrop;
panel_color.DragEnter += labelColor_dragEnter;
//
// panel_addit_color
// label_addit_color
//
panel_addit_color.AllowDrop = true;
panel_addit_color.Controls.Add(label1);
panel_addit_color.Location = new Point(188, 2);
panel_addit_color.Name = "panel_addit_color";
panel_addit_color.Size = new Size(179, 53);
panel_addit_color.TabIndex = 7;
panel_addit_color.DragDrop += labelColor_dragDrop;
panel_addit_color.DragEnter += labelColor_dragEnter;
//
// label1
//
label1.BorderStyle = BorderStyle.FixedSingle;
label1.Location = new Point(3, 7);
label1.Name = "label1";
label1.Size = new Size(173, 46);
label1.TabIndex = 6;
label1.Text = "Дополнительный цвет";
label_addit_color.AllowDrop = true;
label_addit_color.BorderStyle = BorderStyle.FixedSingle;
label_addit_color.Location = new Point(180, 6);
label_addit_color.Name = "label_addit_color";
label_addit_color.Size = new Size(173, 46);
label_addit_color.TabIndex = 6;
label_addit_color.Text = "Дополнительный цвет";
label_addit_color.DragDrop += labelColor_dragDrop;
label_addit_color.DragEnter += labelColor_dragEnter;
//
// FormSPAUConfig
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(panel_addit_color);
Controls.Add(panel_color);
Controls.Add(button_close);
Controls.Add(Panel);
@ -340,7 +331,6 @@
((System.ComponentModel.ISupportInitialize)pictureBox).EndInit();
Panel.ResumeLayout(false);
panel_color.ResumeLayout(false);
panel_addit_color.ResumeLayout(false);
ResumeLayout(false);
}
@ -370,7 +360,6 @@
private Label label_color;
private Label label_addit_color;
private Panel panel_color;
private Panel panel_addit_color;
private Label label1;
private CheckBox сheckBox_ballon;
}

View File

@ -10,7 +10,6 @@ using System.Windows.Forms;
using System.Xml.Linq;
using SelfPropelledArtilleryUnit.DrawningObjects;
using SelfPropelledArtilleryUnit.Entities;
using SelfPropelledArtilleryUnit.SPAUs;
namespace SelfPropelledArtilleryUnit
{
@ -139,12 +138,12 @@ namespace SelfPropelledArtilleryUnit
{
if (_sPAU == null)
return;
switch (((Panel)sender).Name)
switch (((Label)sender).Name)
{
case "panel_color":
case "label_color":
_sPAU?.EntitySPAU?.setBodyColor((Color)e.Data.GetData(typeof(Color)));
break;
case "panel_addit_color":
case "label_addit_color":
if (!(_sPAU is DrawningSPAUchild))
return;
(_sPAU.EntitySPAU as EntitySPAUchild)?.setAdditionalColor(color: (Color)e.Data.GetData(typeof(Color)));

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SelfPropelledArtilleryUnit.DrawningObjects;
namespace SelfPropelledArtilleryUnit.SPAUs
{
/// <summary>
/// Делегат для передачи объекта-автомобиля
/// </summary>
/// <param name="car"></param>
//public delegate void SPAUDelegate(DrawningSPAU sPAU);
}