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

View File

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