예제 #1
0
        public static int GetSecondsRemaining(ITimedEventVO vo)
        {
            int nowTimeWithEventOffset = TimedEventUtils.GetNowTimeWithEventOffset(vo);

            switch (TimedEventUtils.GetState(vo))
            {
            case TimedEventState.Upcoming:
                return(vo.StartTimestamp - nowTimeWithEventOffset);

            case TimedEventState.Live:
                return(vo.EndTimestamp - nowTimeWithEventOffset);

            case TimedEventState.Closing:
                return(vo.EndTimestamp - nowTimeWithEventOffset);

            default:
                return(0);
            }
        }
예제 #2
0
        public static TimedEventState GetState(ITimedEventVO vo)
        {
            int nowTimeWithEventOffset = TimedEventUtils.GetNowTimeWithEventOffset(vo);

            return(TimedEventUtils.GetState(vo, (uint)nowTimeWithEventOffset));
        }
예제 #3
0
        public static bool IsTimedEventClosing(ITimedEventVO eventVO, uint timeToCheck)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO, timeToCheck);

            return(state == TimedEventState.Closing);
        }
예제 #4
0
        public static bool IsTimedEventActive(ITimedEventVO eventVO)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO);

            return(state != TimedEventState.Invalid && state != TimedEventState.Hidden);
        }
예제 #5
0
        public static bool IsTimedEventLiveOrClosing(ITimedEventVO eventVO)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO);

            return(state == TimedEventState.Live || state == TimedEventState.Closing);
        }
예제 #6
0
        public static bool IsTimedEventLive(ITimedEventVO eventVO, uint timeToCheck)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO, timeToCheck);

            return(state == TimedEventState.Live);
        }
예제 #7
0
        public static bool IsTimedEventLive(ITimedEventVO eventVO)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO);

            return(state == TimedEventState.Live);
        }
예제 #8
0
 public unsafe static long $Invoke3(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(TimedEventUtils.GetState((ITimedEventVO)GCHandledObjects.GCHandleToObject(*args))));
 }