Example #1
0
 private bool IsActiveRequest(ClientRequestPlan plan)
 {
     return (plan != null) && (plan.ClientRequest != null) &&
         ((plan.ClientRequest.State == ClientRequestState.Calling) || (plan.ClientRequest.State == ClientRequestState.Rendering));
 }
Example #2
0
 public void CurrentClientRequestPlanUpdated(ClientRequestPlan clientRequestPlan, Operator queueOperator)
 {
     OnCurrentClientRequestPlanUpdated(this, new QueuePlanEventArgs() { ClientRequestPlan = clientRequestPlan, Operator = queueOperator });
 }
Example #3
0
        private void UpdateOperatorCurrentRequest(Operator op, ClientRequestPlan plan)
        {
            var wrapper = CurrentRequests.SingleOrDefault(w => w.Operator.Equals(op));
            if ((plan == null) && (wrapper == null))
            {
                return;
            }

            if (wrapper != null)
            {
                if (IsActiveRequest(plan))
                {
                    wrapper.Request = plan.ClientRequest;
                }
                else
                {
                    CurrentRequests.Remove(wrapper);
                }
            }
            else
            {
                if (IsActiveRequest(plan))
                {
                    CurrentRequests.Add(new ClientRequestWrapper()
                    {
                        Request = plan.ClientRequest,
                        Operator = op
                    });
                }
            }
            ShowNotification = CurrentRequests.Count > 0;
        }