-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainForm.cs
More file actions
30 lines (24 loc) · 770 Bytes
/
MainForm.cs
File metadata and controls
30 lines (24 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace CS_GRAPHICS
{
public partial class MainForm : Form
{
private Mandelbrot _fractal = new();
private EditorMandelbrot _editorMandelbrot = new();
public MainForm()
{
InitializeComponent();
_editorMandelbrot.Dock = DockStyle.Fill;
panelEditor.Controls.Clear();
panelEditor.Controls.Add(_editorMandelbrot);
_editorMandelbrot.BringToFront();
_editorMandelbrot.LoadState(_fractal);
this.CenterToScreen();
}
private void btnRender_Click(object sender, EventArgs e)
{
_editorMandelbrot.SaveState(_fractal);
_fractal.Render();
pictureBox.Image = _fractal.Buffer;
}
}
}