Пример #1
0
        /** [シングルトン]constructor
         */
        private Data()
        {
            //list
            this.list = new System.Collections.Generic.Dictionary <string, ListItem>();

            //main_load
            this.main_load = new Main_Load();

            //work_list
            this.work_list = new System.Collections.Generic.List <WorkItem>();

            //add_list
            this.add_list = new System.Collections.Generic.List <WorkItem>();
        }
Пример #2
0
        /** [シングルトン]constructor
         */
        private Data()
        {
            //work
            this.work_pool = new List.NodePool <WorkItem>(16);
            this.work_add  = new System.Collections.Generic.LinkedList <WorkItem>();
            this.work_list = new System.Collections.Generic.LinkedList <WorkItem>();

            //list
            this.list = new System.Collections.Generic.Dictionary <string, ListItem>();

            //main_load
            this.main_load = new Main_Load();

            //PlayerLoopType
            this.playerloop_flag = true;
            Fee.PlayerLoopSystem.PlayerLoopSystem.GetInstance().Add(Config.PLAYERLOOP_ADDTYPE, Config.PLAYERLOOP_TARGETTYPE, typeof(PlayerLoopType.Fee_Data_Main), this.Main);
        }
Пример #3
0
        /** 更新。
         *
         *      return == true : 完了。
         *
         */
        public bool Main()
        {
            switch (this.mode)
            {
            case Mode.Start:
            {
                switch (this.request_type)
                {
                case RequestType.Load:
                {
                    if (Fee.Data.Data.GetInstance().GetMainLoad().RequestLoad(this.request_listitem) == true)
                    {
                        this.mode = Mode.Do_File;
                    }
                } break;
                }
            } break;

            case Mode.End:
            {
            } return(true);

            case Mode.Do_File:
            {
                Main_Load t_main = Fee.Data.Data.GetInstance().GetMainLoad();

                this.item.SetResultProgress(t_main.GetResultProgress());

                if (t_main.GetResultType() != Main_Load.ResultType.None)
                {
                    //結果。
                    bool t_success = false;
                    switch (t_main.GetResultType())
                    {
                    case Main_Load.ResultType.Asset:
                    {
                        if (t_main.GetResultAsset() != null)
                        {
                            this.item.SetResultAsset(t_main.GetResultAsset());
                            t_success = true;
                        }
                    } break;
                    }

                    if (t_success == false)
                    {
                        this.item.SetResultErrorString(t_main.GetResultErrorString());
                    }

                    //完了。
                    t_main.Fix();

                    this.mode = Mode.End;
                }
                else if (this.item.IsCancel() == true)
                {
                    //キャンセル。
                    t_main.Cancel();
                }
            } break;
            }

            return(false);
        }