Esempio n. 1
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            GasSt  gasSt    = gasStationlist.SelectedItem as GasSt;
            string rinkAddr = gasSt.VAN_ADR;  //링크 라벨용 주소값

            System.Diagnostics.Process.Start(string.Format("https://map.naver.com/v5/search/{0}", rinkAddr));
        }
Esempio n. 2
0
        private void gasStationlist_SelectedIndexChanged(object sender, EventArgs e)
        {
            GasSt gasSt = gasStationlist.SelectedItem as GasSt;

            OS_NM.Text    = gasSt.OS_NM;          // 해당일자
            VAN_ADR.Text  = gasSt.VAN_ADR;        //위치
            stPRICE.Text  = gasSt.STPRICE + "원";  //가격
            POLL_DIV.Text = gasSt.POLL_DIV_CO;    //

            string logoCheck = gasSt.POLL_DIV_CO; //이미지 체크용
            string ske       = "SKE";
            string gsc       = "GSC";
            string hdo       = "HDO";
            string sol       = "SOL";
            string rto       = "RTO";
            string e1g       = "E1G";
            string skg       = "SKG";

            if (gsc.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.gsLogoCut;
            }
            else if (ske.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.sk1logoCut;
            }
            else if (hdo.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.hyunDaeLogoCut;
            }
            else if (sol.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.SoilCut;
            }
            else if (rto.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.alttleCut;
            }
            else if (e1g.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.e1logoCut;
            }
            else if (skg.Equals(logoCheck))
            {
                pictureBox5.BackgroundImage = Properties.Resources.sklogoCut;
            }
        }
Esempio n. 3
0
    internal static List <GasSt> Search(string key, string areaNum1, string areaNum2, string proNum)
    {
        List <GasSt> gasSt = new List <GasSt>();

        string queryurl = string.Format("http://www.opinet.co.kr/api/lowTop10.do?out=xml&code={0}&prodcd={3}&area={1}{2}&cnt=10", key, areaNum1, areaNum2, proNum);

        XmlDocument xdoc = new XmlDocument();                //Xml 문서 개체 생성

        xdoc.PreserveWhitespace = true;                      //원본의 공백 유지
        xdoc.Load(queryurl);                                 //Xml 문서 개체에 사이트 로딩

        XmlNode     cnode = xdoc.SelectSingleNode("RESULT"); //RESULT 요소 탐색
        XmlNodeList xnl   = cnode.SelectNodes("OIL");        //OIL 요소 목록 탐색


        foreach (XmlNode xn in xnl)
        {
            gasSt.Add(GasSt.Parse(xn));
        }
        return(gasSt);
    }