Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
        public static TimedEventState GetState(ITimedEventVO vo)
        {
            int nowTimeWithEventOffset = TimedEventUtils.GetNowTimeWithEventOffset(vo);

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

            return(state == TimedEventState.Closing);
        }
Ejemplo n.º 4
0
        public static bool IsTimedEventActive(ITimedEventVO eventVO)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO);

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

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

            return(state == TimedEventState.Live);
        }
Ejemplo n.º 7
0
        public static bool IsTimedEventLive(ITimedEventVO eventVO)
        {
            TimedEventState state = TimedEventUtils.GetState(eventVO);

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