private void linkLabel2_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e) { GasStJP gasStJP = listBox1.SelectedItem as GasStJP; string rinkAddr1 = gasStJP.JPAddress; //링크 라벨용 주소값 System.Diagnostics.Process.Start(string.Format("https://www.google.co.kr/maps/place/{0}", rinkAddr1)); }
private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { GasStJP gasStJP = listBox1.SelectedItem as GasStJP; Date.Text = "日 : " + gasStJP.Date; // 해당일자 ShopName.Text = gasStJP.ShopName;; //제품명 JPPrice.Text = gasStJP.JPPrice + "円"; //가격 JPAddress.Text = gasStJP.JPAddress; //전일대비 등락값 BrandPanel.Text = gasStJP.Brand; //전일대비 등락값 }
internal static List <GasStJP> Search(string keyJP) { List <GasStJP> gasStJP = new List <GasStJP>(); string queryurl = string.Format("http://api.gogo.gs/v1.1/?apid={0}", keyJP); XmlDocument xdoc = new XmlDocument(); //Xml 문서 개체 생성 xdoc.PreserveWhitespace = true; //원본의 공백 유지 xdoc.Load(queryurl); //Xml 문서 개체에 사이트 로딩 XmlNode cnode = xdoc.SelectSingleNode("PriceInfo"); //RESULT 요소 탐색 XmlNodeList xnl = cnode.SelectNodes("Item"); //OIL 요소 목록 탐색 foreach (XmlNode xn in xnl) { gasStJP.Add(GasStJP.Parse(xn)); } return(gasStJP); }