Anarchosa Posted December 3, 2021 Share Posted December 3, 2021 (edited) Alıntı int count = 0; foreach (DataGridViewRow dtr in kucuk.Rows) { count++; var currentCulture = System.Globalization.CultureInfo.InstalledUICulture; var numberFormat = (System.Globalization.NumberFormatInfo)currentCulture.NumberFormat.Clone(); numberFormat.NumberDecimalSeparator = "."; double fEnlem; double fBoylam = 0; double fisim; if (count != kucuk.Rows.Count) { bool succeededE = double.TryParse(dtr.Cells[2].Value.ToString(), System.Globalization.NumberStyles.Any, numberFormat, out fEnlem); bool succeededF = double.TryParse(dtr.Cells[3].Value.ToString(), System.Globalization.NumberStyles.Any, numberFormat, out fBoylam); bool succeededG = double.TryParse(dtr.Cells[4].Value.ToString(), System.Globalization.NumberStyles.Any, numberFormat, out fisim); if (succeededE == true && succeededF == true) { if (fEnlem > 10) analist.Rows.Add(dtr.Cells[2].Value, dtr.Cells[3].Value, dtr.Cells[4].Value, dtr.Cells[0].Value, dtr.Cells[1].Value); } } } MessageBox.Show(analist.Rows[0].Cells[0].Value.ToString() + "\n" + analist.Rows[0].Cells[1].Value.ToString() + "\n" + analist.Rows[0].Cells[4].Value.ToString()); MyWebBrowser.Document.InvokeScript("changeCenter", new object[] { analist.Rows[0].Cells[0].Value, analist.Rows[0].Cells[1].Value }); analist.Visible = true; string color; for (int i = 0; i < analist.RowCount; i++) { if (analist.Rows[i].Cells[2].Value.ToString() == "GÜVENLİ BÖLGE") color = "Green"; else color = "Brown"; MessageBox.Show(analist.Rows[i].Cells[0].Value.ToString() + "\n" + analist.Rows[i].Cells[1].Value.ToString() + "\n" + analist.Rows[i].Cells[4].Value.ToString()); MyWebBrowser.Document.InvokeScript("updateMapWithPushpins", new object[] { analist.Rows[i].Cells[0].Value, analist.Rows[i].Cells[1].Value, analist.Rows[i].Cells[4].Value, color }); } break; İlk Satırdaki Ekliyor Altındakileri Vermiyor. Edited December 3, 2021 by Anarchosa Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.