private void CallStateChangedHandler(object sender, ToxAvEventArgs.CallStateEventArgs e) { if ((e.FriendNumber == _friendInCall) && (e.State.HasFlag(ToxAvFriendCallState.Finished) || e.State.HasFlag(ToxAvFriendCallState.Error))) { _friendInCall = -1; } CallStateChanged?.Invoke(this, e); }
private void HandleClick(bool value) { this.isCallAccepted = value; this.Parent.Controls[this.Name].Hide(); if (this.CallStateChanged != null) { CallStateChanged.Invoke(value, this.caller); } }
public void OnCallState(CallStateChanged e) { lock (_lock) if (_activeCalls.ContainsKey(e.Id) && _activeCalls[e.Id] != null) { CallStateChangedEventArgs ea; if (_eaCache.TryGetValue(new ValueWrapper <int>(e.Id), out ea)) { ea.DestinationUri = _activeCalls[e.Id].DestinationUri; ea.Duration = _activeCalls[e.Id].TotalDuration; } _activeCalls[e.Id].HandleSignallingStateChanged(); } }
internal static void RaiseCallStateChanged() => CallStateChanged?.Invoke(null, null);
protected virtual void OnCallStateChanged(CallStateEventArgs e) { CallStateChanged?.Invoke(this, e); }
public void OnCallState(CallStateChanged e) { lock (_lock) if (_activeCalls.ContainsKey(e.Id) && _activeCalls[e.Id] != null) { CallStateChangedEventArgs ea; if (_eaCache.TryGetValue(new ValueWrapper<int>(e.Id), out ea)) { ea.DestinationUri = _activeCalls[e.Id].DestinationUri; ea.Duration = _activeCalls[e.Id].TotalDuration; } _activeCalls[e.Id].HandleSignallingStateChanged(); } }