Esempio n. 1
0
 protected virtual void ServerOnUserIsBusy(object sender, string message)
 {
     if (sender as Port != this)
     {
         return;
     }
     State = PortState.Enabled;
     UserIsBusy?.Invoke(sender, message);
     PortEnabled?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 2
0
 protected virtual void ServerOnServerFinishedCall(object sender, ConnectionEventArgs e)
 {
     if (this != e.port1 && this != e.port2)
     {
         return;
     }
     State = PortState.Enabled;
     PortEnabled?.Invoke(this, EventArgs.Empty);
     PortFinishedCall?.Invoke(this, e.message);
 }
Esempio n. 3
0
        protected virtual void ServerOnAnswerOnReject(object sender, string message)
        {
            if (this != sender)
            {
                return;
            }
            var port1 = sender as Port;

            if (port1 != null)
            {
                SendRejectMessageToTerminal?.Invoke(this, new AnswerEventArgs(port1.Number, message));
            }
            State = PortState.Enabled;
            PortEnabled?.Invoke(this, EventArgs.Empty);
        }
Esempio n. 4
0
        //Methods-handlers of terminal events

        protected virtual void TerminalOnTerminalIsEnabled(object sender, EventArgs e)
        {
            State = PortState.Enabled;
            PortEnabled?.Invoke(this, EventArgs.Empty);
        }