Merge branch 'Laba5' of http://student.git.athene.tech/ALINA_KURBANOVA/WarmlyLocomotive into Laba5
This commit is contained in:
commit
8aab2517e3
@ -17,7 +17,6 @@
|
||||
public EntityWarmlyLocomotiveWithTrumpet(int speed, double weight, Color bodyColor, Color
|
||||
additionalColor, bool trumpet,bool luggage) : base(speed, weight, bodyColor)
|
||||
{
|
||||
|
||||
AdditionalColor = additionalColor;
|
||||
Trumpet = trumpet;
|
||||
Luggage = luggage;
|
||||
|
@ -93,7 +93,6 @@
|
||||
buttonCancel.TabIndex = 5;
|
||||
buttonCancel.Text = "Отмена";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
buttonCancel.Click += ButtonCancel_Click;
|
||||
//
|
||||
// labelBasic
|
||||
//
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Windows.Forms;
|
||||
using WarmlyLocomotive.DrawningObjects;
|
||||
using WarmlyLocomotive.DrawningObjects;
|
||||
using WarmlyLocomotive.Entities;
|
||||
|
||||
namespace WarmlyLocomotive
|
||||
@ -20,8 +19,6 @@ namespace WarmlyLocomotive
|
||||
/// Событие
|
||||
/// </summary>
|
||||
public event Action<DrawningWarmlyLocomotive>? EventAddWarmlyLocomotive;
|
||||
|
||||
|
||||
public FormWarmlyLocomotiveConfig(int pictureWidth, int pictureHeight)
|
||||
{
|
||||
_pictureWidth = pictureWidth;
|
||||
@ -36,11 +33,7 @@ namespace WarmlyLocomotive
|
||||
panelBlack.MouseDown += PanelColor_MouseDown;
|
||||
panelPurple.MouseDown += PanelColor_MouseDown;
|
||||
buttonCancel.Click += (s, e) => Close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void DrawWarmlyLocomotive()
|
||||
{
|
||||
Bitmap bmp = new(pictureBoxObject.Width, pictureBoxObject.Height);
|
||||
@ -49,7 +42,6 @@ namespace WarmlyLocomotive
|
||||
_warmlylocomotive?.DrawTransport(gr);
|
||||
pictureBoxObject.Image = bmp;
|
||||
}
|
||||
|
||||
public void AddEvent(Action<DrawningWarmlyLocomotive> ev)
|
||||
{
|
||||
if (EventAddWarmlyLocomotive == null)
|
||||
@ -103,13 +95,11 @@ namespace WarmlyLocomotive
|
||||
}
|
||||
DrawWarmlyLocomotive();
|
||||
}
|
||||
|
||||
private void PanelColor_MouseDown(object? sender, MouseEventArgs e)
|
||||
{
|
||||
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor,
|
||||
DragDropEffects.Move | DragDropEffects.Copy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Добавление
|
||||
/// </summary>
|
||||
@ -122,7 +112,6 @@ namespace WarmlyLocomotive
|
||||
EventAddWarmlyLocomotive?.Invoke(_warmlylocomotive);
|
||||
Close();
|
||||
}
|
||||
|
||||
private void labelColor_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (_warmlylocomotive?.EntityWarmlyLocomotive == null)
|
||||
@ -140,7 +129,6 @@ namespace WarmlyLocomotive
|
||||
}
|
||||
DrawWarmlyLocomotive();
|
||||
}
|
||||
|
||||
private void labelColor_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(typeof(Color)))
|
||||
@ -152,7 +140,6 @@ namespace WarmlyLocomotive
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
|
||||
private void labelAddColor_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
if ((_warmlylocomotive?.EntityWarmlyLocomotive == null) || (_warmlylocomotive is DrawningWarmlyLocomotiveWithTrumpet == false))
|
||||
@ -163,7 +150,6 @@ namespace WarmlyLocomotive
|
||||
checkBoxLuggage.Checked, _pictureWidth, _pictureHeight);
|
||||
DrawWarmlyLocomotive();
|
||||
}
|
||||
|
||||
private void labelAddColor_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(typeof(Color)))
|
||||
@ -179,10 +165,5 @@ namespace WarmlyLocomotive
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void ButtonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ namespace WarmlyLocomotive.Generics
|
||||
readonly Dictionary<string, WarmlyLocomotivesGenericCollection<DrawningWarmlyLocomotive, DrawningObjectWarmlyLocomotive>> _warmlylocomotiveStorages;
|
||||
public List<string> Keys => _warmlylocomotiveStorages.Keys.ToList();
|
||||
private readonly int _pictureWidth;
|
||||
|
||||
private readonly int _pictureHeight;
|
||||
public WarmlyLocomotivesGenericStorage(int pictureWidth, int pictureHeight)
|
||||
{
|
||||
@ -26,7 +25,6 @@ namespace WarmlyLocomotive.Generics
|
||||
return;
|
||||
_warmlylocomotiveStorages.Remove(name);
|
||||
}
|
||||
|
||||
public WarmlyLocomotivesGenericCollection<DrawningWarmlyLocomotive, DrawningObjectWarmlyLocomotive>? this[string ind]
|
||||
{
|
||||
get
|
||||
|
Loading…
Reference in New Issue
Block a user