public override void OnMessage(WndMsgID msgID, UIMsgData data) { switch (msgID) { case WndMsgID.WND_MSG_LEGENDCUP_ONLINE_RESET_SHOW: { SetVisible(true); LegendCupOnlineResetData cmdData = (LegendCupOnlineResetData)data; if (m_wndView != null) { m_wndView.OnAddLegendCup(cmdData); } } break; case WndMsgID.WND_MSG_LEGENDCUP_ONLINE_RESET_CLOSE: { if (m_wndView != null) { UnloadView(); } } break; default: break; } }
public void OnAddLegendCup(LegendCupOnlineResetData dataInfo) { m_dataInfo = dataInfo; // 初始化其他数据 Kin1Des.text = dataInfo.szKin1Name; Kin2Des.text = dataInfo.szKin2Name; // 设置为最后可重置比赛的时间点 DateTime resetEndTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Unspecified).AddSeconds(dataInfo.nResetEndTime); resetEndTime = resetEndTime.ToLocalTime(); ResetEndTimeDes.text = ULocalizationService.Instance.Get("UIView", "LegendCupOnlineReset", "OnlineResetEndTime") + resetEndTime.ToString(" MM-dd HH:mm"); MonthInputField.placeholder.GetComponent <Text>().text = resetEndTime.Month.ToString(); DayInputField.placeholder.GetComponent <Text>().text = resetEndTime.Day.ToString(); HourInputField.placeholder.GetComponent <Text>().text = resetEndTime.Hour.ToString(); MinuteInputField.placeholder.GetComponent <Text>().text = resetEndTime.Minute.ToString(); Kin1ScoreInputField.placeholder.GetComponent <Text>().text = "0"; Kin2ScoreInputField.placeholder.GetComponent <Text>().text = "0"; }