void XcmdShowPoisImage_Click(object sender, EventArgs e) { var coords = new Dictionary <string, GeoCoordinate>(); coords.Add("X", this.ReferenzKunde.Adresskoordinaten); var counter = 65; foreach (DataGridViewRow item in this.DgvMachines.SelectedRows) { var kunde = (item.DataBoundItem as Wartungstermin).Kunde; if (kunde != null) { coords.Add(char.ConvertFromUtf32(counter), kunde.Adresskoordinaten); counter++; } } if (coords.Count > 0) { var picture = GeoData.GetPoisImage(coords, 1200, 800); var tv = new TestView(picture); tv.Show(); } }