Exemplo n.º 1
0
 private void UpdateAndScheduleEvent(Window window)
 {
     _delayedMoveEventFireActions[window].Cancel();
     lock (_delayedMoveEvents)
     {
         if (!_delayedMoveEvents.ContainsKey(window))
         {
             _delayedMoveEvents[window] = CreateWindowEvent(window, WindowAction.Move);
         }
         _delayedMoveEvents[window].TerminatedAt = _dateUtils.Now;
         _delayedMoveEventFireActions[window]    = _callbackManager.RegisterCallback(
             () => FireDelayedMoveEvent(window),
             WindowMoveTimeout);
     }
 }
Exemplo n.º 2
0
        private void RegisterCallback()
        {
            var nextNotificationTime = CalculateNextNotificationTime();

            _callbackManager.RegisterCallback(ShowNotificationAndUpdateSettings, nextNotificationTime.DateTime, RegisterCallback);
        }