Пример #1
0
        private void RegisterStates()
        {
            AutoUpdateStateMgr.Register(AutoUpdateState.auPrepare,
                                        new AutoUpdatePrepareState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auCheckVersionReq,
                                        new AutoUpdateCheckVersionState());
            AutoUpdateStateMgr.Register(AutoUpdateState.auGetResListReq,
                                        new AutoUpdateFileListState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auUpdateFileProcess,
                                        new AutoUpdateFileDownloadState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auFinished,
                                        new AutoUpdateFinishState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auEnd,
                                        new AutoUpdateStateEnd());

            AutoUpdateStateMgr.Register(AutoUpdateState.auGetResZipReq,
                                        new AutoUpdateResZipReqState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auGetZipVerReq,
                                        new AutoUpdateGetZipVerReqState());

            AutoUpdateStateMgr.Register(AutoUpdateState.auUnZipRes,
                                        new AutoUpdateUnZipState());
        }
Пример #2
0
 public AutoUpdateMgr()
 {
     DownProcess  = 0;
     m_WritePath  = FilePathMgr.Instance.WritePath;
     m_StateMgr   = new AutoUpdateStateMgr(this);
     m_UpdateFile = new AutoUpdateCfgFile();
     if (!string.IsNullOrEmpty(m_WritePath))
     {
         m_UpdateFile.SaveFileName = string.Format("{0}/{1}", m_WritePath, _cUpdateTxt);
     }
     RegisterStates();
 }