예제 #1
0
        private void OnMsg_CheckResourceOver(MobaMessage msg)
        {
            object[]        array           = msg.Param as object[];
            string          content         = string.Empty;
            EAssetLoadError eAssetLoadError = EAssetLoadError.eUnknowReason;

            if (array != null && array.Length == 3)
            {
                eAssetLoadError = (EAssetLoadError)((int)array[0]);
            }
            switch (eAssetLoadError)
            {
            case EAssetLoadError.eWWWError:
                content = "资源下载失败,www错误,是否重试?";
                this.ShowMsgBox("资源下载", content, new Action(this.CheckAsset), new Action(this.Del_quit), "重试", "取消");
                break;

            case EAssetLoadError.eInsufficientSpace:
                this.HandleParams(array[1]);
                content = "磁盘空间不足,是否重试?" + this.GetSpaceNotice();
                this.ShowMsgBox("资源下载", content, new Action(this.CheckAsset), new Action(this.Del_quit), "重试", "取消");
                break;

            case EAssetLoadError.eCheckDownLoadOK:
                this.HandleParams(array[1]);
                content = "请确认下载资源" + this.GetSpaceNotice();
                this.CheckWIFI();
                break;

            case EAssetLoadError.eNoNeedToDownloadAsset:
                this.HandleParams(array[1]);
                this.CheckFinish();
                break;
            }
        }
        private void OnMsg_DownLoadResourceOver(MobaMessage msg)
        {
            object[]        array           = msg.Param as object[];
            string          content         = string.Empty;
            EAssetLoadError eAssetLoadError = EAssetLoadError.eUnknowReason;

            if (array != null && array.Length == 3)
            {
                eAssetLoadError = (EAssetLoadError)((int)array[0]);
            }
            EAssetLoadError eAssetLoadError2 = eAssetLoadError;

            switch (eAssetLoadError2)
            {
            case EAssetLoadError.eSuccess:
                this.DownLoadFinish();
                return;

            case EAssetLoadError.eDownLoadApk:
IL_41:
                if (eAssetLoadError2 != EAssetLoadError.eUnknowReason)
                {
                }
                content = "资源下载失败,原因不明,是否重试?";
                this.ShowMsgBox("资源下载", content, new Action(this.DownloadAsset), new Action(this.Del_quit), "重试", "取消");
                return;

            case EAssetLoadError.eWWWError:
                content = "资源下载失败,www错误,是否重试?";
                this.ShowMsgBox("资源下载", content, new Action(this.DownloadAsset), new Action(this.Del_quit), "重试", "取消");
                return;
            }
            goto IL_41;
        }
예제 #3
0
 private void onCheckAssetFinished(EAssetLoadError e, object extra, string url)
 {
     MobaMessageManagerTools.SendClientMsg(ClientC2C.CheckResourceOver, new object[]
     {
         e,
         extra,
         url
     }, false);
 }
예제 #4
0
 private void onDownloadBinDataFinished(EAssetLoadError e, object extra, string url)
 {
     MobaMessageManagerTools.SendClientMsg(ClientC2C.DownLoadBinDataOver, e, true);
 }