This commit is contained in:
Daniya_Youdakova 2022-12-24 22:49:36 +04:00
parent 9d91262f3c
commit 8cc8461043
2 changed files with 7 additions and 5 deletions

View File

@ -90,7 +90,6 @@
this.labelModifiedObject.TabIndex = 9;
this.labelModifiedObject.Text = "Продвинутый";
this.labelModifiedObject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//this.labelModifiedObject.Click += new System.EventHandler(this.labelModifiedObject_Click);
this.labelModifiedObject.MouseDown += new System.Windows.Forms.MouseEventHandler(this.LabelObject_MouseDown);
//
// labelSimpleObject
@ -331,7 +330,6 @@
this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "Отмена";
this.buttonCancel.UseVisualStyleBackColor = true;
//this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// FormAircraftCarrierConfig
//

View File

@ -62,17 +62,21 @@ namespace AircraftCarrier
{
e.Effect = DragDropEffects.None;
}
}
private void PanelObject_DragDrop(object sender, DragEventArgs e)
{
switch (e.Data.GetData(DataFormats.Text).ToString())
{
case "labelSimpleObject":
_aircraftcarrier = new DrawningAircraftCarrier((int)numericUpDownSpeed.Value, (int)numericUpDownWeight.Value, Color.White);
_aircraftcarrier = new DrawningAircraftCarrier((int)numericUpDownSpeed.Value,
(int)numericUpDownWeight.Value, Color.White);
break;
case "labelModifiedObject":
_aircraftcarrier = new DrawningModernAircraftCarrier((int)numericUpDownSpeed.Value, (int)numericUpDownWeight.Value, Color.White, Color.Black,
checkBoxFlightDeck.Checked, checkBoxHangarDeck.Checked, checkBoxRoute.Checked);
_aircraftcarrier = new DrawningModernAircraftCarrier((int)numericUpDownSpeed.Value,
(int)numericUpDownWeight.Value, Color.White, Color.Black,
checkBoxFlightDeck.Checked, checkBoxHangarDeck.Checked,
checkBoxRoute.Checked);
break;
}
DrawAircraftCarrier();