Example #1
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnUserInvite(InteractionEventArgs pEventArgs)
 {
     UserInvited?.Invoke(this, pEventArgs);
 }
Example #2
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnSurveyAdd(InteractionEventArgs pEventArgs)
 {
     SurveyAdded?.Invoke(this, pEventArgs);
 }
Example #3
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnTaskAdd(InteractionEventArgs pEventArgs)
 {
     TaskAdded?.Invoke(this, pEventArgs);
 }
Example #4
0
 public virtual void OnModify(InteractionEventArgs pEventArgs)
 {
     throw new System.NotImplementedException();
 }
Example #5
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnExpenseAdded(InteractionEventArgs pEventArgs)
 {
     ExpenseAdded?.Invoke(this, pEventArgs);
 }
Example #6
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnStateChanged(InteractionEventArgs pEventArgs)
 {
     StateChanged?.Invoke(this, pEventArgs);
 }
        private void OnInteractionRemoved(object sender, InteractionEventArgs e)
        {
            if(_interactions.ContainsKey(e.Interaction.InteractionId))
            {
                var callDetails = _interactions[e.Interaction.InteractionId];

                if (callDetails.State != InteractionAttributeValues.State.ExternalDisconnect &&
                    callDetails.State != InteractionAttributeValues.State.InternalDisconnect)
                {
                    _deviceManager.CallEnded(e.Interaction.InteractionId);
                }

                _interactions.Remove(e.Interaction.InteractionId);
            }
        }
Example #8
0
 protected virtual void InteractionDisconnectedHandler(object sender, InteractionEventArgs e)
 {
     synchronizeAndInvoke(o => EnabledButtons &= ~((int)MediaBarButtons.All));
 }
Example #9
0
 protected virtual void NewInteractionHandler(object sender, InteractionEventArgs e)
 {
     synchronizeAndInvoke(o => Interactions.Add((IInteraction)o), e.Interaction);
 }
Example #10
0
 protected virtual void InteractionCompletedHandler(object sender, InteractionEventArgs e)
 {
     synchronizeAndInvoke(o => Interactions.Remove((IInteraction)o), e.Interaction);
     synchronizeButtonStates();
     CanAssociateToRecord = CanAssociateToRecord && Interactions.Count > 0;
 }
Example #11
0
 protected virtual void InteractionConnectedHandler(object sender, InteractionEventArgs e)
 {
     synchronizeButtonStates();
 }
Example #12
0
 protected virtual void CurrentInteractionChangedHandler(object sender, InteractionEventArgs e)
 {
     synchronizeAndRaiseOnPropertyChanged("CurrentInteraction");
     synchronizeButtonStates();
 }
Example #13
0
 public void OnDismissRequest(object sender, InteractionEventArgs args)
 {
     this.DoDismiss();
 }
Example #14
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnTimesliceAdded(InteractionEventArgs pEventArgs)
 {
     TimesliceAdded?.Invoke(this, pEventArgs);
 }
Example #15
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnComplete(InteractionEventArgs pEventArgs)
 {
     Completed?.Invoke(this, pEventArgs);
 }
 protected void OnDismissRequest(object sender, InteractionEventArgs args)
 {
     this.Dismiss();
 }
Example #17
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnModify(InteractionEventArgs pEventArgs)
 {
     Modified?.Invoke(this, pEventArgs);
 }
Example #18
0
 public void OnTapToStart(object sender, InteractionEventArgs args)
 {
 }
        private void OnInteractionChanged(object sender, InteractionEventArgs e)
        {
            var interaction = e.Interaction;

            if (interaction.GetAttribute(InteractionAttributes.InteractionType) != InteractionAttributeValues.InteractionType.Call)
            {
                return;
            }

            var oldInteractionState = _interactions[interaction.InteractionId];
            var newInteractionState = new InteractionState(interaction);

            if (oldInteractionState.State != newInteractionState.State)
            {
                if (newInteractionState.State == InteractionAttributeValues.State.ExternalDisconnect ||
                    newInteractionState.State == InteractionAttributeValues.State.InternalDisconnect)
                {
                    _deviceManager.CallEnded(interaction.InteractionId);
                }
                else if (oldInteractionState.State == InteractionAttributeValues.State.Held &&
                    newInteractionState.State == InteractionAttributeValues.State.Connected)
                {
                    _deviceManager.CallResumed(interaction.InteractionId);
                }
                else if (newInteractionState.State == InteractionAttributeValues.State.Held)
                {
                    _deviceManager.CallHeld(interaction.InteractionId);
                }
                else if (newInteractionState.State == InteractionAttributeValues.State.Connected &&
                    oldInteractionState.State == InteractionAttributeValues.State.Alerting)
                {
                    _deviceManager.CallAnswered(interaction.InteractionId);
                }
            }

            _interactions[interaction.InteractionId] = newInteractionState;
        }
Example #20
0
 /// <summary>
 /// Send event internal function for call all registered send event delegates
 /// </summary>
 /// <param name="sendEvent"></param>
 /// <param name="gameObject"></param>
 /// <param name="eventArgs"></param>
 private void SendEvent(Action <GameObject, InteractionEventArgs> sendEvent, GameObject gameObject, InteractionEventArgs eventArgs)
 {
     if (sendEvent != null)
     {
         sendEvent(gameObject, eventArgs);
     }
 }
        private void OnInteractionAdded(object sender, InteractionEventArgs e)
        {
            var interaction = e.Interaction;

            if (interaction.GetAttribute(InteractionAttributes.InteractionType) != InteractionAttributeValues.InteractionType.Call)
            {
                return;
            }

            if (interaction.GetAttribute(InteractionAttributes.State) ==
                    InteractionAttributeValues.State.ExternalDisconnect ||
                    interaction.GetAttribute(InteractionAttributes.State) ==
                    InteractionAttributeValues.State.InternalDisconnect)
            {
                return;
            }

            _interactions.Add(e.Interaction.InteractionId, new InteractionState(e.Interaction));

            if (interaction.GetAttribute(InteractionAttributes.Direction) ==
                InteractionAttributeValues.Direction.Outgoing)
            {
                _deviceManager.OutgoingCall(interaction.InteractionId);
            }
            else if (interaction.GetAttribute(InteractionAttributes.Direction) ==
                InteractionAttributeValues.Direction.Incoming
                )
            {
                _deviceManager.IncomingCall(interaction.InteractionId);

                if (interaction.GetAttribute(InteractionAttributes.State) !=
                    InteractionAttributeValues.State.Alerting &&
                    interaction.GetAttribute(InteractionAttributes.State) !=
                    InteractionAttributeValues.State.Offering)
                {
                    _deviceManager.CallAnswered(interaction.InteractionId);
                }
            }
        }
Example #22
0
 /// <summary>
 /// This method raises the corresponding event in case subscribers are registered
 /// </summary>
 /// <param name="pEventArgs"></param>
 public virtual void OnLeave(InteractionEventArgs pEventArgs)
 {
     Left?.Invoke(this, pEventArgs);
 }
Example #23
0
 public virtual void OnStateChanged(InteractionEventArgs pEventArgs)
 {
     throw new System.NotImplementedException();
 }
Example #24
0
 public virtual void OnInteractionFinished(object sender, InteractionEventArgs args)
 {
     this.Dismiss();
 }