/// <summary> /// Invokes a user specified method when the wait cursor count down has reached zero. /// </summary> public static void ElapsedEvent(int countDownMs, OnWaitCursorElapsed target, object paramObj) { _eventTarget = target; _eventParam = paramObj; _countValue = countDownMs / 1000; _countDown = (countDownMs > 0); _startTime = DXUtil.timeGetTime(); _elapsedEventRunning = true; // The count label depends on font rendering. If the users callback involves reloading fonts then we need to reallocate // the labels resources to be sure everything calculates okay (e.g., the x,y position of the control). _countLabel.Dispose(); _countLabel.AllocResources(); Show(); }