Ejemplo n.º 1
0
 void FinishDownload()
 {
     if (xmlData.contentList.Length > 0)
     {
         for (int i = 0; i < xmlData.contentList.Length; i++)
         {
             GameObject        dtx     = new GameObject("DownloadedTex" + i);
             DownloadedTexture dtxComp = dtx.AddComponent <DownloadedTexture> ();
             dtx.transform.parent = this.transform;
             dtxComp.StartDownload(xmlData.contentList [i].imgthumbnail);
             mDownloadTexList.Add(dtxComp);
         }
         int nextPageSize = Mathf.CeilToInt((float)xmlData.maxPage / PageDetailGlobal.pGlobal.MaxContentPerPage);
         if (nextPageSize != CurrentPageSize)
         {
             CurrentPageSize = nextPageSize;
             FooterBar.ClearPaging();
             FooterBar.CreatePaging(CurrentPageSize);
         }
         ShelfDetail.CreateShelfItem(xmlData.contentList, mDownloadTexList, FooterBar.IsFirstPage(), FooterBar.IsLastPage());
         FullListDetail.CreateItemDetail(xmlData.contentList, mDownloadTexList);
     }
     else
     {
         Indecator.SetActive(false);
         PopupObject.ShowAlertPopup("ไม่พบข้อมูลที่ค้นหา", "กรุณาค้นหาใหม่อีกครั้ง", "ตกลง");
     }
 }
Ejemplo n.º 2
0
    void DownloadThumbnail(string path)
    {
        if (path.Length <= 0)
        {
            return;
        }
        DownloadedTexture dTexture = ContentPageFile.CreateLoadTexture();

        dTexture.name = ContentPageFile.GetFileName(path);
        texture.AddDownloadTexture(dTexture, "FavThumb");
        dTexture.StartDownload(path);
    }
Ejemplo n.º 3
0
    void DownloadTextureFile(string img)
    {
        if (img.Length <= 0)
        {
            Debug.Log("No Img Downloaded");
            return;
        }
        GameObject        dtx      = new GameObject(GetFileName(img));
        DownloadedTexture dTexture = dtx.AddComponent <DownloadedTexture> ();

        dTexture.postDownloaded += saveFileTexture;
        dtx.transform.parent     = this.transform;
        dTexture.StartDownload(img);
        downloadingList.Add(dTexture);
    }
Ejemplo n.º 4
0
    public void setupImg(string link)
    {
        if (link == "")
        {
            return;
        }
        GameObject dtx = new GameObject("DownloadTex");

        dTexture = dtx.AddComponent <DownloadedTexture> ();
        SpriteTex.SetNewAnchor(0.5f, 1.0f);
        SpriteTex.AddDownloadTexture(dTexture, "Detail");
//		SpriteTex.AddDownloadTexture (dTexture);
        dtx.transform.parent = this.transform;
        dTexture.StartDownload(link);
        Debug.Log("setupImg height : " + SpriteTex.size.y);
        height += SpriteTex.size.y / 100.0f + 0.5f;
    }