Правки
This commit is contained in:
parent
559876c90b
commit
15f09ac242
@ -10,8 +10,7 @@ namespace ProjectElectricLocomotive.DrawingObjects
|
|||||||
{
|
{
|
||||||
public class DrawingElectricLocomotive : DrawingLocomotive
|
public class DrawingElectricLocomotive : DrawingLocomotive
|
||||||
{
|
{
|
||||||
public DrawingElectricLocomotive(int speed, double weight, Color bodyColor, Color additionalColor,
|
public DrawingElectricLocomotive(int speed, double weight, Color bodyColor, Color additionalColor, bool pantograph, bool compartment, int width, int height) : base(speed, weight, bodyColor, width, height, 80, 52)
|
||||||
bool pantograph, bool compartment, int width, int height) : base(speed, weight, bodyColor, width, height, 80, 52)
|
|
||||||
{
|
{
|
||||||
if (EntityLocomotive != null)
|
if (EntityLocomotive != null)
|
||||||
{
|
{
|
||||||
|
@ -94,8 +94,7 @@ namespace ProjectElectricLocomotive
|
|||||||
|
|
||||||
private void PanelColor_MouseDown(object sender, MouseEventArgs e)
|
private void PanelColor_MouseDown(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor,
|
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor, DragDropEffects.Move | DragDropEffects.Copy);
|
||||||
DragDropEffects.Move | DragDropEffects.Copy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LabelColor_DragDrop(object sender, DragEventArgs e)
|
private void LabelColor_DragDrop(object sender, DragEventArgs e)
|
||||||
@ -120,7 +119,7 @@ namespace ProjectElectricLocomotive
|
|||||||
}
|
}
|
||||||
private void LabelColor_DragEnter(object sender, DragEventArgs e)
|
private void LabelColor_DragEnter(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Data.GetDataPresent(typeof(Color)))
|
if (e.Data?.GetDataPresent(typeof(Color)) ?? false)
|
||||||
{
|
{
|
||||||
e.Effect = DragDropEffects.Copy;
|
e.Effect = DragDropEffects.Copy;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user