Изменил(а) на 'HoistingCrane/HoistingCrane/FormHoistingCrane.cs'
This commit is contained in:
parent
ec3080e9fd
commit
ad4adeb262
@ -68,26 +68,14 @@
|
||||
Draw();
|
||||
}
|
||||
|
||||
private void ButtonCreateModify_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// Èçìåíåíèå ðàçìåðîâ ôîðìû
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void pictureBoxHoistingCrane_Resize(object sender, EventArgs e)
|
||||
{
|
||||
Random rnd = new();
|
||||
Color selectedColor = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256),
|
||||
rnd.Next(0, 256));
|
||||
ColorDialog dialog = new();
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
selectedColor = dialog.Color;
|
||||
}
|
||||
Color advancedSelectedColor = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256),
|
||||
rnd.Next(0, 256));
|
||||
ColorDialog dialogDop = new();
|
||||
if (dialogDop.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
advancedSelectedColor = dialogDop.Color;
|
||||
}
|
||||
_HoistingCrane = new DrawingAdvancedHoistingCrane(rnd.Next(30, 100), rnd.Next(300, 500),
|
||||
selectedColor, advancedSelectedColor, Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
SetData();
|
||||
_hoistingCrane?.ChangeBorders(pictureBoxHoistingCrane.Width, pictureBoxHoistingCrane.Height);
|
||||
Draw();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user