почти доделала
This commit is contained in:
parent
e0d54b8bcc
commit
16f41557fe
13
WarmlyLocomotive/Delegate.cs
Normal file
13
WarmlyLocomotive/Delegate.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using WarmlyLocomotive.DrawningObjects;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
namespace WarmlyLocomotive
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Делегат для передачи объекта
|
||||||
|
/// </summary>
|
||||||
|
public delegate void WarmlyLocomotiveDelegate(DrawningWarmlyLocomotive warmlylocomotive);
|
||||||
|
}
|
@ -77,6 +77,8 @@
|
|||||||
groupBoxOptions.TabIndex = 0;
|
groupBoxOptions.TabIndex = 0;
|
||||||
groupBoxOptions.TabStop = false;
|
groupBoxOptions.TabStop = false;
|
||||||
groupBoxOptions.Text = "Параметры";
|
groupBoxOptions.Text = "Параметры";
|
||||||
|
groupBoxOptions.DragDrop += PanelObject_DragDrop;
|
||||||
|
groupBoxOptions.DragEnter += PanelObject_DragEnter;
|
||||||
//
|
//
|
||||||
// labelSimpleObject
|
// labelSimpleObject
|
||||||
//
|
//
|
||||||
@ -124,7 +126,7 @@
|
|||||||
panelYellow.Name = "panelYellow";
|
panelYellow.Name = "panelYellow";
|
||||||
panelYellow.Size = new Size(32, 31);
|
panelYellow.Size = new Size(32, 31);
|
||||||
panelYellow.TabIndex = 1;
|
panelYellow.TabIndex = 1;
|
||||||
panelYellow.MouseDown += LabelObject_MouseDown;
|
panelYellow.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelPurple
|
// panelPurple
|
||||||
//
|
//
|
||||||
@ -133,7 +135,7 @@
|
|||||||
panelPurple.Name = "panelPurple";
|
panelPurple.Name = "panelPurple";
|
||||||
panelPurple.Size = new Size(32, 31);
|
panelPurple.Size = new Size(32, 31);
|
||||||
panelPurple.TabIndex = 1;
|
panelPurple.TabIndex = 1;
|
||||||
panelPurple.MouseDown += LabelObject_MouseDown;
|
panelPurple.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelBlue
|
// panelBlue
|
||||||
//
|
//
|
||||||
@ -142,7 +144,7 @@
|
|||||||
panelBlue.Name = "panelBlue";
|
panelBlue.Name = "panelBlue";
|
||||||
panelBlue.Size = new Size(32, 31);
|
panelBlue.Size = new Size(32, 31);
|
||||||
panelBlue.TabIndex = 1;
|
panelBlue.TabIndex = 1;
|
||||||
panelBlue.MouseDown += LabelObject_MouseDown;
|
panelBlue.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelBlack
|
// panelBlack
|
||||||
//
|
//
|
||||||
@ -151,7 +153,7 @@
|
|||||||
panelBlack.Name = "panelBlack";
|
panelBlack.Name = "panelBlack";
|
||||||
panelBlack.Size = new Size(32, 31);
|
panelBlack.Size = new Size(32, 31);
|
||||||
panelBlack.TabIndex = 1;
|
panelBlack.TabIndex = 1;
|
||||||
panelBlack.MouseDown += LabelObject_MouseDown;
|
panelBlack.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelGray
|
// panelGray
|
||||||
//
|
//
|
||||||
@ -160,7 +162,7 @@
|
|||||||
panelGray.Name = "panelGray";
|
panelGray.Name = "panelGray";
|
||||||
panelGray.Size = new Size(32, 29);
|
panelGray.Size = new Size(32, 29);
|
||||||
panelGray.TabIndex = 1;
|
panelGray.TabIndex = 1;
|
||||||
panelGray.MouseDown += LabelObject_MouseDown;
|
panelGray.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelGreen
|
// panelGreen
|
||||||
//
|
//
|
||||||
@ -169,7 +171,7 @@
|
|||||||
panelGreen.Name = "panelGreen";
|
panelGreen.Name = "panelGreen";
|
||||||
panelGreen.Size = new Size(32, 31);
|
panelGreen.Size = new Size(32, 31);
|
||||||
panelGreen.TabIndex = 1;
|
panelGreen.TabIndex = 1;
|
||||||
panelGreen.MouseDown += LabelObject_MouseDown;
|
panelGreen.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelWhite
|
// panelWhite
|
||||||
//
|
//
|
||||||
@ -178,7 +180,7 @@
|
|||||||
panelWhite.Name = "panelWhite";
|
panelWhite.Name = "panelWhite";
|
||||||
panelWhite.Size = new Size(32, 31);
|
panelWhite.Size = new Size(32, 31);
|
||||||
panelWhite.TabIndex = 1;
|
panelWhite.TabIndex = 1;
|
||||||
panelWhite.MouseDown += LabelObject_MouseDown;
|
panelWhite.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// panelRed
|
// panelRed
|
||||||
//
|
//
|
||||||
@ -187,7 +189,7 @@
|
|||||||
panelRed.Name = "panelRed";
|
panelRed.Name = "panelRed";
|
||||||
panelRed.Size = new Size(32, 31);
|
panelRed.Size = new Size(32, 31);
|
||||||
panelRed.TabIndex = 0;
|
panelRed.TabIndex = 0;
|
||||||
panelRed.MouseDown += LabelObject_MouseDown;
|
panelRed.MouseDown += PanelColor_MouseDown;
|
||||||
//
|
//
|
||||||
// checkBoxLuggage
|
// checkBoxLuggage
|
||||||
//
|
//
|
||||||
@ -279,6 +281,7 @@
|
|||||||
buttonCancel.TabIndex = 5;
|
buttonCancel.TabIndex = 5;
|
||||||
buttonCancel.Text = "Отмена";
|
buttonCancel.Text = "Отмена";
|
||||||
buttonCancel.UseVisualStyleBackColor = true;
|
buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
buttonCancel.Click += buttonCancel_Click;
|
||||||
//
|
//
|
||||||
// buttonOk
|
// buttonOk
|
||||||
//
|
//
|
||||||
@ -301,6 +304,7 @@
|
|||||||
labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter;
|
labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
labelAdditionalColor.DragDrop += labelAdditionalColor_DragDrop;
|
labelAdditionalColor.DragDrop += labelAdditionalColor_DragDrop;
|
||||||
labelAdditionalColor.DragEnter += labelAdditionalColor_DragEnter;
|
labelAdditionalColor.DragEnter += labelAdditionalColor_DragEnter;
|
||||||
|
labelAdditionalColor.MouseDown += LabelObject_MouseDown;
|
||||||
//
|
//
|
||||||
// labelMainColor
|
// labelMainColor
|
||||||
//
|
//
|
||||||
@ -313,6 +317,7 @@
|
|||||||
labelMainColor.TextAlign = ContentAlignment.MiddleCenter;
|
labelMainColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
labelMainColor.DragDrop += labelMainColor_DragDrop;
|
labelMainColor.DragDrop += labelMainColor_DragDrop;
|
||||||
labelMainColor.DragEnter += labelMainColor_DragEnter;
|
labelMainColor.DragEnter += labelMainColor_DragEnter;
|
||||||
|
labelMainColor.MouseDown += LabelObject_MouseDown;
|
||||||
//
|
//
|
||||||
// FormWarmlyLocomotiveConfig
|
// FormWarmlyLocomotiveConfig
|
||||||
//
|
//
|
||||||
|
@ -48,22 +48,24 @@ namespace WarmlyLocomotive
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Конструктор
|
/// Конструктор
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public FormWarmlyLocomotiveConfig()
|
public FormWarmlyLocomotiveConfig(int pictureWidth, int pictureHeight)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
panelBlack.MouseDown += PanelColor;
|
_pictureWidth = pictureWidth;
|
||||||
panelPurple.MouseDown += PanelColor;
|
_pictureHeight = pictureHeight;
|
||||||
panelGray.MouseDown += PanelColor;
|
panelBlack.MouseDown += PanelColor_MouseDown;
|
||||||
panelGreen.MouseDown += PanelColor;
|
panelPurple.MouseDown += PanelColor_MouseDown;
|
||||||
panelRed.MouseDown += PanelColor;
|
panelGray.MouseDown += PanelColor_MouseDown;
|
||||||
panelWhite.MouseDown += PanelColor;
|
panelGreen.MouseDown += PanelColor_MouseDown;
|
||||||
panelYellow.MouseDown += PanelColor;
|
panelRed.MouseDown += PanelColor_MouseDown;
|
||||||
panelBlue.MouseDown += PanelColor;
|
panelWhite.MouseDown += PanelColor_MouseDown;
|
||||||
|
panelYellow.MouseDown += PanelColor_MouseDown;
|
||||||
|
panelBlue.MouseDown += PanelColor_MouseDown;
|
||||||
buttonCancel.Click += (s, e) => Close();
|
buttonCancel.Click += (s, e) => Close();
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Отрисовать машину
|
/// Отрисовать тепловоз
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void DrawCar()
|
private void DrawCar()
|
||||||
{
|
{
|
||||||
@ -193,5 +195,9 @@ namespace WarmlyLocomotive
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ namespace WarmlyLocomotive
|
|||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new FormWarmlyLocomotiveCollection());
|
Application.Run(new FormWarmlyLocomotiveCollection());
|
||||||
Application.Run(new WarmlyLocomotiveForm());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user