Beispiel #1
0
    // Use this for initialization
    void Awake()
    {
        //container.SetListItemTest(10);
        //TutorialManager.Instance.SetTutorialStep (process.step);
        test.ClientDataLoader.readClientData();
        StreamReader sr = new StreamReader(Application.dataPath + teamDataPath);

        json = sr.ReadToEnd();

        MyUserLargeData userData = JsonConversionExtensions.ConvertJson <MyUserLargeData>(json);


        MyUserData.UpdataUserdata(userData);

        //Debug.Log (largeData.TeamListData.team);

        /*StreamReader sr = new StreamReader (Application.dataPath + path);
         * string js = sr.ReadToEnd ();*/
        //reciever.ResolveReq (js);
        //int[] nia = new int[5];
        //Array.Copy (ia, 1, nia, 0, 5);

        //Debug.Log ("Length : "+nia.Length);

        /*foreach (int i in nia) {
         *      Debug.Log (i);
         * }*/
    }
        //Movie movie = JsonConvert.DeserializeObject<Movie>(json, new MovieConverter());

        static public void readClientData()
        {
            StreamReader sr = new StreamReader(Application.dataPath + "/ClientData/ClientData.txt");

            json = sr.ReadToEnd();

            ClientLargeData largeData = JsonConversionExtensions.ConvertJson <ClientLargeData>(json);

            MasterDataManager.UpdataMasterdata(largeData);
        }
        void SaveParams(Dictionary <string, object> _params)
        {
            Dictionary <string, object> _savedParams = new Dictionary <string, object> ();

            foreach (MethodElement element in requestElementList)
            {
                if (element.isParam == true)
                {
                    _savedParams.Add(element.methodKey, _params [element.methodKey]);
                }
            }
            savedParams = JsonConversionExtensions.ConvertJson(_savedParams);
        }