public Form1() { InitializeComponent(); Tree(); lblTime.Text = ""; lbltotalenergy.Text = ""; Canvas = GetContext(); }
private void tmrAnimate_Tick(object sender, EventArgs e) { t++; lblTime.Text = t.ToString() + "s"; Canvas = GetContext(); Animate(); Canvas.Clear(Color.Black); RedrawTree(); }
void Form1_Resize(object sender, System.EventArgs e) { Canvas = GetContext(); }