Ejemplo n.º 1
0
 public EntityItemDetailInfo(EntitySearchResultItem sr)
 {
     this.SearchResult = sr;
     CountStr          = "";
     PriceStr          = new string[5];
     TimeList          = new List <EntityItemTimeInfo>();
 }
Ejemplo n.º 2
0
        private void ParseSearchResultItem(string str)
        {
            EntitySearchResultItem item = new EntitySearchResultItem();

            string s1 = "itemLayer[";
            int    i1 = str.IndexOf(s1);

            i1 += s1.Length;
            int i2 = str.IndexOf("]", i1);

            item.ID = Substring(str, i1, i2 - 1);

            s1            = "img src=\"";
            i1            = str.IndexOf(s1, i2);
            i1           += s1.Length;
            i2            = str.IndexOf("\"", i1);
            item.ImageUrl = Substring(str, i1, i2 - 1);

            s1        = "vendorDetail[" + item.ID;
            i1        = str.IndexOf(s1, i2);
            s1        = "<strong>";
            i1        = str.IndexOf(s1, i1);
            i1       += s1.Length;
            i2        = str.IndexOf("</strong>", i1);
            item.Name = Substring(str, i1, i2 - 1);

            s1         = "<li>";
            i1         = str.IndexOf(s1, i2);
            i1        += s1.Length;
            i2         = str.IndexOf("<", i1);
            item.Level = Substring(str, i1, i2 - 1).Trim();

            s1         = item.ID + "]\">";
            i1         = str.IndexOf(s1, i2);
            i1        += s1.Length;
            i2         = str.IndexOf("<", i1);
            item.Count = Substring(str, i1, i2 - 1).Trim();

            s1            = "<strong>";
            i1            = str.IndexOf(s1, i2);
            i1           += s1.Length;
            i2            = str.IndexOf("<", i1);
            item.LowPrice = Substring(str, i1, i2 - 1).Trim();

            s1             = "<strong>";
            i1             = str.IndexOf(s1, i2);
            i1            += s1.Length;
            i2             = str.IndexOf("<", i1);
            item.HighPrice = Substring(str, i1, i2 - 1).Trim();

            s1  = item.ID + "]\">";
            i1  = str.IndexOf(s1, i2);
            i1 += s1.Length;
            i2  = str.IndexOf("<", i1);
            item.CommentCount = Substring(str, i1, i2 - 1).Trim();

            //this.main.AppendDebug(item.GetDebug());
            ResultList.Add(item);
        }
Ejemplo n.º 3
0
        private void listViewSearchResult_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                //this.statusStrip1.Text = "세부정보 다운로드중..";
                ListView.SelectedIndexCollection collection = this.listViewSearchResult.SelectedIndices;
                if (collection.Count == 0)
                {
                    return;
                }
                EntitySearchResultItem item = (EntitySearchResultItem)this.listViewSearchResult.Items[collection[0]].Tag;
                this.httpHandler.DownloadItemDetail(item);
                this.richTextBoxItemDetail.Text = "";
                AppendLineDetail(this.httpHandler.ItemDetailInfo.Name + "\t\t" + "등록건수: " + this.httpHandler.ItemDetailInfo.CountStr);
                AppendLineDetail("등록 최저가: " + this.httpHandler.ItemDetailInfo.PriceStr[0] + "\t\t" + "등록 최고가: " + this.httpHandler.ItemDetailInfo.PriceStr[1]);
                AppendLineDetail("주간 평균가: " + this.httpHandler.ItemDetailInfo.PriceStr[4] + "\t\t" + "주간 최저가: " + this.httpHandler.ItemDetailInfo.PriceStr[2] + "\t\t" +
                                 "주간 최고가: " + this.httpHandler.ItemDetailInfo.PriceStr[3]);

                this.listView1.Items.Clear();

                List <EntityItemTimeInfo> newList = new List <EntityItemTimeInfo>();
                for (int i = 30; i > 23; i--)
                {
                    newList.Add(this.httpHandler.ItemDetailInfo.TimeList[i]);
                }
                for (int i = 52; i > 30; i--)
                {
                    newList.Add(this.httpHandler.ItemDetailInfo.TimeList[i]);
                }
                for (int i = 23; i > -1; i--)
                {
                    newList.Add(this.httpHandler.ItemDetailInfo.TimeList[i]);
                }


                this.httpHandler.ItemDetailInfo.TimeList = newList;

                foreach (EntityItemTimeInfo info in this.httpHandler.ItemDetailInfo.TimeList)
                {
                    ListViewItem lvi = new ListViewItem(new string[5]);
                    lvi.SubItems[0].Text = info.Label;
                    lvi.SubItems[1].Text = info.Volume;
                    lvi.SubItems[2].Text = info.AvrPrice;
                    lvi.SubItems[3].Text = info.LowPrice;
                    lvi.SubItems[4].Text = info.HighPrice;

                    this.listView1.Items.Add(lvi);
                }
                //this.statusStrip1.Text = "세부정보 다운로드 완료..";
            }
            catch (Exception ee)
            {
                //this.statusStrip1.Text = "세부정보 다운로드 실패..";
                MessageBox.Show(ee.ToString());
            }
        }
Ejemplo n.º 4
0
        public void DownloadItemDetail(EntitySearchResultItem item)
        {
            //http://aion.plaync.com/live/vendor/searchDetail?serverID=2&race=1&&itemNameID=384953e60f680dc83c29f924707284ac_88
            ItemDetailInfo = new EntityItemDetailInfo(item);
            string url = "http://aion.plaync.com/live/vendor/searchDetail?serverID=" + ServerID + "&race=" + Race + "&itemNameID=" + item.ID;

            byte[] data = HttpDownload(url, null);
            if (data == null)
            {
                return;
            }
            String result = GetKorString(data);

            ProcessDetailString(result);
        }