From a77bd466eef1a05cb5a44041f7da4facd0c6119d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Thu, 8 Dec 2022 19:19:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormLocomotiveConfig.Designer.cs | 2 +- .../LocomotivesAdvanced/FormLocomotiveConfig.cs | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.Designer.cs b/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.Designer.cs index b6b9d78..bcd6329 100644 --- a/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.Designer.cs +++ b/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.Designer.cs @@ -122,7 +122,7 @@ 0, 0, 0}); - this.numericUpDownWheelsNumber.ValueChanged += new System.EventHandler(this.numericUpDownWheelsNumber_ValueChanged); + this.numericUpDownWheelsNumber.ValueChanged += new System.EventHandler(this.NumericUpDownWheelsNumber_ValueChanged); // // buttonCancel // diff --git a/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.cs b/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.cs index dbd8ce7..f90e17a 100644 --- a/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.cs +++ b/LocomotivesAdvanced/LocomotivesAdvanced/FormLocomotiveConfig.cs @@ -172,7 +172,11 @@ EventAddLocomotive?.Invoke(_locomotive); Close(); } - + /// + /// Запоминаем объект от класса доп. прорисовки в переменную типа DataObject + /// + /// + /// private void LabelOrnament_MouseDown(object sender, MouseEventArgs e) { IDrawningAdditionalElements selectedOrnament = new DrawningWheels(); @@ -192,8 +196,12 @@ dataObj.SetData(typeof(IDrawningAdditionalElements), selectedOrnament); (sender as Label).DoDragDrop(dataObj, DragDropEffects.Move | DragDropEffects.Copy); } - - private void numericUpDownWheelsNumber_ValueChanged(object sender, EventArgs e) + /// + /// Автоматически обновляем количество колёс + /// + /// + /// + private void NumericUpDownWheelsNumber_ValueChanged(object sender, EventArgs e) { if (_locomotive != null) {