почти доделала
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.TabStop = false;
|
||||
groupBoxOptions.Text = "Параметры";
|
||||
groupBoxOptions.DragDrop += PanelObject_DragDrop;
|
||||
groupBoxOptions.DragEnter += PanelObject_DragEnter;
|
||||
//
|
||||
// labelSimpleObject
|
||||
//
|
||||
@ -124,7 +126,7 @@
|
||||
panelYellow.Name = "panelYellow";
|
||||
panelYellow.Size = new Size(32, 31);
|
||||
panelYellow.TabIndex = 1;
|
||||
panelYellow.MouseDown += LabelObject_MouseDown;
|
||||
panelYellow.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelPurple
|
||||
//
|
||||
@ -133,7 +135,7 @@
|
||||
panelPurple.Name = "panelPurple";
|
||||
panelPurple.Size = new Size(32, 31);
|
||||
panelPurple.TabIndex = 1;
|
||||
panelPurple.MouseDown += LabelObject_MouseDown;
|
||||
panelPurple.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelBlue
|
||||
//
|
||||
@ -142,7 +144,7 @@
|
||||
panelBlue.Name = "panelBlue";
|
||||
panelBlue.Size = new Size(32, 31);
|
||||
panelBlue.TabIndex = 1;
|
||||
panelBlue.MouseDown += LabelObject_MouseDown;
|
||||
panelBlue.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelBlack
|
||||
//
|
||||
@ -151,7 +153,7 @@
|
||||
panelBlack.Name = "panelBlack";
|
||||
panelBlack.Size = new Size(32, 31);
|
||||
panelBlack.TabIndex = 1;
|
||||
panelBlack.MouseDown += LabelObject_MouseDown;
|
||||
panelBlack.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelGray
|
||||
//
|
||||
@ -160,7 +162,7 @@
|
||||
panelGray.Name = "panelGray";
|
||||
panelGray.Size = new Size(32, 29);
|
||||
panelGray.TabIndex = 1;
|
||||
panelGray.MouseDown += LabelObject_MouseDown;
|
||||
panelGray.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelGreen
|
||||
//
|
||||
@ -169,7 +171,7 @@
|
||||
panelGreen.Name = "panelGreen";
|
||||
panelGreen.Size = new Size(32, 31);
|
||||
panelGreen.TabIndex = 1;
|
||||
panelGreen.MouseDown += LabelObject_MouseDown;
|
||||
panelGreen.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelWhite
|
||||
//
|
||||
@ -178,7 +180,7 @@
|
||||
panelWhite.Name = "panelWhite";
|
||||
panelWhite.Size = new Size(32, 31);
|
||||
panelWhite.TabIndex = 1;
|
||||
panelWhite.MouseDown += LabelObject_MouseDown;
|
||||
panelWhite.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// panelRed
|
||||
//
|
||||
@ -187,7 +189,7 @@
|
||||
panelRed.Name = "panelRed";
|
||||
panelRed.Size = new Size(32, 31);
|
||||
panelRed.TabIndex = 0;
|
||||
panelRed.MouseDown += LabelObject_MouseDown;
|
||||
panelRed.MouseDown += PanelColor_MouseDown;
|
||||
//
|
||||
// checkBoxLuggage
|
||||
//
|
||||
@ -279,6 +281,7 @@
|
||||
buttonCancel.TabIndex = 5;
|
||||
buttonCancel.Text = "Отмена";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
buttonCancel.Click += buttonCancel_Click;
|
||||
//
|
||||
// buttonOk
|
||||
//
|
||||
@ -301,6 +304,7 @@
|
||||
labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||
labelAdditionalColor.DragDrop += labelAdditionalColor_DragDrop;
|
||||
labelAdditionalColor.DragEnter += labelAdditionalColor_DragEnter;
|
||||
labelAdditionalColor.MouseDown += LabelObject_MouseDown;
|
||||
//
|
||||
// labelMainColor
|
||||
//
|
||||
@ -313,6 +317,7 @@
|
||||
labelMainColor.TextAlign = ContentAlignment.MiddleCenter;
|
||||
labelMainColor.DragDrop += labelMainColor_DragDrop;
|
||||
labelMainColor.DragEnter += labelMainColor_DragEnter;
|
||||
labelMainColor.MouseDown += LabelObject_MouseDown;
|
||||
//
|
||||
// FormWarmlyLocomotiveConfig
|
||||
//
|
||||
|
@ -48,22 +48,24 @@ namespace WarmlyLocomotive
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
public FormWarmlyLocomotiveConfig()
|
||||
public FormWarmlyLocomotiveConfig(int pictureWidth, int pictureHeight)
|
||||
{
|
||||
InitializeComponent();
|
||||
panelBlack.MouseDown += PanelColor;
|
||||
panelPurple.MouseDown += PanelColor;
|
||||
panelGray.MouseDown += PanelColor;
|
||||
panelGreen.MouseDown += PanelColor;
|
||||
panelRed.MouseDown += PanelColor;
|
||||
panelWhite.MouseDown += PanelColor;
|
||||
panelYellow.MouseDown += PanelColor;
|
||||
panelBlue.MouseDown += PanelColor;
|
||||
_pictureWidth = pictureWidth;
|
||||
_pictureHeight = pictureHeight;
|
||||
panelBlack.MouseDown += PanelColor_MouseDown;
|
||||
panelPurple.MouseDown += PanelColor_MouseDown;
|
||||
panelGray.MouseDown += PanelColor_MouseDown;
|
||||
panelGreen.MouseDown += PanelColor_MouseDown;
|
||||
panelRed.MouseDown += PanelColor_MouseDown;
|
||||
panelWhite.MouseDown += PanelColor_MouseDown;
|
||||
panelYellow.MouseDown += PanelColor_MouseDown;
|
||||
panelBlue.MouseDown += PanelColor_MouseDown;
|
||||
buttonCancel.Click += (s, e) => Close();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Отрисовать машину
|
||||
/// Отрисовать тепловоз
|
||||
/// </summary>
|
||||
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.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new FormWarmlyLocomotiveCollection());
|
||||
Application.Run(new WarmlyLocomotiveForm());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user