local UIPushInterfaceCommandTheWorld = UIViewClass() function UIPushInterfaceCommandTheWorld:OnOpened(context) local startTime= MDL.CommandTheWorld.GetActivityBeginTime() local startTimeMonth,startTimeDay,startTimeHourMinute = UTL.Time.FormatTimeSimple(startTime) local endTime = MDL.CommandTheWorld.GetActivityEndTime() local endTimeMonth,endTimeDay,endTimeHourMinute = UTL.Time.FormatTimeSimple(endTime) UIUtils.SetLabel(self.lab_Time,string.FormatByIdsId(Const_IDS.IDS_BattlefieldMuster_Time,tostring(startTimeMonth),tostring(startTimeDay),tostring(startTimeHourMinute),tostring(endTimeMonth),tostring(endTimeDay),tostring(endTimeHourMinute))) end function UIPushInterfaceCommandTheWorld:OnButtonClicked(comp) if self.btn_Close == comp then CTL.PushInterface.HidePushInterface(self.__viewClassPath, self.toggle_Skip) self:CloseView() elseif self.btn_Get == comp then CTL.PushInterface.HidePushInterface(self.__viewClassPath, self.toggle_Skip) self:CloseView() if not CTL.CommandTheWorld.IsActivityEnd() then CTL.CommandTheWorld.OpenMainPanel() else CTL.Tips.AddTipsMsg(Const_IDS.IDS_ActivityItem_NotAtActivityTime) end end end return UIPushInterfaceCommandTheWorld