示例#1
0
    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);
    }
示例#2
0
 public void Quit()
 {
     UnRegisterEvent();
     KDownlaodFile.Instance().Quit();
 }
示例#3
0
 public void Update()
 {
     KDownlaodFile.Instance().Update();
 }
示例#4
0
 public void StopDownload()
 {
     //handler在这里释放.
     m_State = DownloadState.STOP;
     KDownlaodFile.Instance().StopDownload(m_strURL);
 }