public static KDownlaodFile Instance() { if (s_Instance == null) { s_Instance = new KDownlaodFile(); } return(s_Instance); }
public void StartDownload() { // 网络不通跳过http下载 if (CkeckNetworking() == false) { return; } KDownloadHandler handler = KDownlaodFile.Instance().StartDownload(m_strURL, m_strSaveFile); if (handler == null) { return; } m_State = DownloadState.DOWNLOAD; handler.RegisteProgressBack(OnProgress); handler.RegisteReceiveTotalLengthBack(OnTotalLength); handler.RegisteCompleteBack(OnComplete); }
public void Quit() { UnRegisterEvent(); KDownlaodFile.Instance().Quit(); }
public void Update() { KDownlaodFile.Instance().Update(); }
public void StopDownload() { //handler在这里释放. m_State = DownloadState.STOP; KDownlaodFile.Instance().StopDownload(m_strURL); }