Example #1
0
        public void Start()
        {
            ProgressID_         = StageProgressID.Idle;
            ProgressValue_      = 0;
            ResVersionInfo_     = null;
            CurrentVersionInfo_ = null;
            ResPatchInfoList_   = null;
            CurrentPatchInfo_   = null;
            ErrorCode_          = ErrorCode.Ok;
            ErrorInfo_          = string.Empty;
            ContentInfo_        = string.Empty;

            Pipline_ = new Pipline();
            Pipline_.InitStage(this);

            Downloader.StopAllTask();
        }
Example #2
0
        protected override void OnEnter()
        {
            Updater_.SetProgressID(StageProgressID.CheckResVersionBegin);
            Updater_.SetProgressValue(0);
            Updater_.ClearError();

            ResPatchInfoList PatchInfoList = Updater_.GetResPatchInfoList();

            if (PatchInfoList == null)
            {
                PatchInfoList = UpdateTool.GetResPatchInfoList();
                if (PatchInfoList == null)
                {
                    StageCode_ = StageCode.Failed;
                    Updater_.SetError(ErrorCode.GetResPatchInfoListFailed, UpdateTool.ServerVersionInfoPath_);
                    return;
                }

                Updater_.SetResPatchInfoList(PatchInfoList);
            }

            ResPatchInfo PatchInfo = PatchInfoList.GetPatchWithVersion(Updater_.GetCurrentVersionInfo());

            if (PatchInfo != null)
            {
                Updater_.SetCurrentResPatchInfo(PatchInfo);
            }
            else
            {
                SetNextStageID(StageID.Final);
            }

            StageCode_ = StageCode.Succeeded;
            Updater_.SetProgressID(StageProgressID.CheckResVersionEnd);
            Updater_.SetProgressValue(1.0f);
        }
Example #3
0
 public void SetResPatchInfoList(ResPatchInfoList PatchInfoList)
 {
     ResPatchInfoList_ = PatchInfoList;
 }