Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.43 KB | None | 0 0
  1. private void gpgga(string[] tab)
  2.         {
  3.  
  4.             if (!tab[2].Equals(""))
  5.                 textBox2.Text = string.Format("Szer : {0} st {1} min {2} sek {3} \n\r", tab[2].Substring(0, 2), tab[2].Substring(2, 2), Convert.ToInt32(tab[2].Substring(5, 3)) * 0.6, tab[3]); // mnozymy razy 0.6 zeby przejsc z ulamka tysiecznego na szesciedzietny
  6.             else
  7.                 textBox2.Text = "Brak szerokosci geograficznej\n";
  8.  
  9.             if (!tab[4].Equals(""))
  10.                 textBox3.Text = string.Format("Dłu : {0} st {1} min {2} sek {3} \n\r", tab[4].Substring(0, 3), tab[4].Substring(3, 2), Convert.ToInt32(tab[4].Substring(6, 3)) * 0.6, tab[5]);  
  11.             else
  12.                 textBox3.Text = "Brak długosci geograficznej\n";
  13.  
  14.             textBox4.Text = string.Format("Fix quality : {0}\n", tab[6]);
  15.             textBox5.Text = string.Format("Ilość satelit : {0}", tab[7]);
  16.             NumberFormatInfo p = new NumberFormatInfo();
  17.             p.NumberDecimalSeparator = ".";
  18.  
  19.             szer = Convert.ToDouble(tab[2] , p)/100;
  20.             dl = Convert.ToDouble(tab[4], p) / 100;
  21.             string url = string.Format("https://www.google.com/maps/@{1},{2}", szer.ToString(CultureInfo.InvariantCulture), dl.ToString(CultureInfo.InvariantCulture), szer.ToString(CultureInfo.InvariantCulture), dl.ToString(CultureInfo.InvariantCulture));
  22.             textBox6.Text = url;
  23.             webBrowser1.Navigate(url);
  24.  
  25.  
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement