PIBD-13_Baryshev_D.A._LabWork05_Base #5
@ -7,6 +7,16 @@ public class EntityDumpTruck : EntityTruck
|
||||
/// Дополнительный цвет (для опциональных элементов)
|
||||
/// </summary>
|
||||
public Color AdditionalColor { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Метод передачи дополнительного цвета
|
||||
/// </summary>
|
||||
/// <param name="additionalColor"></param>
|
||||
public void SetAdditionalColor(Color additionalColor)
|
||||
{
|
||||
AdditionalColor = additionalColor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Признак (опция) наличие кузова
|
||||
/// </summary>
|
||||
|
@ -15,14 +15,26 @@ public class EntityTruck
|
||||
/// Скорость
|
||||
/// </summary>
|
||||
public int Speed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вес
|
||||
/// </summary>
|
||||
public double Weight { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Основной цвет
|
||||
/// </summary>
|
||||
public Color BodyColor { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Метод передачи базового цвета
|
||||
/// </summary>
|
||||
/// <param name="bodyColor"></param>
|
||||
public void SetBodyColor(Color bodyColor)
|
||||
{
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Шаг перемещения автомобиля
|
||||
/// </summary>
|
||||
|
@ -29,6 +29,19 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBoxConfig = new GroupBox();
|
||||
panel1 = new Panel();
|
||||
groupBoxColours = new GroupBox();
|
||||
panelPurple = new Panel();
|
||||
panelWhite = new Panel();
|
||||
panelBlue = new Panel();
|
||||
panelGreen = new Panel();
|
||||
panelGray = new Panel();
|
||||
panelOrange = new Panel();
|
||||
panelBlack = new Panel();
|
||||
panelYellow = new Panel();
|
||||
panelPink = new Panel();
|
||||
panelRed = new Panel();
|
||||
checkBoxTent = new CheckBox();
|
||||
checkBoxAwning = new CheckBox();
|
||||
numericUpDownWeight = new NumericUpDown();
|
||||
labelWeight = new Label();
|
||||
@ -36,27 +49,16 @@
|
||||
labelSpeed = new Label();
|
||||
labelModifiedObject = new Label();
|
||||
labelSimpleObject = new Label();
|
||||
checkBoxTent = new CheckBox();
|
||||
groupBoxColours = new GroupBox();
|
||||
panelRed = new Panel();
|
||||
panelOrange = new Panel();
|
||||
panelGreen = new Panel();
|
||||
panelYellow = new Panel();
|
||||
panelWhite = new Panel();
|
||||
panelGray = new Panel();
|
||||
panelBlack = new Panel();
|
||||
panelPink = new Panel();
|
||||
panelPurple = new Panel();
|
||||
panelBlue = new Panel();
|
||||
pictureBoxObject = new PictureBox();
|
||||
buttonAdd = new Button();
|
||||
buttonCancel = new Button();
|
||||
panel1 = new Panel();
|
||||
panelObject = new Panel();
|
||||
labelAdditionalColor = new Label();
|
||||
labelBaseColor = new Label();
|
||||
groupBoxConfig.SuspendLayout();
|
||||
groupBoxColours.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDownWeight).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).BeginInit();
|
||||
groupBoxColours.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxObject).BeginInit();
|
||||
panelObject.SuspendLayout();
|
||||
SuspendLayout();
|
||||
@ -81,6 +83,132 @@
|
||||
groupBoxConfig.TabStop = false;
|
||||
groupBoxConfig.Text = "Параметры";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Location = new Point(621, 33);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(224, 125);
|
||||
panel1.TabIndex = 4;
|
||||
//
|
||||
// groupBoxColours
|
||||
//
|
||||
groupBoxColours.Controls.Add(panelPurple);
|
||||
groupBoxColours.Controls.Add(panelWhite);
|
||||
groupBoxColours.Controls.Add(panelBlue);
|
||||
groupBoxColours.Controls.Add(panelGreen);
|
||||
groupBoxColours.Controls.Add(panelGray);
|
||||
groupBoxColours.Controls.Add(panelOrange);
|
||||
groupBoxColours.Controls.Add(panelBlack);
|
||||
groupBoxColours.Controls.Add(panelYellow);
|
||||
groupBoxColours.Controls.Add(panelPink);
|
||||
groupBoxColours.Controls.Add(panelRed);
|
||||
groupBoxColours.Location = new Point(260, 26);
|
||||
groupBoxColours.Name = "groupBoxColours";
|
||||
groupBoxColours.Size = new Size(320, 135);
|
||||
groupBoxColours.TabIndex = 8;
|
||||
groupBoxColours.TabStop = false;
|
||||
groupBoxColours.Text = "Цвета";
|
||||
//
|
||||
// panelPurple
|
||||
//
|
||||
panelPurple.BackColor = Color.Purple;
|
||||
panelPurple.Location = new Point(135, 77);
|
||||
panelPurple.Name = "panelPurple";
|
||||
panelPurple.Size = new Size(45, 45);
|
||||
panelPurple.TabIndex = 5;
|
||||
panelPurple.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelWhite
|
||||
//
|
||||
panelWhite.BackColor = Color.White;
|
||||
panelWhite.Location = new Point(262, 77);
|
||||
panelWhite.Name = "panelWhite";
|
||||
panelWhite.Size = new Size(45, 45);
|
||||
panelWhite.TabIndex = 7;
|
||||
panelWhite.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelBlue
|
||||
//
|
||||
panelBlue.BackColor = Color.Blue;
|
||||
panelBlue.Location = new Point(135, 26);
|
||||
panelBlue.Name = "panelBlue";
|
||||
panelBlue.Size = new Size(45, 45);
|
||||
panelBlue.TabIndex = 4;
|
||||
panelBlue.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelGreen
|
||||
//
|
||||
panelGreen.BackColor = Color.Green;
|
||||
panelGreen.Location = new Point(75, 77);
|
||||
panelGreen.Name = "panelGreen";
|
||||
panelGreen.Size = new Size(45, 45);
|
||||
panelGreen.TabIndex = 3;
|
||||
panelGreen.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelGray
|
||||
//
|
||||
panelGray.BackColor = Color.Gray;
|
||||
panelGray.Location = new Point(200, 77);
|
||||
panelGray.Name = "panelGray";
|
||||
panelGray.Size = new Size(45, 45);
|
||||
panelGray.TabIndex = 5;
|
||||
panelGray.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelOrange
|
||||
//
|
||||
panelOrange.BackColor = Color.Orange;
|
||||
panelOrange.Location = new Point(15, 77);
|
||||
panelOrange.Name = "panelOrange";
|
||||
panelOrange.Size = new Size(45, 45);
|
||||
panelOrange.TabIndex = 1;
|
||||
panelOrange.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelBlack
|
||||
//
|
||||
panelBlack.BackColor = Color.Black;
|
||||
panelBlack.Location = new Point(262, 26);
|
||||
panelBlack.Name = "panelBlack";
|
||||
panelBlack.Size = new Size(45, 45);
|
||||
panelBlack.TabIndex = 6;
|
||||
panelBlack.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelYellow
|
||||
//
|
||||
panelYellow.BackColor = Color.Yellow;
|
||||
panelYellow.Location = new Point(75, 26);
|
||||
panelYellow.Name = "panelYellow";
|
||||
panelYellow.Size = new Size(45, 45);
|
||||
panelYellow.TabIndex = 2;
|
||||
panelYellow.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelPink
|
||||
//
|
||||
panelPink.BackColor = Color.Pink;
|
||||
panelPink.Location = new Point(200, 26);
|
||||
panelPink.Name = "panelPink";
|
||||
panelPink.Size = new Size(45, 45);
|
||||
panelPink.TabIndex = 4;
|
||||
panelPink.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// panelRed
|
||||
//
|
||||
panelRed.BackColor = Color.Red;
|
||||
panelRed.Location = new Point(15, 26);
|
||||
panelRed.Name = "panelRed";
|
||||
panelRed.Size = new Size(45, 45);
|
||||
panelRed.TabIndex = 0;
|
||||
panelRed.MouseDown += Panel_MouseDown;
|
||||
//
|
||||
// checkBoxTent
|
||||
//
|
||||
checkBoxTent.AutoSize = true;
|
||||
checkBoxTent.Location = new Point(24, 204);
|
||||
checkBoxTent.Name = "checkBoxTent";
|
||||
checkBoxTent.Size = new Size(195, 24);
|
||||
checkBoxTent.TabIndex = 7;
|
||||
checkBoxTent.Text = "Признак наличия тента";
|
||||
checkBoxTent.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxAwning
|
||||
//
|
||||
checkBoxAwning.AutoSize = true;
|
||||
@ -138,6 +266,7 @@
|
||||
labelModifiedObject.TabIndex = 1;
|
||||
labelModifiedObject.Text = "Продвинутый";
|
||||
labelModifiedObject.TextAlign = ContentAlignment.MiddleCenter;
|
||||
labelModifiedObject.MouseDown += LabelObject_MouseDown;
|
||||
//
|
||||
// labelSimpleObject
|
||||
//
|
||||
@ -148,127 +277,19 @@
|
||||
labelSimpleObject.TabIndex = 0;
|
||||
labelSimpleObject.Text = "Простой";
|
||||
labelSimpleObject.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// checkBoxTent
|
||||
//
|
||||
checkBoxTent.AutoSize = true;
|
||||
checkBoxTent.Location = new Point(24, 204);
|
||||
checkBoxTent.Name = "checkBoxTent";
|
||||
checkBoxTent.Size = new Size(195, 24);
|
||||
checkBoxTent.TabIndex = 7;
|
||||
checkBoxTent.Text = "Признак наличия тента";
|
||||
checkBoxTent.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBoxColours
|
||||
//
|
||||
groupBoxColours.Controls.Add(panelPurple);
|
||||
groupBoxColours.Controls.Add(panelWhite);
|
||||
groupBoxColours.Controls.Add(panelBlue);
|
||||
groupBoxColours.Controls.Add(panelGreen);
|
||||
groupBoxColours.Controls.Add(panelGray);
|
||||
groupBoxColours.Controls.Add(panelOrange);
|
||||
groupBoxColours.Controls.Add(panelBlack);
|
||||
groupBoxColours.Controls.Add(panelYellow);
|
||||
groupBoxColours.Controls.Add(panelPink);
|
||||
groupBoxColours.Controls.Add(panelRed);
|
||||
groupBoxColours.Location = new Point(260, 26);
|
||||
groupBoxColours.Name = "groupBoxColours";
|
||||
groupBoxColours.Size = new Size(320, 135);
|
||||
groupBoxColours.TabIndex = 8;
|
||||
groupBoxColours.TabStop = false;
|
||||
groupBoxColours.Text = "Цвета";
|
||||
//
|
||||
// panelRed
|
||||
//
|
||||
panelRed.BackColor = Color.Red;
|
||||
panelRed.Location = new Point(15, 26);
|
||||
panelRed.Name = "panelRed";
|
||||
panelRed.Size = new Size(45, 45);
|
||||
panelRed.TabIndex = 0;
|
||||
//
|
||||
// panelOrange
|
||||
//
|
||||
panelOrange.BackColor = Color.Orange;
|
||||
panelOrange.Location = new Point(15, 77);
|
||||
panelOrange.Name = "panelOrange";
|
||||
panelOrange.Size = new Size(45, 45);
|
||||
panelOrange.TabIndex = 1;
|
||||
//
|
||||
// panelGreen
|
||||
//
|
||||
panelGreen.BackColor = Color.Green;
|
||||
panelGreen.Location = new Point(75, 77);
|
||||
panelGreen.Name = "panelGreen";
|
||||
panelGreen.Size = new Size(45, 45);
|
||||
panelGreen.TabIndex = 3;
|
||||
//
|
||||
// panelYellow
|
||||
//
|
||||
panelYellow.BackColor = Color.Yellow;
|
||||
panelYellow.Location = new Point(75, 26);
|
||||
panelYellow.Name = "panelYellow";
|
||||
panelYellow.Size = new Size(45, 45);
|
||||
panelYellow.TabIndex = 2;
|
||||
//
|
||||
// panelWhite
|
||||
//
|
||||
panelWhite.BackColor = Color.White;
|
||||
panelWhite.Location = new Point(262, 77);
|
||||
panelWhite.Name = "panelWhite";
|
||||
panelWhite.Size = new Size(45, 45);
|
||||
panelWhite.TabIndex = 7;
|
||||
//
|
||||
// panelGray
|
||||
//
|
||||
panelGray.BackColor = Color.Gray;
|
||||
panelGray.Location = new Point(200, 77);
|
||||
panelGray.Name = "panelGray";
|
||||
panelGray.Size = new Size(45, 45);
|
||||
panelGray.TabIndex = 5;
|
||||
//
|
||||
// panelBlack
|
||||
//
|
||||
panelBlack.BackColor = Color.Black;
|
||||
panelBlack.Location = new Point(262, 26);
|
||||
panelBlack.Name = "panelBlack";
|
||||
panelBlack.Size = new Size(45, 45);
|
||||
panelBlack.TabIndex = 6;
|
||||
//
|
||||
// panelPink
|
||||
//
|
||||
panelPink.BackColor = Color.Pink;
|
||||
panelPink.Location = new Point(200, 26);
|
||||
panelPink.Name = "panelPink";
|
||||
panelPink.Size = new Size(45, 45);
|
||||
panelPink.TabIndex = 4;
|
||||
//
|
||||
// panelPurple
|
||||
//
|
||||
panelPurple.BackColor = Color.Purple;
|
||||
panelPurple.Location = new Point(135, 77);
|
||||
panelPurple.Name = "panelPurple";
|
||||
panelPurple.Size = new Size(45, 45);
|
||||
panelPurple.TabIndex = 5;
|
||||
//
|
||||
// panelBlue
|
||||
//
|
||||
panelBlue.BackColor = Color.Blue;
|
||||
panelBlue.Location = new Point(135, 26);
|
||||
panelBlue.Name = "panelBlue";
|
||||
panelBlue.Size = new Size(45, 45);
|
||||
panelBlue.TabIndex = 4;
|
||||
labelSimpleObject.MouseDown += LabelObject_MouseDown;
|
||||
//
|
||||
// pictureBoxObject
|
||||
//
|
||||
pictureBoxObject.Location = new Point(3, 21);
|
||||
pictureBoxObject.Location = new Point(3, 76);
|
||||
pictureBoxObject.Name = "pictureBoxObject";
|
||||
pictureBoxObject.Size = new Size(226, 159);
|
||||
pictureBoxObject.Size = new Size(226, 114);
|
||||
pictureBoxObject.TabIndex = 1;
|
||||
pictureBoxObject.TabStop = false;
|
||||
//
|
||||
// buttonAdd
|
||||
//
|
||||
buttonAdd.Location = new Point(637, 204);
|
||||
buttonAdd.Location = new Point(627, 225);
|
||||
buttonAdd.Name = "buttonAdd";
|
||||
buttonAdd.Size = new Size(94, 29);
|
||||
buttonAdd.TabIndex = 2;
|
||||
@ -277,28 +298,45 @@
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
buttonCancel.Location = new Point(742, 204);
|
||||
buttonCancel.Location = new Point(751, 225);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new Size(94, 29);
|
||||
buttonCancel.TabIndex = 3;
|
||||
buttonCancel.Text = "Отмена";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Location = new Point(621, 33);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(224, 125);
|
||||
panel1.TabIndex = 4;
|
||||
//
|
||||
// panelObject
|
||||
//
|
||||
panelObject.AllowDrop = true;
|
||||
panelObject.Controls.Add(labelAdditionalColor);
|
||||
panelObject.Controls.Add(labelBaseColor);
|
||||
panelObject.Controls.Add(pictureBoxObject);
|
||||
panelObject.Location = new Point(624, 12);
|
||||
panelObject.Location = new Point(621, 12);
|
||||
panelObject.Name = "panelObject";
|
||||
panelObject.Size = new Size(232, 186);
|
||||
panelObject.Size = new Size(232, 207);
|
||||
panelObject.TabIndex = 4;
|
||||
panelObject.DragDrop += PanelObject_DragDrop;
|
||||
panelObject.DragEnter += PanelObject_DragEnter;
|
||||
//
|
||||
// labelAdditionalColor
|
||||
//
|
||||
labelAdditionalColor.BorderStyle = BorderStyle.FixedSingle;
|
||||
labelAdditionalColor.Location = new Point(122, 14);
|
||||
labelAdditionalColor.Name = "labelAdditionalColor";
|
||||
labelAdditionalColor.Size = new Size(102, 44);
|
||||
labelAdditionalColor.TabIndex = 3;
|
||||
labelAdditionalColor.Text = "Доп. цвет";
|
||||
labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelBaseColor
|
||||
//
|
||||
labelBaseColor.BorderStyle = BorderStyle.FixedSingle;
|
||||
labelBaseColor.Location = new Point(6, 14);
|
||||
labelBaseColor.Name = "labelBaseColor";
|
||||
labelBaseColor.Size = new Size(102, 44);
|
||||
labelBaseColor.TabIndex = 2;
|
||||
labelBaseColor.Text = "Цвет";
|
||||
labelBaseColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// FormTruckConfig
|
||||
//
|
||||
@ -313,9 +351,9 @@
|
||||
Text = "Создание объекта";
|
||||
groupBoxConfig.ResumeLayout(false);
|
||||
groupBoxConfig.PerformLayout();
|
||||
groupBoxColours.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDownWeight).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDownSpeed).EndInit();
|
||||
groupBoxColours.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxObject).EndInit();
|
||||
panelObject.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
@ -348,5 +386,7 @@
|
||||
private Button buttonCancel;
|
||||
private Panel panel1;
|
||||
private Panel panelObject;
|
||||
private Label labelBaseColor;
|
||||
private Label labelAdditionalColor;
|
||||
}
|
||||
}
|
@ -7,14 +7,104 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ProjectDumpTruck.Drawnings;
|
||||
|
||||
namespace ProjectDumpTruck
|
||||
|
||||
namespace ProjectDumpTruck;
|
||||
|
||||
/// <summary>
|
||||
/// Форма конфигурации объекта
|
||||
/// </summary>
|
||||
public partial class FormTruckConfig : Form
|
||||
{
|
||||
public partial class FormTruckConfig : Form
|
||||
/// <summary>
|
||||
/// Объект - прорисовка грузовика
|
||||
/// </summary>
|
||||
private DrawningTruck _truck = null;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
public FormTruckConfig()
|
||||
{
|
||||
public FormTruckConfig()
|
||||
InitializeComponent();
|
||||
|
||||
panelRed.MouseDown += Panel_MouseDown;
|
||||
panelOrange.MouseDown += Panel_MouseDown;
|
||||
panelYellow.MouseDown += Panel_MouseDown;
|
||||
panelGreen.MouseDown += Panel_MouseDown;
|
||||
panelBlue.MouseDown += Panel_MouseDown;
|
||||
panelPurple.MouseDown += Panel_MouseDown;
|
||||
panelPink.MouseDown += Panel_MouseDown;
|
||||
panelGray.MouseDown += Panel_MouseDown;
|
||||
panelBlack.MouseDown += Panel_MouseDown;
|
||||
panelWhite.MouseDown += Panel_MouseDown;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Прорисовка объекта
|
||||
/// </summary>
|
||||
private void DrawObject()
|
||||
{
|
||||
Bitmap bmp = new(pictureBoxObject.Width, pictureBoxObject.Height);
|
||||
Graphics gr = Graphics.FromImage(bmp);
|
||||
_truck?.SetPictureSize(pictureBoxObject.Width, pictureBoxObject.Height);
|
||||
_truck?.SetPosition(5, 5);
|
||||
_truck?.DrawTransport(gr);
|
||||
pictureBoxObject.Image = bmp;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Передаем информацию при нажатии на Label
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void LabelObject_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
(sender as Label)?.DoDragDrop((sender as Label)?.Name ?? string.Empty, DragDropEffects.Move | DragDropEffects.Copy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Проверка получаемой информации(ее типа на соответствие требуемому)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PanelObject_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
e.Effect = e.Data?.GetDataPresent(DataFormats.Text) ?? false ? DragDropEffects.Copy : DragDropEffects.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Действия при приеме перетаскиваемой информации
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PanelObject_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
switch (e.Data?.GetData(DataFormats.Text)?.ToString())
|
||||
{
|
||||
InitializeComponent();
|
||||
case "labelSimpleObject":
|
||||
_truck = new DrawningTruck((int)numericUpDownSpeed.Value, (double)numericUpDownWeight.Value, Color.White);
|
||||
break;
|
||||
|
||||
case "labelModifiedObject":
|
||||
_truck = new DrawningDumpTruck((int)numericUpDownSpeed.Value, (double)numericUpDownWeight.Value, Color.White, Color.Black,
|
||||
checkBoxAwning.Checked, checkBoxTent.Checked);
|
||||
break;
|
||||
}
|
||||
|
||||
DrawObject();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Панель отправка цвета при нажатии на Panel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Panel_MouseDown(object? sender, MouseEventArgs e)
|
||||
{
|
||||
(sender as Control)?.DoDragDrop((sender as Control)?.BackColor!, DragDropEffects.Move | DragDropEffects.Copy);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user