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); }
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); }
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); }
//Methods-handlers of terminal events protected virtual void TerminalOnTerminalIsEnabled(object sender, EventArgs e) { State = PortState.Enabled; PortEnabled?.Invoke(this, EventArgs.Empty); }