diff --git a/Bus/Bus/AbstractMap.cs b/Bus/Bus/AbstractMap.cs index 3e4ceb3..ea93877 100644 --- a/Bus/Bus/AbstractMap.cs +++ b/Bus/Bus/AbstractMap.cs @@ -64,11 +64,6 @@ namespace Bus _drawingObject.MoveObject(MoveObjectBack(direction)); } return DrawMapWithObject(); - - - - - } @@ -126,7 +121,6 @@ namespace Bus } _drawingObject.DrawingObject(gr); return bmp; - } diff --git a/Bus/Bus/BusDelegate.cs b/Bus/Bus/BusDelegate.cs index a833c40..6c88a52 100644 --- a/Bus/Bus/BusDelegate.cs +++ b/Bus/Bus/BusDelegate.cs @@ -6,6 +6,5 @@ using System.Threading.Tasks; namespace Bus { - public delegate void BusDelegate(DrawingBus bus); - + public delegate void BusDelegate(DrawingBus bus); } diff --git a/Bus/Bus/EntitySportBus.cs b/Bus/Bus/EntitySportBus.cs index fb2554f..9c813b3 100644 --- a/Bus/Bus/EntitySportBus.cs +++ b/Bus/Bus/EntitySportBus.cs @@ -19,9 +19,9 @@ namespace Bus { DopColor = dopColor; DopColor1 = bodyColor; - BodyKit = bodyKit = true; - Wing = wing = true; - Sportline = sportline = true; + BodyKit = bodyKit; + Wing = wing; + Sportline = sportline; } } } diff --git a/Bus/Bus/FormBusConfig.Designer.cs b/Bus/Bus/FormBusConfig.Designer.cs index 380def1..fa76aea 100644 --- a/Bus/Bus/FormBusConfig.Designer.cs +++ b/Bus/Bus/FormBusConfig.Designer.cs @@ -196,9 +196,9 @@ this.checkBoxBodyKit.AutoSize = true; this.checkBoxBodyKit.Location = new System.Drawing.Point(5, 158); this.checkBoxBodyKit.Name = "checkBoxBodyKit"; - this.checkBoxBodyKit.Size = new System.Drawing.Size(83, 24); + this.checkBoxBodyKit.Size = new System.Drawing.Size(97, 24); this.checkBoxBodyKit.TabIndex = 6; - this.checkBoxBodyKit.Text = "BodyKit"; + this.checkBoxBodyKit.Text = "Лестница"; this.checkBoxBodyKit.UseVisualStyleBackColor = true; // // checkBoxWing @@ -208,7 +208,7 @@ this.checkBoxWing.Name = "checkBoxWing"; this.checkBoxWing.Size = new System.Drawing.Size(66, 24); this.checkBoxWing.TabIndex = 5; - this.checkBoxWing.Text = "Wing"; + this.checkBoxWing.Text = "Окна"; this.checkBoxWing.UseVisualStyleBackColor = true; // // checkBoxSportline @@ -216,9 +216,9 @@ this.checkBoxSportline.AutoSize = true; this.checkBoxSportline.Location = new System.Drawing.Point(5, 98); this.checkBoxSportline.Name = "checkBoxSportline"; - this.checkBoxSportline.Size = new System.Drawing.Size(94, 24); + this.checkBoxSportline.Size = new System.Drawing.Size(118, 24); this.checkBoxSportline.TabIndex = 4; - this.checkBoxSportline.Text = "SportLine"; + this.checkBoxSportline.Text = "Второй этаж"; this.checkBoxSportline.UseVisualStyleBackColor = true; // // labelWeight @@ -285,7 +285,7 @@ this.labelDopColor.Text = "Доп. цвет"; this.labelDopColor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelDopColor.DragDrop += new System.Windows.Forms.DragEventHandler(this.LabelDopColor_DragDrop); - this.labelDopColor.DragEnter += new System.Windows.Forms.DragEventHandler(this.LabelDopColor_DragEnter); + this.labelDopColor.DragEnter += new System.Windows.Forms.DragEventHandler(this.LabelColor_DragEnter); // // labelColor // diff --git a/Bus/Bus/FormBusConfig.cs b/Bus/Bus/FormBusConfig.cs index a4a75a5..020267c 100644 --- a/Bus/Bus/FormBusConfig.cs +++ b/Bus/Bus/FormBusConfig.cs @@ -117,18 +117,10 @@ namespace Bus private void LabelDopColor_DragDrop(object sender, DragEventArgs e) { - var color = e.Data.GetData(typeof(Color)); - if (color != null) + if (_bus != null && _bus.Bus is EntitySportBus entityAirbus) { - (sender as Label).BackColor = (Color)color; - } - if (_bus != null) - { - if (_bus is DrawingSportBus bus) - { - bus.SetDopColor((Color)color); - DrawBus(); - } + entityAirbus.DopColor = (Color)e.Data.GetData(typeof(Color)); + DrawBus(); } } diff --git a/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs b/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs index c653939..d744239 100644 --- a/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs +++ b/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs @@ -29,7 +29,7 @@ namespace Bus comboBoxSelectorMap.Items.Clear(); foreach (var item in _mapsDict) { - comboBoxSelectorMap.Items.Add(item.Key); + comboBoxSelectorMap.Items.Add(item.Key);// } } diff --git a/Bus/Bus/MapsCollection.cs b/Bus/Bus/MapsCollection.cs index a28b8e5..f569911 100644 --- a/Bus/Bus/MapsCollection.cs +++ b/Bus/Bus/MapsCollection.cs @@ -25,7 +25,7 @@ namespace Bus public void AddMap(string name, AbstractMap map) { - if (_mapStorages.ContainsKey(name)) return; //уникальное имя + if (_mapStorages.ContainsKey(name)) return; else { _mapStorages.Add(name, new MapWithSetDoubleDeckerBusGeneric(_pictureWidth, _pictureHeight, map)); @@ -34,19 +34,18 @@ namespace Bus public void DelMap(string name) { - // TODO Прописать логику для удаления + // TODO проверяет наличие элемента с определенным ключом if (_mapStorages.ContainsKey(name)) { _mapStorages.Remove(name); - } - + } } - public MapWithSetDoubleDeckerBusGeneric this[string ind] + public MapWithSetDoubleDeckerBusGeneric this[string ind] // инициализация индексатора { get { - // TODO Продумать логику получения объекта + // TODO получает из словаря элемент по ключу _mapStorages.TryGetValue(ind, out var MapWithSetDoubleDeckerBusGeneric); return MapWithSetDoubleDeckerBusGeneric; }