private void button2_Click(object sender, RoutedEventArgs e) { if (heatMap == null) { heatMap = new HeatMap(can); heatMap.Closed += HeatMap_Closed; heatMap.Owner = this; heatMap.Show(); heatMap.UpdateHeatmap(); } else { heatMap.UpdateHeatmap(); } }
private void HeatMap_Closed(object sender, EventArgs e) { heatMap = null; }