From 51d54979d4f6550e623763e978018e41de878470 Mon Sep 17 00:00:00 2001 From: ALINA_KURBANOVA Date: Fri, 1 Dec 2023 23:01:57 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BB=D0=B0=D0=B1=D0=B0=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EntityWarmlyLocomotiveWithTrumpet .cs | 1 - .../FormWarmlyLocomotiveConfig.Designer.cs | 1 - .../FormWarmlyLocomotiveConfig.cs | 21 +------------------ .../WarmlyLocomotivesGenericStorage.cs | 1 - 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/WarmlyLocomotive/EntityWarmlyLocomotiveWithTrumpet .cs b/WarmlyLocomotive/EntityWarmlyLocomotiveWithTrumpet .cs index 8ba94cd..b1615bc 100644 --- a/WarmlyLocomotive/EntityWarmlyLocomotiveWithTrumpet .cs +++ b/WarmlyLocomotive/EntityWarmlyLocomotiveWithTrumpet .cs @@ -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; diff --git a/WarmlyLocomotive/FormWarmlyLocomotiveConfig.Designer.cs b/WarmlyLocomotive/FormWarmlyLocomotiveConfig.Designer.cs index 015e475..43ab03b 100644 --- a/WarmlyLocomotive/FormWarmlyLocomotiveConfig.Designer.cs +++ b/WarmlyLocomotive/FormWarmlyLocomotiveConfig.Designer.cs @@ -90,7 +90,6 @@ buttonCancel.TabIndex = 5; buttonCancel.Text = "Отмена"; buttonCancel.UseVisualStyleBackColor = true; - buttonCancel.Click += ButtonCancel_Click; // // labelBasic // diff --git a/WarmlyLocomotive/FormWarmlyLocomotiveConfig.cs b/WarmlyLocomotive/FormWarmlyLocomotiveConfig.cs index 0d6add0..a77b646 100644 --- a/WarmlyLocomotive/FormWarmlyLocomotiveConfig.cs +++ b/WarmlyLocomotive/FormWarmlyLocomotiveConfig.cs @@ -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 /// Событие /// public event Action? 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 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); } - /// /// Добавление /// @@ -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) - { - - } } } \ No newline at end of file diff --git a/WarmlyLocomotive/WarmlyLocomotivesGenericStorage.cs b/WarmlyLocomotive/WarmlyLocomotivesGenericStorage.cs index 5d4233d..50f7fde 100644 --- a/WarmlyLocomotive/WarmlyLocomotivesGenericStorage.cs +++ b/WarmlyLocomotive/WarmlyLocomotivesGenericStorage.cs @@ -7,7 +7,6 @@ namespace WarmlyLocomotive.Generics readonly Dictionary> _warmlylocomotiveStorages; public List Keys => _warmlylocomotiveStorages.Keys.ToList(); private readonly int _pictureWidth; - private readonly int _pictureHeight; public WarmlyLocomotivesGenericStorage(int pictureWidth, int pictureHeight) {