예제 #1
0
 public static void KillTimer(WindowHandle window, TimerId id)
 {
     if (!Imports.KillTimer(window, id))
     {
         throw Errors.GetIoExceptionForLastError();
     }
 }
예제 #2
0
        public static TimerId SetTimer(WindowHandle window, TimerId id, uint interval, TimerProcedure callback = null, uint delayTolerance = 0)
        {
            TimerId result = Imports.SetCoalescableTimer(window, id, interval, callback, delayTolerance);

            if (result == TimerId.Null)
            {
                throw Errors.GetIoExceptionForLastError();
            }

            return(result);
        }
 public static extern TimerId SetCoalescableTimer(
     WindowHandle hWnd,
     TimerId nIdEvent,
     uint uElapse,
     TimerProcedure lpTimerFunc,
     uint uToleranceDelay);
 public static extern bool KillTimer(
     WindowHandle hWnd,
     TimerId uIDEvent);
 public static extern TimerId SetTimer(
     WindowHandle hWnd,
     TimerId nIDEvent,
     uint uElapse,
     TimerProcedure lpTimerFunc);
예제 #6
0
 public bool Equals(TimerId other) => other.Value == Value;