void Form1_MouseClick(object sender, MouseEventArgs e) { selectedArea = areas.FirstOrDefault(a => a.IsFinalNode && a.Cover(new Vector2 { X = e.X, Y = e.Y })); clickedAndSelectedNode = nodes.FirstOrDefault(n => (n.Position - new Vector2 { X = (double)e.X, Y = (double)e.Y }).Module() <= 5.0); this.Invalidate(); }
void interfaceNewArea(QuadTreeArea newarea) { this.Text = "Paused on new Area"; this.areas.Add(newarea); this.Invalidate(); }
void ProblemContext_NewArea(QuadTreeArea newarea) { this.BeginInvoke((Action) delegate { interfaceNewArea(newarea); }); //checkPoint() }