diff --git a/Stormtrooper/Stormtrooper/FormStormtrooper.cs b/Stormtrooper/Stormtrooper/FormStormtrooper.cs index d2af206..9af2922 100644 --- a/Stormtrooper/Stormtrooper/FormStormtrooper.cs +++ b/Stormtrooper/Stormtrooper/FormStormtrooper.cs @@ -43,7 +43,13 @@ namespace Stormtrooper private void ButtonCreate_Click(object sender, EventArgs e) { Random rnd = new(); - _storm = new Drawning(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + Color color = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)); + ColorDialog dialog = new(); + if (dialog.ShowDialog() == DialogResult.OK) + { + color = dialog.Color; + } + _storm = new Drawning(rnd.Next(100, 300), rnd.Next(1000, 2000), color); SetData(); Draw(); } diff --git a/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs b/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs index f786348..54ee076 100644 --- a/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs +++ b/Stormtrooper/Stormtrooper/SetStormtroopersGeneric.cs @@ -22,7 +22,7 @@ namespace Stormtrooper /// public int Count => _places.Count; - private readonly int _maxCount; + private readonly int _maxCount; /// /// Конструктор /// @@ -104,3 +104,4 @@ namespace Stormtrooper } } } +}