public override void OnFocus() { base.OnFocus(); if (LTComeBackEvent.ComeBackUpdata != null) { LTComeBackEvent.ComeBackUpdata(); } if (LTComeBackEvent.ComeBackOnfocus != null) { LTComeBackEvent.ComeBackOnfocus(); } LTWelfareModel.Instance.ComeBack_Login(); LTWelfareModel.Instance.ComeBack_Task(); }
private void OnCompleteBtnClick() { if (EB.Time.Now > LTWelfareModel.Instance.overTime) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_FinalPlayerItem_4620")); return; } if (!sTaskOver) { return; } sTaskOver = false; InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f); LTWelfareModel.Instance.RequestComplete(Data.TaskId.ToString(), delegate(bool success) { if (success) { if (LTComeBackEvent.ComeBackUpdata != null) { LTComeBackEvent.ComeBackUpdata(); } { var ht = Johny.HashtablePool.Claim(); ht.Add("0", TitleLabel.text); MessageTemplateManager.ShowMessage(901036, ht, null); Johny.HashtablePool.Release(ht); } System.Action callback = delegate() { if (EB.Sparx.Hub.Instance.LevelRewardsManager.IsLevelUp) { LTMainHudManager.Instance.CheckLevelUp(delegate() { sTaskOver = true; }); } else { sTaskOver = true; } }; List <LTShowItemData> ItemDatas = TaskStaticData.GetItemRewardList(Data.TaskId); for (int i = 0; i < ItemDatas.Count; i++) { if (ItemDatas[i].id == "hc") { FusionTelemetry.CurrencyChangeData.PostEvent(FusionTelemetry.CurrencyChangeData.hc, ItemDatas[i].count, "福利成长目标"); } if (ItemDatas[i].id == "gold") { FusionTelemetry.CurrencyChangeData.PostEvent(FusionTelemetry.CurrencyChangeData.gold, ItemDatas[i].count, "福利成长目标"); } } { var ht = Johny.HashtablePool.Claim(); ht.Add("reward", ItemDatas); ht.Add("callback", callback); GlobalMenuManager.Instance.Open("LTShowRewardView", ht); } } sTaskOver = true; }); }