private bool ShouldAutomaticallyAcknowledgeOperation(OperationItem operationItem) { if (!Configuration.AutomaticOperationAcknowledgement.IsEnabled) { return false; } int daage = Configuration.AutomaticOperationAcknowledgement.MaxAge; TimeSpan dat = daage > 0 ? TimeSpan.FromMinutes(daage) : Operation.DefaultAcknowledgingTimespan; return !operationItem.IsAcknowledged && (DateTime.UtcNow - operationItem.Timestamp) > dat; }
private void PushEvent(OperationItem operation) { lock (Lock) { Dispatcher.Invoke((Action)(() => { if (_eventWindow == null) { _eventWindow = new EventWindow(); _eventWindow.Closed += EventWindow_Closed; _eventWindow.Show(); } // Call the event window on this operation _eventWindow.PushEvent(operation.ToOperation()); })); } }