private void BtnTerkini_Click(object sender, EventArgs e) { PanelMain.Show(); WebMaps.Hide(); PanelSearch.Hide(); BtnTerkini.Image = global::Retakan.Properties.Resources.terkini_on; BtnMaps.Image = global::Retakan.Properties.Resources.peta_off; BtnSearch.Image = global::Retakan.Properties.Resources.cari_off; rssData = getRssData("https://rss.sciencedaily.com/earth_climate/earthquakes.xml"); LblJudul1.Text = rssData[0, 0]; LblJudul2.Text = rssData[1, 0]; LblJudul3.Text = rssData[2, 0]; LblIsi1.Text = rssData[0, 1]; LblIsi2.Text = rssData[1, 1]; LblIsi3.Text = rssData[2, 1]; A.AmbilDataBesar(); D.AmbilDataMenengah(); C.AmbilDataKecil(); LblMag1.Text = A.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture); LblLokasi1.Text = A.place; LblWaktu1.Text = A.time.ToString(); if (A.tsunami == "0") { LblPTsunami1.Text = "Tidak Berpotensi Tsunami"; } else { LblPTsunami1.Text = "Berpotensi Tsunami"; } Console.WriteLine(A.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture) + " Mag"); LblMag2.Text = D.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture);; LblLokasi2.Text = D.place; LblWaktu2.Text = D.time.ToString(); Console.WriteLine(D.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture) + " Mag"); Console.WriteLine(D.tsunami); if (D.tsunami == "0") { LblPTsunami2.Text = "Tidak Berpotensi Tsunami"; } else { LblPTsunami2.Text = "Berpotensi Tsunami"; } LblMag3.Text = C.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture);; LblLokasi3.Text = C.place; LblWaktu3.Text = C.time.ToString(); if (C.tsunami == "0") { LblPTsunami3.Text = "Tidak Berpotensi Tsunami"; } else { LblPTsunami3.Text = "Berpotensi Tsunami"; } Console.WriteLine(C.mag.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture) + " Mag"); }
private void BtnMaps_Click(object sender, EventArgs e) { PanelMain.Hide(); WebMaps.Show(); PanelSearch.Hide(); BtnTerkini.Image = global::Retakan.Properties.Resources.terkini_off; BtnMaps.Image = global::Retakan.Properties.Resources.peta_on; BtnSearch.Image = global::Retakan.Properties.Resources.cari_off; }