Esempio n. 1
0
    void LoadScreen()
    {
        AllRoot       giantScreen     = JsonConvert.DeserializeObject <AllRoot>(retString);
        CategorysItem gsCategorysItem = giantScreen.categorys[0];

        screenDataItems = gsCategorysItem.data;
        LauncherUIManager.instance.SetScreenItemDate();
    }
Esempio n. 2
0
    void LoadVR()
    {
        AllRoot vr = JsonConvert.DeserializeObject <AllRoot>(retString);

        CategorysItem vrCategorysItem = vr.categorys[0];

        vrDataItems = vrCategorysItem.data;
        LauncherUIManager.instance.SetVRItemDate();
    }
Esempio n. 3
0
    void  Load4KPart()
    {
        // string _4kJson = HttpUitls.GetStr(_4kPath);//获取4K专区的内容
        AllRoot _4K = JsonConvert.DeserializeObject <AllRoot>(retString);

        //    Debug.Log("Count:" + _4K.categorys.Count );
        categorysItem = _4K.categorys;
        _4kDataItems  = categorysItem[0].data;
        LauncherUIManager.instance.Set_4kItemDate();
    }
Esempio n. 4
0
        public static async void fetchAll(fetchAllDelegate CallBack)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(APIUrl + APIVersion + "/all.json");

            request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

            using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync())
                using (Stream stream = response.GetResponseStream())
                    using (StreamReader reader = new StreamReader(stream))
                    {
                        string json = await reader.ReadToEndAsync();

                        AllRoot allRoot = JsonConvert.DeserializeObject <AllRoot>(json);

                        CallBack(allRoot.parameters.services, allRoot.parameters.version);
                    }
        }