protected override void OnFreshView() { if (Data == null) { return; } else if (Data is MatchItemData) { _curData = Data as MatchItemData; if (TweenPlay) { if (_tweenState) { if (_curData.NeedCloseWhenLoad) { _tweenState = false; TweenPlay.Play(_tweenState); } else { _curData.NeedCloseWhenLoad = true; } } } ShowMainUi(); } else if (Data is Dictionary <string, object> ) { ShowDetailInfo(); } }
private void OnMatchStateChange(object objData) { if (objData is object[]) { var arr = objData as object[]; MatchItem item = arr[0] as MatchItem; MatchItemData data = arr[1] as MatchItemData; if (Items != null && Items.Count > 0) { if (!_curShortName.Equals(SortByTimesName)) { YxMessageBox.Show( MatchRefreshNotice, null, (window, btnname) => { switch (btnname) { case YxMessageBox.BtnMiddle: SortByType(_curShortName); break; } }); } else { if (data != null) { data.NeedCloseWhenLoad = false; if (item != null) { item.UpdateView(data); } } } } else { YxDebug.LogError("参数不正确"); } } }