9
This commit is contained in:
parent
07a2d0e666
commit
d064ed64da
@ -12,14 +12,21 @@ namespace Seaplane
|
||||
{
|
||||
public partial class FormSeaplane : Form
|
||||
{
|
||||
private DrawingSeaplane? _drawingSeaplane;
|
||||
public FormSeaplane()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void buttonCreate_Click(object sender, EventArgs e)
|
||||
private void ButtonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Random random = new();
|
||||
_drawingSeaplane = new DrawingSeaplane();
|
||||
_drawingSeaplane.Init(random.Next(100, 300), random.Next(1000, 3000), Color.FromArgb(random.Next(0, 255),
|
||||
random.Next(0, 255), random.Next(0, 255)), Color.FromArgb(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255)),
|
||||
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
|
||||
_drawingSeaplane.SetPictureSize(pictureBoxSeaplane.Width, pictureBoxSeaplane.Height);
|
||||
_drawingSeaplane.SetPosition(random.Next(10,100),random.Next(10,100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user