예제 #1
0
        public override void OnUpdate()
        {
            if (web.isError)
            {
                errorMessage.Value = web.error;
                errorCode.Value    = web.errorCode;
                Fsm.Event(isError);
                Finish();
            }
            else if (web.isDone)
            {
                Fsm.Event(isDownloaded);

                List <string> source = web.LoadList <string>(_tag);

                if (localFile.Value != "")
                {
                    web.SaveToFile(localFile.Value);
                }


                Log("Loaded from " + saveFile.Value + "?tag=" + uniqueTag);

                proxy.arrayList.Clear();

                foreach (string element in source)
                {
                    proxy.arrayList.Add(PlayMakerUtils.ParseValueFromString(element));
                }


                Finish();
            }
        }
예제 #2
0
        public override void OnUpdate()
        {
            if (web.isError)
            {
                errorMessage.Value = web.error;
                errorCode.Value    = web.errorCode;
                Fsm.Event(isError);
                Finish();
            }
            else if (web.isDone)
            {
                Fsm.Event(isDownloaded);

                Dictionary <string, string> _dict = web.LoadDictionary <string, string>(_tag);

                if (localFile.Value != "")
                {
                    web.SaveToFile(localFile.Value);
                }

                Log("DownLoaded from " + saveFile.Value + "?tag=" + _tag);

                proxy.hashTable.Clear();

                foreach (string key in _dict.Keys)
                {
                    proxy.hashTable[key] = PlayMakerUtils.ParseValueFromString(_dict[key]);
                }

                Finish();
            }
        }