public override void Validate() { this._urlaList = UrlAction.ParseFromText(base.view.activity.Content, null); if (this._urlaList.Count > 0) { this._stepList.SetElementAmount(this._urlaList.Count); for (int i = 0; i < this._urlaList.Count; i++) { UrlAction action = this._urlaList[i]; CUIListElementScript elemenet = this._stepList.GetElemenet(i); if (null != elemenet) { CUIHttpImageScript component = elemenet.GetComponent <CUIHttpImageScript>(); if (null != component) { component.SetImageUrl(action.target); } } } this._curStepIndex = 0; this._leftToRight = true; this._stepList.MoveElementInScrollArea(this._curStepIndex, true); this._lastScrollTime = Time.time; this.updateOverTime(); } }
public static void ReceiveRollingMsgNtf(CSPkg msg) { SCPKG_ROLLINGMSG_NTF stRollingMsgNtf = msg.stPkgData.stRollingMsgNtf; int num = Mathf.Min(stRollingMsgNtf.astRollingMsg.Length, (int)stRollingMsgNtf.bMsgCnt); for (int i = 0; i < num; i++) { RollingInfo rollingInfo = new RollingInfo(); CSDT_ROLLING_MSG cSDT_ROLLING_MSG = stRollingMsgNtf.astRollingMsg[i]; rollingInfo.resetPriorityTime = CRoleInfo.GetCurrentUTCTime(); rollingInfo.priority = CRollingSystem.CalculatePriority((COM_ROLLINGMSG_TYPE)cSDT_ROLLING_MSG.bType, cSDT_ROLLING_MSG.bPriority); rollingInfo.repeatCount = CRollingSystem.CalculateRepeatCount(cSDT_ROLLING_MSG.dwStartTime, cSDT_ROLLING_MSG.dwEndTime, cSDT_ROLLING_MSG.wPeriod); rollingInfo.content = Utility.UTF8Convert(cSDT_ROLLING_MSG.szContent, (int)cSDT_ROLLING_MSG.wContentLen); bool flag = false; ListView <UrlAction> listView = UrlAction.ParseFromText(rollingInfo.content, null); if (listView.Count > 0) { UrlAction urlAction = listView[0]; if (!string.IsNullOrEmpty(urlAction.target) && urlAction.action == UrlAction.Action.openUrl && !string.IsNullOrEmpty(urlAction.url)) { rollingInfo.content = urlAction.target; rollingInfo.url = urlAction.url; flag = true; } } if (cSDT_ROLLING_MSG.bType == 0) { if (flag) { rollingInfo.content = "<color=#fdb900>" + rollingInfo.content + "</color>"; } else { rollingInfo.content = "<color=#b5e9ff>" + rollingInfo.content + "</color>"; } } if (cSDT_ROLLING_MSG.bIsChat == 1) { Singleton <EventRouter> .GetInstance().BroadCastEvent <string>(EventID.ROLLING_SYSTEM_CHAT_INFO_RECEIVED, rollingInfo.content); } Singleton <CRollingSystem> .GetInstance().m_rollingInfos.Add(rollingInfo); } Singleton <CRollingSystem> .GetInstance().StartRolling(); }
public override void Validate() { this._urlaList = UrlAction.ParseFromText(base.view.activity.Content, null); int count = this._urlaList.Count; if (count > 0) { this._stepList.SetElementAmount(count); for (int i = 0; i < count; i++) { UrlAction urlAction = this._urlaList[i]; CUIListElementScript elemenet = this._stepList.GetElemenet(i); if (null != elemenet) { CUIHttpImageScript component = elemenet.GetComponent <CUIHttpImageScript>(); if (null != component) { component.SetImageUrl(urlAction.target); } } } this._pickIdxList = new int[count]; if (this._pickObject != null) { CUIContainerScript component2 = this._pickObject.GetComponent <CUIContainerScript>(); if (component2 != null) { component2.RecycleAllElement(); for (int j = 0; j < this._urlaList.Count; j++) { this._pickIdxList[j] = component2.GetElement(); } } } this._curStepIndex = 0; this._leftToRight = true; this._stepList.MoveElementInScrollArea(this._curStepIndex, true); this.EnablePickObj(this._curStepIndex); this._lastScrollTime = Time.time; this.updateOverTime(); } }