fix palette
This commit is contained in:
parent
49bcf52b3a
commit
c2284796b7
@ -39,9 +39,14 @@ namespace Airbus
|
||||
}
|
||||
private void buttonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random random = new Random();
|
||||
airplane = new DrawningAirplane(random.Next(100, 300), random.Next(1000, 3000), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)));
|
||||
|
||||
Random rnd = new();
|
||||
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;
|
||||
}
|
||||
airplane = new DrawningAirplane(rnd.Next(100, 300), rnd.Next(1000, 2000), color);
|
||||
SetData();
|
||||
Draw();
|
||||
}
|
||||
@ -75,11 +80,21 @@ namespace Airbus
|
||||
}
|
||||
private void buttonModCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random random = new Random();
|
||||
airplane = new DrawingAirbus(random.Next(100, 300), random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
true, true);
|
||||
Random rnd = new();
|
||||
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;
|
||||
}
|
||||
Color dopColor = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256));
|
||||
ColorDialog dialogDop = new();
|
||||
if (dialogDop.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
dopColor = dialogDop.Color;
|
||||
}
|
||||
airplane = new DrawingAirbus(rnd.Next(100, 300), rnd.Next(1000, 2000), color, dopColor,
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
SetData();
|
||||
Draw();
|
||||
}
|
||||
@ -89,4 +104,4 @@ namespace Airbus
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}-
|
@ -177,7 +177,7 @@ namespace Airbus
|
||||
int maxLeft = (countInLine - 1) * _placeSizeWidth;
|
||||
for (int i = 0; i < _setAirplane.Count; i++)
|
||||
{
|
||||
_setAirplane.Get(i)?.SetObject(maxLeft - i % countInLine * _placeSizeWidth, i / countInLine * _placeSizeHeight + 3, _pictureWidth, _pictureHeight);
|
||||
_setAirplane.Get(i)?.SetObject(maxLeft - i % countInLine * _placeSizeWidth, (_pictureHeight - (i / 2 * _placeSizeHeight + _placeSizeHeight + 30)), _pictureWidth, _placeSizeHeight);
|
||||
_setAirplane.Get(i)?.DrawningObject(g);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user